Represents a Matrix of values (varying size)
Matrix( |
| ) |
Creates a Matrix object given its size and data
rows uint16 | The number of rows that are in the Matrix |
columns uint16 | The number of columns that are in the Matrix |
storedAs | The ValueType representing how all the values in the Matrix are stored |
data const ByteStream& | The ByteStream that hold the values to be stored in the Matrix |
The number of rows in the Matrix
The number of columns in the Matrix
The size of each values' type within the Matrix
uint32 getBytePos( |
| ) const |
Gets the byte position to read in data from the m_data ByteStream
row uint16 | The row being requested |
col uint16 | The column being requested |
std::out_of_range: The position requested is out of range
void checkIndex( |
| ) const |
Checks that the given row and column indicies (0-based) are within range, throwing an exception if not
row uint16 | The 0-based row index to check within range |
col uint16 | The 0-based column index to check within range |
std::out_of_range: The position requested is out of range
Gets how each value within the Matrix is stored
A ValueType representing how each value in the Matrix is stored
Gets the number of rows in the Matrix
The number of rows in the Matrix
Gets the number of columns in the Matrix
The number of columns in the Matrix
float as_floatAt( |
| ) const |
Gets the value stored at the given row and column (0-based), as a 4-byte float
row uint16 | The 0-based row index of which to get the value |
column uint16 | The 0-based column index of which to get the value |
The value stored at the given row and column, as a float
std::out_of_range: The position requested is out of range
uint16 as_uint16At( |
| ) const |
Gets the value stored at the given row and column (0-based), as a 2-byte unsigned integer
row uint16 | The 0-based row index of which to get the value |
column uint16 | The 0-based column index of which to get the value |
The value stored at the given row and column, as a 2-byte unsigned integer
std::out_of_range: The position requested is out of range
uint8 as_uint8At( |
| ) const |
Gets the value stored at the given row and column (0-based), as a 1-byte uint8
row uint16 | The 0-based row index of which to get the value |
column uint16 | The 0-based column index of which to get the value |
The value stored at the given row and column, as a 1-byte uint8
std::out_of_range: The position requested is out of range
Creates a string from the Matrix
A string representing the entire Matrix object (ex. "[[0,0.1,0.2],[1,1.1,1.2],[2,2.1,2.2]]")