IVSparse  v1.0
A sparse matrix compression library.
SparseMatrix< T, indexT, 1, columnMajor >::Vector

Constructors

 Vector ()
 
 Vector (IVSparse::SparseMatrix< T, indexT, 1, columnMajor > &mat, uint32_t vec)
 
 Vector (IVSparse::SparseMatrix< T, indexT, 1, columnMajor >::Vector &vec)
 
 ~Vector ()
 

Getters

coeff (uint32_t index)
 
size_t byteSize ()
 
uint32_t innerSize ()
 
uint32_t outerSize ()
 
uint32_t nonZeros ()
 
uint32_t getLength ()
 
T * getValues () const
 
indexT * getInnerIndices () const
 

Utility Methods

void print ()
 

Detailed Description

template<typename T, typename indexT, bool columnMajor>
class IVSparse::SparseMatrix< T, indexT, 1, columnMajor >::Vector

CSC Vector Class

The CSC Vector class is a vector class that is used to work with CSC matrices. It works with the same logic as the corresponding matrix compression level and is useful when working with these matrices.

Constructor & Destructor Documentation

◆ Vector() [1/3]

Vector ( )
inline

Default Vector Constructor

Creates an empty vector with everything set to null/zero.

◆ Vector() [2/3]

Vector ( IVSparse::SparseMatrix< T, indexT, 1, columnMajor > &  mat,
uint32_t  vec 
)

IVSparse Matrix to Vector Constructor

Creates a vector from a CSC Matrix at the given vector index.

Note
Can only get a vector from a matrix in the storage order of the matrix.

◆ Vector() [3/3]

Vector ( IVSparse::SparseMatrix< T, indexT, 1, columnMajor >::Vector &  vec)

Deep Copy Vector Constructor

Creates a deep copy of the given vector.

◆ ~Vector()

Destroys the vector.

Member Function Documentation

◆ coeff()

T coeff ( uint32_t  index)
Returns
The coefficient at the given index.

◆ byteSize()

size_t byteSize
Returns
The size of the vector in bytes.

◆ innerSize()

uint32_t innerSize
Returns
The inner size of the vector.

◆ outerSize()

uint32_t outerSize
Returns
The outer size of the vector.

◆ nonZeros()

uint32_t nonZeros
Returns
The number of non-zero elements in the vector.

◆ getLength()

uint32_t getLength
Returns
The length of the vector.

◆ getValues()

T * getValues
Returns
A pointer to the values of the vector.

◆ getInnerIndices()

indexT * getInnerIndices
Returns
A pointer to the inner indices of the vector.

◆ print()

void print

Prints the vector dense to the console.