pub trait ChainComplex: Send + Sync {
type Algebra: Algebra;
type Module: Module<Algebra = Self::Algebra>;
type Homomorphism: ModuleHomomorphism<Source = Self::Module, Target = Self::Module>;
Show 13 methods
// Required methods
fn algebra(&self) -> Arc<Self::Algebra>;
fn min_degree(&self) -> i32;
fn zero_module(&self) -> Arc<Self::Module>;
fn module(&self, homological_degree: i32) -> Arc<Self::Module>;
fn differential(&self, s: i32) -> Arc<Self::Homomorphism>;
fn has_computed_bidegree(&self, b: Bidegree) -> bool;
fn compute_through_bidegree(&self, b: Bidegree);
fn next_homological_degree(&self) -> i32;
// Provided methods
fn prime(&self) -> ValidPrime { ... }
fn iter_stem(&self) -> StemIterator<'_, Self> ⓘ { ... }
fn apply_quasi_inverse<T, S>(
&self,
results: &mut [T],
b: Bidegree,
inputs: &[S],
) -> bool
where for<'a> &'a mut T: Into<FpSliceMut<'a>>,
for<'a> &'a S: Into<FpSlice<'a>> { ... }
fn save_dir(&self) -> &SaveDirectory { ... }
fn save_file(&self, kind: SaveKind, b: Bidegree) -> SaveFile<Self::Algebra> { ... }
}Expand description
A chain complex is defined to start in degree 0. The min_degree is the min_degree of the modules in the chain complex, all of which must be the same.
Required Associated Types§
type Algebra: Algebra
type Module: Module<Algebra = Self::Algebra>
type Homomorphism: ModuleHomomorphism<Source = Self::Module, Target = Self::Module>
Required Methods§
fn algebra(&self) -> Arc<Self::Algebra>
fn min_degree(&self) -> i32
fn zero_module(&self) -> Arc<Self::Module>
fn module(&self, homological_degree: i32) -> Arc<Self::Module>
Sourcefn differential(&self, s: i32) -> Arc<Self::Homomorphism>
fn differential(&self, s: i32) -> Arc<Self::Homomorphism>
This returns the differential starting from the sth module.
Sourcefn has_computed_bidegree(&self, b: Bidegree) -> bool
fn has_computed_bidegree(&self, b: Bidegree) -> bool
If the complex has been computed at bidegree (s, t). This means the module has been computed at (s, t), and so has the differential at (s, t). In the case of a free module, the target of the differential, namely the bidegree (s - 1, t), need not be computed, as long as all the generators hit by the differential have already been computed.
Sourcefn compute_through_bidegree(&self, b: Bidegree)
fn compute_through_bidegree(&self, b: Bidegree)
Ensure all bidegrees less than or equal to (s, t) have been computed
Sourcefn next_homological_degree(&self) -> i32
fn next_homological_degree(&self) -> i32
The first s such that self.module(s) is not defined.
Provided Methods§
fn prime(&self) -> ValidPrime
Sourcefn iter_stem(&self) -> StemIterator<'_, Self> ⓘ
fn iter_stem(&self) -> StemIterator<'_, Self> ⓘ
Iterate through all defined bidegrees in increasing order of stem.
Sourcefn apply_quasi_inverse<T, S>(
&self,
results: &mut [T],
b: Bidegree,
inputs: &[S],
) -> bool
fn apply_quasi_inverse<T, S>( &self, results: &mut [T], b: Bidegree, inputs: &[S], ) -> bool
Apply the quasi-inverse of the (s, t)th differential to the list of inputs and results.
This defaults to applying self.differentials(s).quasi_inverse(t), but in some cases
the quasi-inverse might be stored separately on disk.
This returns whether the application was successful
Sourcefn save_dir(&self) -> &SaveDirectory
fn save_dir(&self) -> &SaveDirectory
A directory used to save information about the chain complex.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.