Struct npyz::sparse::BsrBase [−][src]
pub struct BsrBase<T, Data, Indices, Indptr> where
Data: Deref<Target = [T]>,
Indices: AsRef<[u64]>,
Indptr: AsRef<[usize]>, { pub shape: [u64; 2], pub blocksize: [usize; 2], pub data: Data, pub indices: Indices, pub indptr: Indptr, }
Expand description
Raw representation of a scipy.sparse.bsr_matrix
.
In spirit, each field is simply a Vec. (see the type alias Bsr
).
This generic base class exists in order to allow you to use slices when writing.
Fields
shape: [u64; 2]
Dimensions of the matrix [nrow, ncol]
.
These dimensions must be divisible by the respective elements of blocksize
.
blocksize: [usize; 2]
Size of the blocks in the matrix.
data: Data
Contains the C-order data of a shape [nnzb, block_nrow, block_ncol]
ndarray.
(effectively concatenating the flattened data of all nonzero blocks, sorted by superrow)
indices: Indices
A vector of length nnzb
indicating the supercolumn index of each block.
Beware: scipy does not require or guarantee that the column indices within each row are sorted.
indptr: Indptr
A vector of length (nrow / block_nrow) + 1
indicating the indices which partition
Self::indices
and the outermost axis of Self::data
into data for each superrow.
Typically, the elements are nondecreasing, with the first equal to 0 and the final equal
to nnzb
(though the set of requirements that are actually validated by scipy are
weaker and somewhat arbitrary).
Implementations
Trait Implementations
impl<T: Eq, Data: Eq, Indices: Eq, Indptr: Eq> Eq for BsrBase<T, Data, Indices, Indptr> where
Data: Deref<Target = [T]>,
Indices: AsRef<[u64]>,
Indptr: AsRef<[usize]>,
Auto Trait Implementations
impl<T, Data, Indices, Indptr> RefUnwindSafe for BsrBase<T, Data, Indices, Indptr> where
Data: RefUnwindSafe,
Indices: RefUnwindSafe,
Indptr: RefUnwindSafe,
impl<T, Data, Indices, Indptr> Send for BsrBase<T, Data, Indices, Indptr> where
Data: Send,
Indices: Send,
Indptr: Send,
impl<T, Data, Indices, Indptr> Sync for BsrBase<T, Data, Indices, Indptr> where
Data: Sync,
Indices: Sync,
Indptr: Sync,
impl<T, Data, Indices, Indptr> Unpin for BsrBase<T, Data, Indices, Indptr> where
Data: Unpin,
Indices: Unpin,
Indptr: Unpin,
impl<T, Data, Indices, Indptr> UnwindSafe for BsrBase<T, Data, Indices, Indptr> where
Data: UnwindSafe,
Indices: UnwindSafe,
Indptr: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more