Trait lophat::algorithms::Decomposition
source · pub trait Decomposition<C>where
C: Column,{
type RColRef<'a>: Deref<Target = C> + 'a
where Self: 'a;
type VColRef<'a>: Deref<Target = C> + 'a
where Self: 'a;
// Required methods
fn get_r_col<'a>(&'a self, index: usize) -> Self::RColRef<'a>;
fn get_v_col<'a>(
&'a self,
index: usize
) -> Result<Self::VColRef<'a>, NoVMatrixError>;
fn n_cols(&self) -> usize;
// Provided methods
fn diagram(&self) -> PersistenceDiagram { ... }
fn has_v(&self) -> bool { ... }
}
Expand description
A struct implementing this trait represents the output of an R=DV decomposition of a matrix D and is typically constructed by DecompositionAlgo::decompose
.
The main required methods are get_r_col
and get_v_col
, which return immutable references to columns of the R and V matrix respectively.
Given these methods, the persistence diagram can be computed via the provided diagram
method.
Required Associated Types§
Required Methods§
sourcefn get_r_col<'a>(&'a self, index: usize) -> Self::RColRef<'a>
fn get_r_col<'a>(&'a self, index: usize) -> Self::RColRef<'a>
Returns a reference to the column in position index
of R, in the decomposition
Provided Methods§
sourcefn diagram(&self) -> PersistenceDiagram
fn diagram(&self) -> PersistenceDiagram
Uses the methods implemented by this trait to read-off the column pairings which constiute the persistence diagram.
Object Safety§
This trait is not object safe.