pub struct PersistenceProgram { /* private fields */ }Expand description
Exact H0 and H1 program compiled over sparse graph atoms.
Implementations§
Source§impl PersistenceProgram
impl PersistenceProgram
Sourcepub fn kill_h1_before(
&self,
target: IntervalGroupId,
target_scale: f64,
budget: InterventionBudget,
) -> Result<H1Intervention, Error>
pub fn kill_h1_before( &self, target: IntervalGroupId, target_scale: f64, budget: InterventionBudget, ) -> Result<H1Intervention, Error>
Find an independent-weight edit that shortens one finite H1 class space.
The target must satisfy birth < target_scale < death. The candidate
lowers every edge above target_scale in every declared destroyer
triangle. Optimal is relative to the same reduction and critical-pair
certificate. It is not a global inverse persistence claim across
unrelated pairings.
Source§impl PersistenceProgram
impl PersistenceProgram
Sourcepub fn compile(
input: &SparseDistanceMatrix,
params: &RipsParams,
limits: CertificateLimits,
) -> Result<Self>
pub fn compile( input: &SparseDistanceMatrix, params: &RipsParams, limits: CertificateLimits, ) -> Result<Self>
Compile a compositional H0 and H1 program.
Each cyclic atom receives its own reduction certificate. Graphs without a useful split remain one exact atom.
Source§impl PersistenceProgram
impl PersistenceProgram
Sourcepub fn into_diagram_state(self) -> ProgramDiagramState
pub fn into_diagram_state(self) -> ProgramDiagramState
Move a compiled program into stateful diagram evaluation.
Source§impl PersistenceProgram
impl PersistenceProgram
Sourcepub fn result(&self) -> &ExplainedDiagram
pub fn result(&self) -> &ExplainedDiagram
Exact current result.
Sourcepub fn summary(&self) -> ProgramSummary
pub fn summary(&self) -> ProgramSummary
Program decomposition and guard counts.
Sourcepub fn atoms(&self) -> &[ProgramAtomInfo]
pub fn atoms(&self) -> &[ProgramAtomInfo]
All structural atoms, including bridge atoms.
Sourcepub fn checkpoint(&self) -> ProgramCheckpoint
pub fn checkpoint(&self) -> ProgramCheckpoint
Capture the current state for later restore or branching.
Sourcepub fn restore(&mut self, checkpoint: &ProgramCheckpoint)
pub fn restore(&mut self, checkpoint: &ProgramCheckpoint)
Replace this program with a captured state.
Sourcepub fn advance_batch(
&mut self,
updates: &[SparseDistanceMatrix],
) -> Result<Vec<ProgramUpdate>>
pub fn advance_batch( &mut self, updates: &[SparseDistanceMatrix], ) -> Result<Vec<ProgramUpdate>>
Advance an ordered batch atomically.
If one update fails, the program is left unchanged.
Sourcepub fn advance_batch_with(
&mut self,
updates: &[SparseDistanceMatrix],
correspondence_mode: CorrespondenceMode,
) -> Result<Vec<ProgramUpdate>>
pub fn advance_batch_with( &mut self, updates: &[SparseDistanceMatrix], correspondence_mode: CorrespondenceMode, ) -> Result<Vec<ProgramUpdate>>
Advance an ordered batch atomically with correspondence control.
Sourcepub fn branch(
&self,
alternatives: &[SparseDistanceMatrix],
) -> Result<Vec<ProgramBranch>>
pub fn branch( &self, alternatives: &[SparseDistanceMatrix], ) -> Result<Vec<ProgramBranch>>
Advance independent alternatives from the current state.
Output order matches input order. The program is left unchanged. With more than one configured thread, alternatives run concurrently.
Sourcepub fn branch_with(
&self,
alternatives: &[SparseDistanceMatrix],
correspondence_mode: CorrespondenceMode,
) -> Result<Vec<ProgramBranch>>
pub fn branch_with( &self, alternatives: &[SparseDistanceMatrix], correspondence_mode: CorrespondenceMode, ) -> Result<Vec<ProgramBranch>>
Advance independent alternatives with correspondence control.
Sourcepub fn evaluate_diagram(
&self,
updated: &SparseDistanceMatrix,
) -> Result<ProgramEvaluation>
pub fn evaluate_diagram( &self, updated: &SparseDistanceMatrix, ) -> Result<ProgramEvaluation>
Evaluate only the diagram while every touched certificate remains valid.
Sourcepub fn advance(
&mut self,
updated: &SparseDistanceMatrix,
) -> Result<ProgramUpdate>
pub fn advance( &mut self, updated: &SparseDistanceMatrix, ) -> Result<ProgramUpdate>
Advance to new weights with exact class correspondence.
Sourcepub fn advance_with(
&mut self,
updated: &SparseDistanceMatrix,
correspondence_mode: CorrespondenceMode,
) -> Result<ProgramUpdate>
pub fn advance_with( &mut self, updated: &SparseDistanceMatrix, correspondence_mode: CorrespondenceMode, ) -> Result<ProgramUpdate>
Advance with explicit control over cross-state class correspondence.
Trait Implementations§
Source§impl Clone for PersistenceProgram
impl Clone for PersistenceProgram
Source§fn clone(&self) -> PersistenceProgram
fn clone(&self) -> PersistenceProgram
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PersistenceProgram
impl RefUnwindSafe for PersistenceProgram
impl Send for PersistenceProgram
impl Sync for PersistenceProgram
impl Unpin for PersistenceProgram
impl UnsafeUnpin for PersistenceProgram
impl UnwindSafe for PersistenceProgram
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
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> ⓘ
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 more