pub struct MmapMatrix { /* private fields */ }Expand description
메모리 맵 연접 비용 행렬 (Memory-Mapped Matrix)
대용량 행렬을 메모리 맵으로 로드하여 효율적으로 접근합니다. 프로세스 간 메모리 공유가 가능합니다.
§Safety
이 구조체는 메모리 맵을 사용하므로 내부적으로 unsafe 코드가 필요합니다. 파일이 외부에서 수정되지 않아야 합니다.
Implementations§
Source§impl MmapMatrix
impl MmapMatrix
Sourcepub fn from_file<P>(path: P) -> Result<MmapMatrix, DictError>
pub fn from_file<P>(path: P) -> Result<MmapMatrix, DictError>
Sourcepub fn from_compressed_file<P>(path: P) -> Result<DenseMatrix, DictError>
pub fn from_compressed_file<P>(path: P) -> Result<DenseMatrix, DictError>
압축된 파일에서 로드 (메모리에 전체 압축 해제)
압축 파일은 메모리 맵이 아닌 전체 압축 해제 후 로드됩니다.
§Errors
파일을 읽거나 압축 해제할 수 없는 경우 에러를 반환합니다.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MmapMatrix
impl RefUnwindSafe for MmapMatrix
impl Send for MmapMatrix
impl Sync for MmapMatrix
impl Unpin for MmapMatrix
impl UnsafeUnpin for MmapMatrix
impl UnwindSafe for MmapMatrix
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> 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