pub struct ProgramDiagramState { /* private fields */ }Expand description
Stateful diagram evaluation with lazy materialization of class spaces.
Implementations§
Source§impl ProgramDiagramState
impl ProgramDiagramState
Sourcepub fn from_program(program: &PersistenceProgram) -> Self
pub fn from_program(program: &PersistenceProgram) -> Self
Copy a compiled program into stateful diagram evaluation.
Sourcepub fn advance(
&mut self,
updated: &SparseDistanceMatrix,
) -> Result<ProgramDiagramUpdate>
pub fn advance( &mut self, updated: &SparseDistanceMatrix, ) -> Result<ProgramDiagramUpdate>
Advance the state and return only the exact persistence diagram.
Sourcepub fn materialize(&mut self) -> Result<&ExplainedDiagram>
pub fn materialize(&mut self) -> Result<&ExplainedDiagram>
Materialize the current canonical class spaces and critical pairs.
Sourcepub fn into_program(self) -> Result<PersistenceProgram>
pub fn into_program(self) -> Result<PersistenceProgram>
Materialize and consume this state as a normal persistence program.
This method consumes the state even when materialization returns an
error. Call ProgramDiagramState::materialize when the state must
remain available after a failed operation.
Trait Implementations§
Source§impl Clone for ProgramDiagramState
impl Clone for ProgramDiagramState
Source§fn clone(&self) -> ProgramDiagramState
fn clone(&self) -> ProgramDiagramState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProgramDiagramState
impl RefUnwindSafe for ProgramDiagramState
impl Send for ProgramDiagramState
impl Sync for ProgramDiagramState
impl Unpin for ProgramDiagramState
impl UnsafeUnpin for ProgramDiagramState
impl UnwindSafe for ProgramDiagramState
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> 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