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);
109 for(
unsigned int c=0; c<
cols; c++)
110 rowVector[c] = dataPtr[r*cols+c];
122 for(
unsigned int r=0; r<
rows; r++)
123 columnVector[r] = dataPtr[r*cols+c];
142 bool save(
const std::string &filename)
const;
153 bool load(
const std::string &filename,
const char seperator =
',');
161 bool saveToCSVFile(
const std::string &filename)
const;
170 bool loadFromCSVFile(
const std::string &filename,
const char seperator =
',');
178 bool print(
const std::string title=
"")
const;
192 bool scale(
const Float minTarget,
const Float maxTarget);
199 bool scale(
const Vector< MinMax > &ranges,
const Float minTarget,
const Float maxTarget);
208 bool znorm(
const Float alpha = 0.001);
294 Float getMinValue()
const;
301 Float getMaxValue()
const;
336 Float getTrace()
const;
340 Float stringToFloat(
const std::string &value){
341 std::stringstream s( value );
354 #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.