21 #ifndef GRT_MATRIX_FLOAT_HEADER
22 #define GRT_MATRIX_FLOAT_HEADER
25 #include "VectorFloat.h"
26 #include "../Util/MinMax.h"
27 #include "../Util/Log.h"
28 #include "../Util/DebugLog.h"
29 #include "../Util/ErrorLog.h"
30 #include "../Util/WarningLog.h"
31 #include "../Util/FileParser.h"
32 #include "../Util/ErrorLog.h"
49 MatrixFloat(
const unsigned int rows,
const unsigned int cols);
102 for(
unsigned int c=0; c<
cols; c++)
103 rowVector[c] = dataPtr[r*cols+c];
115 for(
unsigned int r=0; r<
rows; r++)
116 columnVector[r] = dataPtr[r*cols+c];
135 bool save(
const std::string &filename)
const;
146 bool load(
const std::string &filename,
const char seperator =
',');
154 bool saveToCSVFile(
const std::string &filename)
const;
163 bool loadFromCSVFile(
const std::string &filename,
const char seperator =
',');
171 bool print(
const std::string title=
"")
const;
185 bool scale(
const Float minTarget,
const Float maxTarget);
192 bool scale(
const Vector< MinMax > &ranges,
const Float minTarget,
const Float maxTarget);
201 bool znorm(
const Float alpha = 0.001);
287 Float getMinValue()
const;
294 Float getMaxValue()
const;
329 Float getTrace()
const;
333 Float stringToFloat(
const std::string &value){
334 std::stringstream s( value );
347 #endif //Header guard
The Matrix class is a basic class for storing any type of data. This class is a template and can ther...
Matrix & operator=(const Matrix &rhs)
unsigned int rows
The number of rows in the Matrix.
VectorFloat getCol(const unsigned int c) const
VectorFloat getRow(const unsigned int r) const
unsigned int cols
The number of columns in the Matrix.