File view_matrix.hpp

class Matrix
#include <view_matrix.hpp>

A two-dimensional view that provides access to values stored in a matrix of a specific size.

Subclassed by CompositeMatrix< AllocatedListOfLists< IndexedValue< T > >, AllocatedCContiguousView< uint32 > >, BinaryCscViewAllocator< Matrix >, BinaryCsrViewAllocator< Matrix >, BinarySparseMatrix, CompositeMatrix< FirstView, SecondView >, DenseMatrix< T >, DenseMatrixAllocator< Matrix >, IterableBinarySparseMatrixDecorator< Matrix >, IterableDenseMatrixDecorator< Matrix >, IterableListOfListsDecorator< Matrix >, IterableSparseSetViewDecorator< Matrix >, ListOfLists< T >, ListOfListsAllocator< Matrix >

Public Functions

inline Matrix(uint32 numRows, uint32 numCols)
Parameters:
  • numRows – The number of rows in the view

  • numCols – The number of columns in the view

inline Matrix(const Matrix &other)
Parameters:

other – A const reference to an object of type Matrix that should be copied

inline Matrix(Matrix &&other)
Parameters:

other – A reference to an object of type Matrix that should be moved

inline virtual ~Matrix()

Public Members

uint32 numRows

The number of rows in the view.

uint32 numCols

The number of columns in the view.

template<typename View>
class MatrixDecorator : public ViewDecorator<View>
#include <view_matrix.hpp>

A matrix that is backed by a two-dimensional view of a specific size.

Template Parameters:

View – The type of view, the matrix is backed by

Subclassed by IterableBinarySparseMatrixDecorator< MatrixDecorator< BinarySparsePredictionView > >

Public Functions

inline MatrixDecorator(View &&view)
Parameters:

view – The view, the matrix should be backed by

inline virtual ~MatrixDecorator() override
inline uint32 getNumRows() const

Returns the number of rows in the matrix.

Returns:

The number of rows in the matrix

inline uint32 getNumCols() const

Returns the number of columns in the matrix.

Returns:

The number of columns in the matrix