pub struct DenseMatrix { /* private fields */ }Expand description
밀집 연접 비용 행렬 (Dense Matrix)
모든 연접 비용을 메모리에 저장하는 구현입니다. 희소 행렬이 아닌 경우에 적합합니다.
Implementations§
Source§impl DenseMatrix
impl DenseMatrix
Sourcepub fn from_vec(
lsize: usize,
rsize: usize,
costs: Vec<i16>,
) -> Result<DenseMatrix, DictError>
pub fn from_vec( lsize: usize, rsize: usize, costs: Vec<i16>, ) -> Result<DenseMatrix, DictError>
Sourcepub fn from_def_file<P>(path: P) -> Result<DenseMatrix, DictError>
pub fn from_def_file<P>(path: P) -> Result<DenseMatrix, DictError>
Sourcepub fn from_def_reader<R>(reader: R) -> Result<DenseMatrix, DictError>where
R: BufRead,
pub fn from_def_reader<R>(reader: R) -> Result<DenseMatrix, DictError>where
R: BufRead,
Sourcepub fn from_bin_file<P>(path: P) -> Result<DenseMatrix, DictError>
pub fn from_bin_file<P>(path: P) -> Result<DenseMatrix, DictError>
Sourcepub fn from_bin_bytes(data: &[u8]) -> Result<DenseMatrix, DictError>
pub fn from_bin_bytes(data: &[u8]) -> Result<DenseMatrix, DictError>
Sourcepub fn from_compressed_file<P>(path: P) -> Result<DenseMatrix, DictError>
pub fn from_compressed_file<P>(path: P) -> Result<DenseMatrix, DictError>
Sourcepub fn to_bin_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bin_bytes(&self) -> Vec<u8> ⓘ
바이너리 형식으로 저장
Sourcepub fn to_bin_file<P>(&self, path: P) -> Result<(), DictError>
pub fn to_bin_file<P>(&self, path: P) -> Result<(), DictError>
Sourcepub fn memory_size(&self) -> usize
pub fn memory_size(&self) -> usize
메모리 사용량 (바이트)
Trait Implementations§
Source§impl Clone for DenseMatrix
impl Clone for DenseMatrix
Source§fn clone(&self) -> DenseMatrix
fn clone(&self) -> DenseMatrix
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 DenseMatrix
impl Debug for DenseMatrix
Auto Trait Implementations§
impl Freeze for DenseMatrix
impl RefUnwindSafe for DenseMatrix
impl Send for DenseMatrix
impl Sync for DenseMatrix
impl Unpin for DenseMatrix
impl UnsafeUnpin for DenseMatrix
impl UnwindSafe for DenseMatrix
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