File prediction_matrix_dense.hpp¶
-
template<typename T>
class DensePredictionMatrix : public IterableDenseMatrixDecorator<AllocatedCContiguousView<T>>¶ - #include <prediction_matrix_dense.hpp>
A dense matrix that provides read-only access to predictions that are stored in a C-contiguous array.
- Template Parameters:
T – The type of the predictions that are stored by the matrix
Public Functions
-
DensePredictionMatrix(uint32 numRows, uint32 numCols, bool init = false)¶
- Parameters:
numRows – The number of rows in the matrix
numCols – The number of columns in the matrix
init – True, if all elements in the matrix should be value-initialized, false otherwise
-
T *get()¶
Returns a pointer to the array that stores the predictions.
- Returns:
A pointer to the array that stores the predictions
-
T *release()¶
Releases the ownership of the array that stores the predictions. As a result, the behavior of this matrix becomes undefined and it should not be used anymore. The caller is responsible for freeing the memory that is occupied by the array.
- Returns:
A pointer to the array that stores the predictions