pub struct SparseMatrix<T: ValueType> { /* private fields */ }Implementations§
source§impl<T: ValueType> SparseMatrix<T>
impl<T: ValueType> SparseMatrix<T>
pub fn new( context: &Arc<Context>, size: &Size ) -> Result<Self, SparseLinearAlgebraError>
pub unsafe fn from_graphblas_matrix( context: &Arc<Context>, matrix: GrB_Matrix ) -> Result<SparseMatrix<T>, SparseLinearAlgebraError>
Trait Implementations§
source§impl<T: ValueType> Clone for SparseMatrix<T>
impl<T: ValueType> Clone for SparseMatrix<T>
source§impl<T: ValueType> Collection for SparseMatrix<T>
impl<T: ValueType> Collection for SparseMatrix<T>
fn clear(&mut self) -> Result<(), SparseLinearAlgebraError>
fn number_of_stored_elements( &self ) -> Result<ElementIndex, SparseLinearAlgebraError>
source§impl Display for SparseMatrix<bool>
impl Display for SparseMatrix<bool>
source§impl Display for SparseMatrix<f32>
impl Display for SparseMatrix<f32>
source§impl Display for SparseMatrix<f64>
impl Display for SparseMatrix<f64>
source§impl Display for SparseMatrix<i16>
impl Display for SparseMatrix<i16>
source§impl Display for SparseMatrix<i32>
impl Display for SparseMatrix<i32>
source§impl Display for SparseMatrix<i64>
impl Display for SparseMatrix<i64>
source§impl Display for SparseMatrix<i8>
impl Display for SparseMatrix<i8>
source§impl Display for SparseMatrix<isize>
impl Display for SparseMatrix<isize>
source§impl Display for SparseMatrix<u16>
impl Display for SparseMatrix<u16>
source§impl Display for SparseMatrix<u32>
impl Display for SparseMatrix<u32>
source§impl Display for SparseMatrix<u64>
impl Display for SparseMatrix<u64>
source§impl Display for SparseMatrix<u8>
impl Display for SparseMatrix<u8>
source§impl Display for SparseMatrix<usize>
impl Display for SparseMatrix<usize>
source§impl<T: ValueType> Drop for SparseMatrix<T>
impl<T: ValueType> Drop for SparseMatrix<T>
source§impl<T: ValueType> DropMatrixElement for SparseMatrix<T>
impl<T: ValueType> DropMatrixElement for SparseMatrix<T>
fn drop_element( &mut self, coordinate: Coordinate ) -> Result<(), SparseLinearAlgebraError>
source§impl<T: ValueType> FromDiagonalVector<T> for SparseMatrix<T>
impl<T: ValueType> FromDiagonalVector<T> for SparseMatrix<T>
source§fn from_diagonal_vector(
context: &Arc<Context>,
diagonal: &SparseVector<T>,
diagonal_index: &DiagonalIndex
) -> Result<SparseMatrix<T>, SparseLinearAlgebraError>
fn from_diagonal_vector( context: &Arc<Context>, diagonal: &SparseVector<T>, diagonal_index: &DiagonalIndex ) -> Result<SparseMatrix<T>, SparseLinearAlgebraError>
Returns a square matrix
source§fn from_diagonal_vector_untyped(
context: &Arc<Context>,
diagonal: &(impl GetGraphblasSparseVector + GetContext + GetSparseVectorLength),
diagonal_index: &DiagonalIndex
) -> Result<SparseMatrix<T>, SparseLinearAlgebraError>
fn from_diagonal_vector_untyped( context: &Arc<Context>, diagonal: &(impl GetGraphblasSparseVector + GetContext + GetSparseVectorLength), diagonal_index: &DiagonalIndex ) -> Result<SparseMatrix<T>, SparseLinearAlgebraError>
The type of the diagonal must match the type of the returned SparseMarix
source§impl FromMatrixElementList<bool> for SparseMatrix<bool>
impl FromMatrixElementList<bool> for SparseMatrix<bool>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<bool>, reduction_operator_for_duplicates: &impl BinaryOperator<bool> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<f32> for SparseMatrix<f32>
impl FromMatrixElementList<f32> for SparseMatrix<f32>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<f32>, reduction_operator_for_duplicates: &impl BinaryOperator<f32> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<f64> for SparseMatrix<f64>
impl FromMatrixElementList<f64> for SparseMatrix<f64>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<f64>, reduction_operator_for_duplicates: &impl BinaryOperator<f64> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<i16> for SparseMatrix<i16>
impl FromMatrixElementList<i16> for SparseMatrix<i16>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<i16>, reduction_operator_for_duplicates: &impl BinaryOperator<i16> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<i32> for SparseMatrix<i32>
impl FromMatrixElementList<i32> for SparseMatrix<i32>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<i32>, reduction_operator_for_duplicates: &impl BinaryOperator<i32> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<i64> for SparseMatrix<i64>
impl FromMatrixElementList<i64> for SparseMatrix<i64>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<i64>, reduction_operator_for_duplicates: &impl BinaryOperator<i64> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<i8> for SparseMatrix<i8>
impl FromMatrixElementList<i8> for SparseMatrix<i8>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<i8>, reduction_operator_for_duplicates: &impl BinaryOperator<i8> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<isize> for SparseMatrix<isize>
impl FromMatrixElementList<isize> for SparseMatrix<isize>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<isize>, reduction_operator_for_duplicates: &impl BinaryOperator<isize> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<u16> for SparseMatrix<u16>
impl FromMatrixElementList<u16> for SparseMatrix<u16>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<u16>, reduction_operator_for_duplicates: &impl BinaryOperator<u16> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<u32> for SparseMatrix<u32>
impl FromMatrixElementList<u32> for SparseMatrix<u32>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<u32>, reduction_operator_for_duplicates: &impl BinaryOperator<u32> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<u64> for SparseMatrix<u64>
impl FromMatrixElementList<u64> for SparseMatrix<u64>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<u64>, reduction_operator_for_duplicates: &impl BinaryOperator<u64> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<u8> for SparseMatrix<u8>
impl FromMatrixElementList<u8> for SparseMatrix<u8>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<u8>, reduction_operator_for_duplicates: &impl BinaryOperator<u8> ) -> Result<Self, SparseLinearAlgebraError>
source§impl FromMatrixElementList<usize> for SparseMatrix<usize>
impl FromMatrixElementList<usize> for SparseMatrix<usize>
fn from_element_list( context: &Arc<Context>, size: &Size, elements: &MatrixElementList<usize>, reduction_operator_for_duplicates: &impl BinaryOperator<usize> ) -> Result<Self, SparseLinearAlgebraError>
source§impl<T: ValueType> GetContext for SparseMatrix<T>
impl<T: ValueType> GetContext for SparseMatrix<T>
source§impl<T: ValueType> GetGraphblasSparseMatrix for SparseMatrix<T>
impl<T: ValueType> GetGraphblasSparseMatrix for SparseMatrix<T>
unsafe fn graphblas_matrix(&self) -> GrB_Matrix
unsafe fn graphblas_matrix_ref(&self) -> &GrB_Matrix
unsafe fn graphblas_matrix_mut_ref(&mut self) -> &mut GrB_Matrix
source§impl<T: ValueType + Default + GetMatrixElementValueTyped<T>> GetMatrixElement<T> for SparseMatrix<T>
impl<T: ValueType + Default + GetMatrixElementValueTyped<T>> GetMatrixElement<T> for SparseMatrix<T>
fn get_element( &self, coordinate: Coordinate ) -> Result<Option<MatrixElement<T>>, SparseLinearAlgebraError>
fn get_element_or_default( &self, coordinate: Coordinate ) -> Result<MatrixElement<T>, SparseLinearAlgebraError>
source§impl<T: ValueType + GetMatrixElementListTyped<T>> GetMatrixElementList<T> for SparseMatrix<T>
impl<T: ValueType + GetMatrixElementListTyped<T>> GetMatrixElementList<T> for SparseMatrix<T>
fn get_element_list( &self ) -> Result<MatrixElementList<T>, SparseLinearAlgebraError>
source§impl<T: ValueType + Default + GetMatrixElementValueTyped<T>> GetMatrixElementValue<T> for SparseMatrix<T>
impl<T: ValueType + Default + GetMatrixElementValueTyped<T>> GetMatrixElementValue<T> for SparseMatrix<T>
fn get_element_value( &self, coordinate: &Coordinate ) -> Result<Option<T>, SparseLinearAlgebraError>
fn get_element_value_or_default( &self, coordinate: &Coordinate ) -> Result<T, SparseLinearAlgebraError>
source§impl<T: ValueType> GetMatrixSize for SparseMatrix<T>
impl<T: ValueType> GetMatrixSize for SparseMatrix<T>
fn column_width(&self) -> Result<ElementIndex, SparseLinearAlgebraError>
fn row_height(&self) -> Result<ElementIndex, SparseLinearAlgebraError>
fn size(&self) -> Result<Size, SparseLinearAlgebraError>
source§impl<T: ValueType> IsMatrixElement for SparseMatrix<T>
impl<T: ValueType> IsMatrixElement for SparseMatrix<T>
fn is_element( &self, coordinate: Coordinate ) -> Result<bool, SparseLinearAlgebraError>
fn try_is_element( &self, coordinate: Coordinate ) -> Result<(), SparseLinearAlgebraError>
source§impl<T: ValueType> MatrixMask for SparseMatrix<T>
impl<T: ValueType> MatrixMask for SparseMatrix<T>
unsafe fn graphblas_matrix(&self) -> GrB_Matrix
source§impl<T: ValueType> ResizeMatrix for SparseMatrix<T>
impl<T: ValueType> ResizeMatrix for SparseMatrix<T>
source§impl<T: ValueType + SetMatrixElementTyped<T>> SetMatrixElement<T> for SparseMatrix<T>
impl<T: ValueType + SetMatrixElementTyped<T>> SetMatrixElement<T> for SparseMatrix<T>
fn set_element( &mut self, element: MatrixElement<T> ) -> Result<(), SparseLinearAlgebraError>
source§impl<T: ValueType, B: BinaryOperator<T> + ReturnsBool> SortSparseMatrix<T, B> for SparseMatrix<T>
impl<T: ValueType, B: BinaryOperator<T> + ReturnsBool> SortSparseMatrix<T, B> for SparseMatrix<T>
fn sort_rows( &mut self, sort_operator: &B ) -> Result<(), SparseLinearAlgebraError>
fn sort_columns( &mut self, sort_operator: &B ) -> Result<(), SparseLinearAlgebraError>
fn sorted_rows_and_indices( &self, sorted_values: &mut SparseMatrix<T>, indices_to_sort_rows: &mut SparseMatrix<ElementIndex>, sort_operator: &B ) -> Result<(), SparseLinearAlgebraError>
fn sorted_columns_and_indices( &self, sorted_values: &mut SparseMatrix<T>, indices_to_sort_columns: &mut SparseMatrix<ElementIndex>, sort_operator: &B ) -> Result<(), SparseLinearAlgebraError>
fn sorted_rows( &self, sort_operator: &B ) -> Result<SparseMatrix<T>, SparseLinearAlgebraError>
fn sorted_columns( &self, sort_operator: &B ) -> Result<SparseMatrix<T>, SparseLinearAlgebraError>
fn indices_to_sort_rows( &self, sort_operator: &B ) -> Result<SparseMatrix<ElementIndex>, SparseLinearAlgebraError>
fn indices_to_sort_columns( &self, sort_operator: &B ) -> Result<SparseMatrix<ElementIndex>, SparseLinearAlgebraError>
impl<T: ValueType> Send for SparseMatrix<T>
impl<T: ValueType> Sync for SparseMatrix<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for SparseMatrix<T>where T: RefUnwindSafe,
impl<T> Unpin for SparseMatrix<T>where T: Unpin,
impl<T> UnwindSafe for SparseMatrix<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more