[−][src]Trait shine_graph::smat::MatrixMask
Sparse (Square) Row matrix mask to manage the location of the non-zero items
Required methods
fn clear(&mut self)
Remove all the items.
fn add(&mut self, row: usize, column: usize) -> (DataPosition, bool)
Store an item and return a tuple where
- the first item is its position in the flattened array
- the second item is true if it was an unoccupied item, false otherwise.
fn remove(
&mut self,
row: usize,
column: usize
) -> Option<(DataPosition, DataRange)>
&mut self,
row: usize,
column: usize
) -> Option<(DataPosition, DataRange)>
Remove an item and return its position in the flattened array and the new range for the this row
fn get_data_range(&self, row: usize) -> DataRange
Return the range of position for the given row in the flattened array.
fn lower_bound_column_position(
&self,
column: usize,
range: DataRange
) -> Option<(usize, DataPosition)>
&self,
column: usize,
range: DataRange
) -> Option<(usize, DataPosition)>
Find the first valid column index and its position that is not less than the provided index.
fn get_column_index(&self, pos: DataPosition) -> usize
Gets the column index of item stored at the given position in the flattend array.
Implementors
impl MatrixMask for CSMatrixMask
[src]
fn clear(&mut self)
[src]
fn add(&mut self, row: usize, column: usize) -> (DataPosition, bool)
[src]
fn remove(
&mut self,
row: usize,
column: usize
) -> Option<(DataPosition, DataRange)>
[src]
&mut self,
row: usize,
column: usize
) -> Option<(DataPosition, DataRange)>
fn get_data_range(&self, row: usize) -> DataRange
[src]
fn lower_bound_column_position(
&self,
column: usize,
range: DataRange
) -> Option<(usize, DataPosition)>
[src]
&self,
column: usize,
range: DataRange
) -> Option<(usize, DataPosition)>
fn get_column_index(&self, pos: DataPosition) -> usize
[src]
impl MatrixMask for HCSMatrixMask
[src]
fn clear(&mut self)
[src]
fn add(&mut self, _major: usize, _minor: usize) -> (DataPosition, bool)
[src]
fn remove(
&mut self,
_major: usize,
_minor: usize
) -> Option<(DataPosition, DataRange)>
[src]
&mut self,
_major: usize,
_minor: usize
) -> Option<(DataPosition, DataRange)>
fn get_data_range(&self, _major: usize) -> DataRange
[src]
fn lower_bound_column_position(
&self,
_column: usize,
_range: DataRange
) -> Option<(usize, DataPosition)>
[src]
&self,
_column: usize,
_range: DataRange
) -> Option<(usize, DataPosition)>