Struct matrix::CompressedMatrix [] [src]

pub struct CompressedMatrix<T> {
    pub rows: usize,
    pub columns: usize,
    pub nonzeros: usize,
    pub format: CompressedFormat,
    pub data: Vec<T>,
    pub indices: Vec<usize>,
    pub offsets: Vec<usize>,
}

A compressed matrix.

Data are stored in one of the following formats:

Fields

rows: usize

The number of rows.

columns: usize

The number of columns.

nonzeros: usize

The number of nonzero elements.

format: CompressedFormat

The storage format.

data: Vec<T>

The values of the nonzero elements.

indices: Vec<usize>

The indices of columns (rows) the nonzero elements.

offsets: Vec<usize>

The offsets of columns (rows) such that the values and indices of the ith column (row) are stored starting from data[j] and indices[j], respectively, where j = offsets[i]. The vector has one additional element, which is always equal to nonzeros, that is, offsets[columns] = nonzeros (offsets[rows] = nonzeros).

Trait Implementations

impl<T: Debug> Debug for CompressedMatrix<T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.