opensurgsim
|
Tests that exercise the functionality of our matrix typedefs, which come straight from Eigen. More...
#include <math.h>
#include <Eigen/Geometry>
#include <gtest/gtest.h>
#include "SurgSim/Math/MathConvert.h"
#include "SurgSim/Math/Matrix.h"
Classes | |
class | MatrixTestBase< T > |
class | Matrix22Tests< T > |
class | Matrix33Tests< T > |
class | Matrix44Tests< T > |
class | AllMatrixTests< T > |
class | AllDynamicMatrixTests< T > |
class | UnalignedMatrixTests< T > |
class | UnalignedDynamicMatrixTests< T > |
Typedefs | |
typedef ::testing::Types< SurgSim::Math::Matrix22d, SurgSim::Math::Matrix22f > | Matrix22Variants |
typedef ::testing::Types< SurgSim::Math::Matrix33d, SurgSim::Math::Matrix33f > | Matrix33Variants |
typedef ::testing::Types< SurgSim::Math::Matrix44d, SurgSim::Math::Matrix44f > | Matrix44Variants |
typedef ::testing::Types< SurgSim::Math::Matrix22d, SurgSim::Math::Matrix22f, SurgSim::Math::Matrix33d, SurgSim::Math::Matrix33f, SurgSim::Math::Matrix44d, SurgSim::Math::Matrix44f > | AllMatrixVariants |
typedef ::testing::Types< Eigen::MatrixXd, Eigen::MatrixXf, SurgSim::Math::Matrix > | AllDynamicMatrixVariants |
typedef ::testing::Types< SurgSim::Math::Matrix22d, SurgSim::Math::Matrix22f, SurgSim::Math::Matrix33d, SurgSim::Math::Matrix33f, SurgSim::Math::Matrix44d, SurgSim::Math::Matrix44f > | UnalignedMatrixVariants |
typedef ::testing::Types< Eigen::MatrixXd, Eigen::MatrixXf, SurgSim::Math::Matrix > | UnalignedDynamicMatrixVariants |
Functions | |
TYPED_TEST_CASE (Matrix22Tests, Matrix22Variants) | |
TYPED_TEST_CASE (Matrix33Tests, Matrix33Variants) | |
TYPED_TEST_CASE (Matrix44Tests, Matrix44Variants) | |
TYPED_TEST_CASE (AllMatrixTests, AllMatrixVariants) | |
TYPED_TEST_CASE (AllDynamicMatrixTests, AllDynamicMatrixVariants) | |
TYPED_TEST_CASE (UnalignedMatrixTests, UnalignedMatrixVariants) | |
TYPED_TEST_CASE (UnalignedDynamicMatrixTests, UnalignedDynamicMatrixVariants) | |
TYPED_TEST (Matrix22Tests, CanConstruct) | |
Test that matrices can be constructed. | |
TYPED_TEST (Matrix33Tests, CanConstruct) | |
Test that matrices can be constructed. | |
TYPED_TEST (Matrix44Tests, CanConstruct) | |
Test that matrices can be constructed. | |
TYPED_TEST (UnalignedMatrixTests, DefaultConstructorInitialization) | |
Test that the default constructor DOESN'T initialize matrices. | |
TYPED_TEST (Matrix22Tests, ShiftCommaInitialization) | |
Test setting the matrix using the << syntax. | |
TYPED_TEST (Matrix33Tests, ShiftCommaInitialization) | |
Test setting the matrix using the << syntax. | |
TYPED_TEST (Matrix44Tests, ShiftCommaInitialization) | |
Test setting the matrix using the << syntax. | |
TYPED_TEST (AllMatrixTests, ZeroValue) | |
Test getting a zero value usable in expressions. | |
TYPED_TEST (AllMatrixTests, SetToZero) | |
Test setting matrices to 0. | |
TYPED_TEST (AllMatrixTests, ConstantValue) | |
Test getting a constant value usable in expressions. | |
TYPED_TEST (AllMatrixTests, SetToConstant) | |
Test setting matrices to a constant. | |
TYPED_TEST (AllMatrixTests, InitializeRowMajorFromArray) | |
Test initializing a row-major Eigen matrix from a float array. | |
TYPED_TEST (AllMatrixTests, InitializeColumnMajorFromArray) | |
Test initializing a column-major Eigen matrix from a float array. | |
TYPED_TEST (AllMatrixTests, InitializeFromArray) | |
Test initializing from a float array. More... | |
TYPED_TEST (AllMatrixTests, YamlConvert) | |
TYPED_TEST (AllMatrixTests, Assign) | |
Test assignment. | |
TYPED_TEST (AllMatrixTests, RowsAndColumns) | |
Access by rows and columns. | |
TYPED_TEST (AllMatrixTests, Diagonal) | |
Access to the diagonal. | |
TYPED_TEST (Matrix33Tests, FromAngleAxis) | |
Test setting quaternions from an angle/axis rotation. | |
TYPED_TEST (Matrix33Tests, ToAngleAxis) | |
Test extracting an angle/axis rotation from a quaternion. | |
TYPED_TEST (Matrix33Tests, MakeSkewSymmetricMatrixTest) | |
Test building a skew symmetric matrix from a vector. | |
TYPED_TEST (Matrix33Tests, SkewTest) | |
Test extracting a vector from a skew symmetric part of a matrix. | |
TYPED_TEST (AllMatrixTests, Negate) | |
Negation (unary minus). | |
TYPED_TEST (AllMatrixTests, Add) | |
Addition. | |
TYPED_TEST (AllMatrixTests, Subtract) | |
Subtraction. | |
TYPED_TEST (AllMatrixTests, AddTo) | |
Incrementing by a value. | |
TYPED_TEST (AllMatrixTests, SubtractFrom) | |
Decrementing by a value. | |
TYPED_TEST (AllMatrixTests, MultiplyMatrixScalar) | |
Matrix-scalar multiplication. | |
TYPED_TEST (AllMatrixTests, MultiplyScalarMatrix) | |
Scalar-matrix multiplication. | |
TYPED_TEST (AllMatrixTests, DivideScalar) | |
Division by scalar. | |
TYPED_TEST (AllMatrixTests, MultiplyMatrixVector) | |
Matrix-vector multiplication. | |
TYPED_TEST (AllMatrixTests, MultiplyMatrixMatrix) | |
Matrix-matrix multiplication. | |
TYPED_TEST (AllMatrixTests, Inverse) | |
Matrix inverse. | |
TYPED_TEST (AllMatrixTests, Transpose) | |
Matrix transpose. | |
TYPED_TEST (AllMatrixTests, ComponentwiseMultiply) | |
Component-wise multiplication. | |
TYPED_TEST (AllMatrixTests, ComponentwiseDivide) | |
Component-wise division. | |
TYPED_TEST (AllMatrixTests, FrobeniusNorm) | |
Frobenius norm and its square. | |
TYPED_TEST (AllMatrixTests, L1NormAndLInfNorm) | |
L1 (Manhattan) norm and L_Infinity (largest absolute value) norm. | |
TYPED_TEST (AllMatrixTests, MinAndMax) | |
Minimum and maximum elements. | |
TYPED_TEST (AllMatrixTests, Trace) | |
Trace. | |
TYPED_TEST (AllMatrixTests, Determinant) | |
Determinant. | |
TYPED_TEST (Matrix22Tests, Determinant22) | |
Determinant (explicit 2x2 result). | |
TYPED_TEST (Matrix33Tests, Determinant33) | |
Determinant (explicit 3x3 result). | |
TYPED_TEST (Matrix22Tests, Extend2to3) | |
Extending matrices using the block<r,c>() syntax. | |
TYPED_TEST (Matrix22Tests, DynamicExtend2to3) | |
Extending matrices using the block(i,j,r,c) syntax. | |
TYPED_TEST (Matrix22Tests, Shrink3to2) | |
Shrinking matrices using the block<r,c>() syntax. | |
TYPED_TEST (Matrix33Tests, Extend2to3) | |
Extending matrices using the block<r,c>() syntax. | |
TYPED_TEST (Matrix33Tests, Shrink3to2) | |
Shrinking matrices using the block<r,c>() syntax. | |
TYPED_TEST (Matrix33Tests, Extend3to4) | |
Extending matrices using the block<r,c>() syntax. | |
TYPED_TEST (Matrix33Tests, Shrink4to3) | |
Shrinking matrices using the block<r,c>() syntax. | |
TYPED_TEST (Matrix44Tests, Extend3to4) | |
Extending matrices using the block<r,c>() syntax. | |
TYPED_TEST (Matrix44Tests, Shrink4to3) | |
Shrinking matrices using the block<r,c>() syntax. | |
TYPED_TEST (AllMatrixTests, TypeCasting) | |
Typecasting matrices (double <-> float conversions). | |
TYPED_TEST (AllMatrixTests, ArrayReadWrite) | |
Reading from and writing to arrays or blocks of double/float in memory. | |
TYPED_TEST (AllDynamicMatrixTests, addSubMatrix) | |
TYPED_TEST (AllDynamicMatrixTests, addSubMatrixBlocks) | |
TYPED_TEST (AllDynamicMatrixTests, setSubMatrix) | |
TYPED_TEST (AllDynamicMatrixTests, getSubMatrix) | |
Tests that exercise the functionality of our matrix typedefs, which come straight from Eigen.
TYPED_TEST | ( | AllMatrixTests | , |
InitializeFromArray | |||
) |
Test initializing from a float array.
Among other things, tests that our matrices are row-major.