pub struct BorderGramCheckpoint {
pub border_dim: usize,
pub n_rows: usize,
pub chunk_size: usize,
pub frontier: usize,
pub block_partial: Option<Vec<f64>>,
pub block_len: usize,
pub forest: Vec<(usize, Vec<f64>)>,
pub pending: Vec<(usize, Vec<f64>)>,
}Expand description
Serializable accumulation state of a StreamingBorderGram: the partial
Grams plus the chunk cursor. Writing this to disk after every accepted
chunk makes a preempted multi-hour pass resumable instead of restartable;
StreamingBorderGram::resume reconstructs the accumulator with
bit-identical future behavior (resume-equals-straight-through).
Fields§
§border_dim: usizeBorder dimension k (columns of every submitted chunk).
n_rows: usizeTotal row count of the full pass.
chunk_size: usizeFixed chunk size (rows per chunk; the last chunk may be shorter).
frontier: usizeChunk cursor: number of chunks already folded into the in-order
cascade. Chunk indices < frontier are consumed; the next in-order
fold is chunk frontier.
block_partial: Option<Vec<f64>>Sequential partial of the current (unsealed) cross-chunk base block,
flattened k·k row-major. None iff block_len == 0.
block_len: usizeNumber of chunk partials folded into block_partial
(0..CROSS_CHUNK_BASE).
forest: Vec<(usize, Vec<f64>)>Completed cascade subtrees: (weight in chunks, flattened k·k partial)
with strictly decreasing power-of-two-multiple-of-base weights, bottom
to top — exactly the StreamingPairwise forest invariant.
pending: Vec<(usize, Vec<f64>)>Out-of-order chunk partials waiting for the frontier to reach them:
(chunk_index, flattened k·k chunk Gram), all indices > frontier.
Trait Implementations§
Source§impl Clone for BorderGramCheckpoint
impl Clone for BorderGramCheckpoint
Source§fn clone(&self) -> BorderGramCheckpoint
fn clone(&self) -> BorderGramCheckpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BorderGramCheckpoint
impl Debug for BorderGramCheckpoint
Source§impl<'de> Deserialize<'de> for BorderGramCheckpoint
impl<'de> Deserialize<'de> for BorderGramCheckpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for BorderGramCheckpoint
impl PartialEq for BorderGramCheckpoint
Source§fn eq(&self, other: &BorderGramCheckpoint) -> bool
fn eq(&self, other: &BorderGramCheckpoint) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for BorderGramCheckpoint
impl Serialize for BorderGramCheckpoint
impl StructuralPartialEq for BorderGramCheckpoint
Auto Trait Implementations§
impl Freeze for BorderGramCheckpoint
impl RefUnwindSafe for BorderGramCheckpoint
impl Send for BorderGramCheckpoint
impl Sync for BorderGramCheckpoint
impl Unpin for BorderGramCheckpoint
impl UnsafeUnpin for BorderGramCheckpoint
impl UnwindSafe for BorderGramCheckpoint
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.