10 #include <gtest/gtest.h> 12 #include <Eigen/Dense> 14 TEST(CMatrixFixed, CtorUninit)
21 TEST(CMatrixFixed, CtorAllZeros)
24 for (
int i = 0; i < 2; i++)
25 for (
int j = 0; j < 2; j++) EXPECT_EQ(M(i, j), .0);
28 TEST(CMatrixFixed, Identity)
32 for (
int i = 0; i < 3; i++) EXPECT_EQ(M(i, i), 1.0);
35 TEST(CMatrixFixed, asString)
42 TEST(CMatrixFixed, GetSetEigen)
48 for (
int i = 0; i < 3; i++) EXPECT_EQ(M(i, i), 1.0);
53 for (
int i = 0; i < 3; i++)
54 for (
int j = 0; j < 3; j++)
56 const auto n = ((i + 1) * 3) + (j * 1001);
58 EXPECT_NEAR(M(i, j), em(i, j), 1e-9)
59 <<
"(i,j)=(" << i <<
"," << j <<
")\n";
A compile-time fixed-size numeric matrix container.
std::string asString() const
Returns a string representation of the vector/matrix, using Eigen's default settings.
GLsizei const GLchar ** string
EIGEN_MAP asEigen()
Get as an Eigen-compatible Eigen::Map object.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
TEST(CMatrixFixed, CtorUninit)