48 # define TMP "tmp.txt"
51 # define TMP "/tmp/tmp.txt"
52 # define TMP2 "/tmp/tmp.m"
56 #include <Base/Math/Matrix.hh>
66 double randomDouble_local(){
67 return ((
double) rand() / (
double) RAND_MAX);
71 int main(
int argc,
char* argv[]){
78 for(
int r = 0; r < 2; r++)
79 for(
int c = 0; c < 3; c++)
80 instance1[r][c] = randomDouble_local();
83 ofstream fOut(
TMP, ios::out);
88 ofstream fmOut(TMP2, ios::out);
90 instance1.WriteMatlab(fmOut,
"randommat");
95 ifstream fIn(
TMP, ios::in );
108 bool equalityTestResult = (instance1 == instance2);
111 cout << setprecision(25);
114 cout <<
"--------------------------------------------\n";
115 cout <<
"instance1 is: \n" << instance1 <<
"\n\n";
117 cout <<
"--------------------------------------------\n";
118 cout <<
"instance2 is: \n" << instance2 <<
"\n\n";
120 cout <<
"--------------------------------------------\n";
121 cout <<
"equality test result is: " <<boolalpha<< equalityTestResult <<
"\n";
123 if (equalityTestResult ==
false)
124 cout <<
"Residuum: "<<instance2-instance1<<endl;
127 BIASASSERT( equalityTestResult ==
true ) ;
#define TMP
Test Matrix I/O precision issues. Deprecated!