18 #include "../include/Matrix.ipp"
19 #include "../include/Polynomial.ipp"
20 #include "gtest/gtest.h"
74 entryT r4 {14,18,9,10};
76 ASSERT_EQ(m3(0,0),r1);
77 ASSERT_EQ(m3(0,1),r2);
78 ASSERT_EQ(m3(1,0),r3);
79 ASSERT_EQ(m3(1,1),r4);
96 entryT r1 {5,9,16,12,9};
97 entryT r2 {32,80,146,160,122,60};
98 entryT r3 {8,10,12,10};
99 entryT r4 {53,117,196,284,241,180,100};
101 ASSERT_EQ(m3(0,0),r1);
102 ASSERT_EQ(m3(0,1),r2);
103 ASSERT_EQ(m3(1,0),r3);
104 ASSERT_EQ(m3(1,1),r4);
109 using namespace boost::numeric::ublas;
113 entryT p4 {7,8,9,10};
123 ASSERT_EQ(t, entryT ({8,10,12,10}));
132 ASSERT_THROW(
trace(m1),std::invalid_argument);
138 template <
typename FieldT>
144 for(
size_t i = 0; i < lhs.
size(); ++i){
145 if (lhs[i] != rhs[i]) {
152 int main(
int argc,
char **argv){
153 ::testing::InitGoogleTest(&argc,argv);
154 return RUN_ALL_TESTS();
TEST_F(MatrixTest, trace)
bool operator==(const Polynomial< FieldT > &lhs, const Polynomial< FieldT > &rhs)
boost::numeric::ublas::matrix< EntryT > Matrix
Typedef for the main matrix class.
int main(int argc, char **argv)
EntryT trace(const Matrix< EntryT > &M)
Finds trace of a square matrix.
Contains the definition for the abstract base class which will be used by different multiplication al...