Skip to main content

SparseFormat

Trait SparseFormat 

Source
pub trait SparseFormat:
    Sealed
    + Send
    + Sync
    + 'static {
    type Storage<'a, T: 'a>: SparseShape;

    const NAME: &'static str;
}
Expand description

Marker trait for sparse matrix storage formats.

Sealed to prevent external format implementations. The GAT Storage<'a, T> maps this format marker to its concrete data struct, eliminating the need for an internal enum discriminant.

Required Associated Constants§

Source

const NAME: &'static str

Human-readable format name for diagnostics.

Required Associated Types§

Source

type Storage<'a, T: 'a>: SparseShape

The concrete data struct type for this format, parameterized by lifetime 'a and element type T.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SparseFormat for Csr

Source§

const NAME: &'static str = "CSR"

Source§

type Storage<'a, T: 'a> = CsrMatrix<T, &'a [T], &'a [i32]>

Source§

impl SparseFormat for DenseWithMask

Source§

const NAME: &'static str = "DenseWithMask"

Source§

type Storage<'a, T: 'a> = DenseWithMaskMatrix<T, &'a [T], &'a [bool]>

Source§

impl<F> SparseFormat for Validated<F>
where F: SparseFormat,

Source§

const NAME: &'static str = F::NAME

Source§

type Storage<'a, T: 'a> = ValidatedData<<F as SparseFormat>::Storage<'a, T>>

Source§

impl<const BM: usize, const BN: usize> SparseFormat for BlockedCoo<BM, BN>

Source§

const NAME: &'static str = "Blocked-COO"

Source§

type Storage<'a, T: 'a> = BlockedCooMatrix<T, BM, BN, &'a [T], &'a [i32]>

Source§

impl<const C: usize> SparseFormat for SellP<C>

Source§

const NAME: &'static str = "SELL-p"

Source§

type Storage<'a, T: 'a> = SellPMatrix<T, C, &'a [T], &'a [i32]>