pub struct CsrMatrix {
pub row_ptr: Vec<usize>,
pub col_ind: Vec<usize>,
pub values: Vec<f64>,
pub nrows: usize,
pub ncols: usize,
}Expand description
行圧縮形式(CSR: Compressed Sparse Row)の疎行列
非ゼロ要素を行単位で格納する疎行列フォーマット。 行ポインタ・列インデックス・値の3配列で表現される。
§フォーマット詳細
行 i の非ゼロ要素は values[row_ptr[i]..row_ptr[i+1]] に格納され、
対応する列インデックスは col_ind[row_ptr[i]..row_ptr[i+1]] に入る。
各行の列インデックスは昇順にソートされている。
Fields§
§row_ptr: Vec<usize>行ポインタ配列(長さ: nrows + 1)
row_ptr[i] は行 i の最初の非ゼロ要素の位置を示す
col_ind: Vec<usize>各非ゼロ要素の列インデックス
values: Vec<f64>各非ゼロ要素の値
nrows: usize行数
ncols: usize列数
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CsrMatrix
impl RefUnwindSafe for CsrMatrix
impl Send for CsrMatrix
impl Sync for CsrMatrix
impl Unpin for CsrMatrix
impl UnsafeUnpin for CsrMatrix
impl UnwindSafe for CsrMatrix
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more