49 for(
int i = 0; i < 16; i++) v1[i] = i+1;
51 for(
int i = 0; i < 16; i++) v2[i] = 16-i;
53 for(
int i = 0; i < 4; i++) v3[i] = i+1;
55 for(
int i = 0; i < 4; i++) {v4[i] = i+1+4; v4[i+4] = i+1+4;}
68 for(
int i = 0; i < a.
rows(); i++)
69 for(
int j = 0; j < a.
cols(); j++)
70 if (v3(i*g.
cols()+j)+1 != a(i,j)) {badCount++;}
71 failDescriptionStream <<
"Check to see if addition between two 2x2 gnsstk::Matrix objects works. " << badCount <<
" of the elements are incorrect.";
79 for(
int i = 0; i < b.
rows(); i++)
80 for(
int j = 0; j < b.
cols(); j++)
82 if (3-v1(i*e.
cols()+j) != b(i,j)) {badCount++;}
83 failDescriptionStream <<
"Check to see if subtraction between two 8x2 gnsstk::Matrix objects works. " << badCount <<
" of the elements are incorrect.";
91 for(
int i = 0; i < c.
rows(); i++)
92 for(
int j = 0; j < c.
cols(); j++)
94 if (5-v4(i*h.
cols()+j) != c(i,j)) {badCount++;}
95 failDescriptionStream <<
"Check to see if subtraction between two 4x2 gnsstk::Matrix objects works. " << badCount <<
" of the elements are incorrect.";
103 for(
int i = 0; i < d.
rows(); i++)
104 for(
int j = 0; j < d.
cols(); j++)
106 if (v2(i*f.
cols()+j)+7 != d(i,j)) {badCount++;}
107 failDescriptionStream <<
"Check to see if addition between two 4x4 gnsstk::Matrix objects works. " << badCount <<
" of the elements are incorrect.";
118 int check, errorCounter = 0;
122 errorCounter += check;
124 std::cout <<
"Total Failures for " << __FILE__ <<
": " << errorCounter << std::endl;