Driver code: Testing VectorMatrix class.
37 std::ostringstream out_stream;
38 out_stream <<
"OUTPUT";
40 std::ofstream out_file;
41 out_file.open(out_stream.str().c_str());
46 out_file << vector_matrix_1.nrow() <<
"\n";
49 out_file << vector_matrix_1.ncol() <<
"\n";
52 out_file << vector_matrix_1[2][2] <<
"\n";
55 vector_matrix_1[2][2] = 42;
57 out_file << vector_matrix_1[2][2] <<
"\n";
60 vector_matrix_1.resize(6,8,-13);
63 out_file << vector_matrix_1.nrow() <<
"\n";
65 out_file << vector_matrix_1.ncol() <<
"\n";
71 out_file << vector_matrix_1[0][0] <<
"\n";
73 out_file << vector_matrix_1[2][2] <<
"\n";
75 out_file << vector_matrix_1[5][7] <<
"\n";
78 vector_matrix_1.assign(24,32,-42);
83 out_file << vector_matrix_1[24 * (rand() / (RAND_MAX + 1.0))]
84 [32 * (rand() / (RAND_MAX + 1.0))]<<
"\n";
87 vector_matrix_1.clear();
89 out_file << vector_matrix_1.nrow() <<
"\n";
91 out_file << vector_matrix_1.ncol() <<
"\n";
96 const unsigned nrow = 101;
97 const unsigned ncol = 97;
98 const double val = 77.7;
103 out_file << vector_matrix_2.
nrow() <<
"\n";
105 out_file << vector_matrix_2.
ncol() <<
"\n";
110 out_file << vector_matrix_3.nrow() <<
"\n";
112 out_file << vector_matrix_3.ncol() <<
"\n";
114 out_file << vector_matrix_3[nrow * (rand() / (RAND_MAX + 1.0))]
115 [ncol * (rand() / (RAND_MAX + 1.0))]<<
"\n";
120 out_file << vector_matrix_4.nrow() <<
"\n";
122 out_file << vector_matrix_4.ncol() <<
"\n";
124 out_file << vector_matrix_4[nrow * (rand() / (RAND_MAX + 1.0))]
125 [nrow * (rand() / (RAND_MAX + 1.0))]<<
"\n";
129 return(EXIT_SUCCESS);
Definition: vector_matrix.h:79
const unsigned ncol() const
Definition: vector_matrix.h:146
const unsigned nrow() const
returns the number of rows. This is the outer Vector size.
Definition: vector_matrix.h:107
val
Definition: calibrate.py:119