18 #include "../include/Matrix.ipp"
19 #include "../include/MatrixAlgorithms.ipp"
20 #include "gtest/gtest.h"
62 entryT tri =
trace(mi,5);
63 ASSERT_DOUBLE_EQ(tri,3);
76 entryT tr2 =
trace(m2,3);
77 ASSERT_DOUBLE_EQ(tr2,4185);
91 entryT tr =
trace(m,3);
92 ASSERT_DOUBLE_EQ(tr,1.37428563169e+8);
111 ASSERT_DOUBLE_EQ(di,1);
125 ASSERT_DOUBLE_EQ(d2,0);
140 ASSERT_DOUBLE_EQ(d,1.572198974600e+7);
146 int main(
int argc,
char **argv){
147 ::testing::InitGoogleTest(&argc,argv);
148 return RUN_ALL_TESTS();
TEST_F(MatrixTest, determinant)
boost::numeric::ublas::matrix< EntryT > Matrix
Typedef for the main matrix class.
MatrixT::value_type det(const MatrixT &M)
Finds the determinant of a square matrix.
int main(int argc, char **argv)
EntryT trace(const Matrix< EntryT > &M)
Finds trace of a square matrix.