pub struct SparseMatrix { /* private fields */ }Expand description
희소 연접 비용 행렬 (Sparse Matrix)
희소 행렬을 효율적으로 저장하는 구현입니다. 대부분의 값이 기본값인 경우 메모리를 절약합니다.
Implementations§
Source§impl SparseMatrix
impl SparseMatrix
Sourcepub fn from_dense(dense: &DenseMatrix, default_cost: i16) -> SparseMatrix
pub fn from_dense(dense: &DenseMatrix, default_cost: i16) -> SparseMatrix
DenseMatrix에서 변환 (기본값과 다른 엔트리만 저장)
Sourcepub fn to_dense(&self) -> DenseMatrix
pub fn to_dense(&self) -> DenseMatrix
DenseMatrix로 변환
Sourcepub fn entry_count_stored(&self) -> usize
pub fn entry_count_stored(&self) -> usize
엔트리 수
Sourcepub fn memory_size(&self) -> usize
pub fn memory_size(&self) -> usize
메모리 사용량 (바이트, 대략적)
Trait Implementations§
Source§impl Clone for SparseMatrix
impl Clone for SparseMatrix
Source§fn clone(&self) -> SparseMatrix
fn clone(&self) -> SparseMatrix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SparseMatrix
impl Debug for SparseMatrix
Auto Trait Implementations§
impl Freeze for SparseMatrix
impl RefUnwindSafe for SparseMatrix
impl Send for SparseMatrix
impl Sync for SparseMatrix
impl Unpin for SparseMatrix
impl UnsafeUnpin for SparseMatrix
impl UnwindSafe for SparseMatrix
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> ConnectionCost for Twhere
T: Matrix,
impl<T> ConnectionCost for Twhere
T: Matrix,
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