File view_matrix_csc_binary.hpp

Typedefs

typedef BinaryCscViewAllocator<BinaryCscView> AllocatedBinaryCscView

Allocates the memory, a BinaryCscView provides access to

class BinaryCscView : public BinarySparseMatrix
#include <view_matrix_csc_binary.hpp>

A two-dimensional view that provides column-wise access to binary values stored in a matrix in the compressed sparse column (CSC) format.

Public Types

typedef const Vector<const uint32> const_column

Provides read-only access to an individual column in the view.

typedef Vector<uint32> column

Provides access to an individual column in the view and allows to modify it.

Public Functions

inline BinaryCscView(uint32 *indices, uint32 *indptr, uint32 numRows, uint32 numCols)
Parameters:
  • indices – A pointer to an array of type uint32, shape (numNonZeroValues), that stores the row indices, the values in the matrix correspond to

  • indptr – A pointer to an array of type uint32, shape (numCols + 1), that stores the indices of the first element in indices that corresponds to a certain column. The index at the last position must be equal to numNonZeroValues

  • numRows – The number of rows in the view

  • numCols – The number of columns in the view

inline BinaryCscView(const BinaryCscView &other)
Parameters:

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

inline BinaryCscView(BinaryCscView &&other)
Parameters:

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

inline virtual ~BinaryCscView() override
inline const_column operator[](uint32 column) const

Creates and returns a view that provides read-only access to a specific column in the view.

Parameters:

column – The index of the column

Returns:

An object of type const_column that has been created

inline column operator[](uint32 column)

Creates and returns a view that provides access to a specific column in the view and allows to modify it.

Parameters:

column – The index of the column

Returns:

An object of type column that has been created

inline BinarySparseMatrix::index_const_iterator indices_cbegin(uint32 column) const

Returns an index_const_iterator to the beginning of the indices in a specific column of the matrix.

Parameters:

column – The index of the column

Returns:

An index_const_iterator to the beginning of the indices

inline BinarySparseMatrix::index_const_iterator indices_cend(uint32 column) const

Returns an index_const_iterator to the end of the indices in a specific column of the matrix.

Parameters:

column – The index of the column

Returns:

An index_const_iterator to the end of the indices

inline BinarySparseMatrix::index_iterator indices_begin(uint32 column)

Returns an index_iterator to the beginning of the indices in a specific column of the matrix.

Parameters:

column – The index of the column

Returns:

An index_iterator to the beginning of the indices

inline BinarySparseMatrix::index_iterator indices_end(uint32 column)

Returns an index_iterator to the end of the indices in a specific column of the matrix.

Parameters:

column – The index of the column

Returns:

An index_iterator to the end of the indices

inline uint32 getNumNonZeroElements() const

Returns the number of non-zero elements in the view.

Returns:

The number of non-zero elements

template<typename Matrix>
class BinaryCscViewAllocator : public Matrix
#include <view_matrix_csc_binary.hpp>

Allocates the memory for a two-dimensional view that provides column-wise access to binary values stored in a matrix in the compressed sparse column (CSC) format.

Template Parameters:

Matrix – The type of the view

Subclassed by IterableBinarySparseMatrixDecorator< BinaryCscViewAllocator >

Public Functions

inline BinaryCscViewAllocator(uint32 numNonZeroElements, uint32 numRows, uint32 numCols)
Parameters:
  • numNonZeroElements – The number of non-zero values in the view

  • numRows – The number of rows in the view

  • numCols – The number of columns in the view

inline BinaryCscViewAllocator(const BinaryCscViewAllocator<Matrix> &other)
Parameters:

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

inline BinaryCscViewAllocator(BinaryCscViewAllocator<Matrix> &&other)
Parameters:

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

inline virtual ~BinaryCscViewAllocator() override