Module

Trait Module 

Source
pub trait Module:
    Display
    + Any
    + Send
    + Sync {
    type Algebra: Algebra;

Show 16 methods // Required methods fn algebra(&self) -> Arc<Self::Algebra>; fn min_degree(&self) -> i32; fn max_computed_degree(&self) -> i32; fn dimension(&self, degree: i32) -> usize; fn act_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, mod_degree: i32, mod_index: usize, ); fn basis_element_to_string(&self, degree: i32, idx: usize) -> String; // Provided methods fn compute_basis(&self, degree: i32) { ... } fn is_unit(&self) -> bool { ... } fn prime(&self) -> ValidPrime { ... } fn max_degree(&self) -> Option<i32> { ... } fn max_generator_degree(&self) -> Option<i32> { ... } fn total_dimension(&self) -> usize { ... } fn act( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, input_degree: i32, input: FpSlice<'_>, ) { ... } fn act_by_element( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input: FpSlice<'_>, ) { ... } fn act_by_element_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input_index: usize, ) { ... } fn element_to_string(&self, degree: i32, element: FpSlice<'_>) -> String { ... }
}
Expand description

A bounded below module over an algebra.

To accommodate for infinite modules (e.g. modules in a free resolution), every module is potentially only define up to a degree. The extent to which the module is defined is kept track by two functions:

  • Module::max_computed_degree gives the maximum degree for which the module is fully defined. It is guaranteed that the module will never change up to this degree in the future.

  • Module::compute_basis extends the internal data to support querying data up to (and including) a given degree. In general, we can run this beyond the max computed degree.

A useful example to keep in mind is a FreeModule, where we have specified the generators up to some degree t. Then t is the max computed degree, while compute_basis computes data such as the offset of existing generators in potentially higher degrees.

Required Associated Types§

Required Methods§

Source

fn algebra(&self) -> Arc<Self::Algebra>

The algebra the module is over.

Source

fn min_degree(&self) -> i32

The minimum degree of the module, which is required to be bounded below

Source

fn max_computed_degree(&self) -> i32

The maximum t for which the module is fully defined at t. See Module documentation for more details.

Source

fn dimension(&self, degree: i32) -> usize

The dimension of a module at the given degree

Source

fn act_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, mod_degree: i32, mod_index: usize, )

Source

fn basis_element_to_string(&self, degree: i32, idx: usize) -> String

The name of a basis element. This is useful for debugging and printing results.

Provided Methods§

Source

fn compute_basis(&self, degree: i32)

Compute internal data of the module so that we can query information up to degree degree. This should be run by the user whenever they want to query such information.

This function must be idempotent, and defaults to a no-op.

See Module documentation for more details.

Source

fn is_unit(&self) -> bool

Whether this is the unit module.

Source

fn prime(&self) -> ValidPrime

The prime the module is over, which should be equal to the prime of the algebra.

Source

fn max_degree(&self) -> Option<i32>

max_degree is the a degree such that if t > max_degree, then self.dimension(t) = 0.

Source

fn max_generator_degree(&self) -> Option<i32>

Maximum degree of a generator under the Steenrod action. Every element in higher degree must be obtainable from applying a Steenrod action to a lower degree element.

Source

fn total_dimension(&self) -> usize

Source

fn act( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, input_degree: i32, input: FpSlice<'_>, )

The length of input need not be equal to the dimension of the module in said degree. Missing entries are interpreted to be 0, while extra entries must be zero.

This flexibility is useful when resolving to a stem. The point is that we have elements in degree t that are guaranteed to not contain generators of degree t, and we don’t know what generators will be added in degree t yet.

Source

fn act_by_element( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input: FpSlice<'_>, )

Source

fn act_by_element_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input_index: usize, )

Source

fn element_to_string(&self, degree: i32, element: FpSlice<'_>) -> String

Gives the name of an element. The default implementation is derived from Module::basis_element_to_string in the obvious way.

Implementations on Foreign Types§

Source§

impl<T: Module + ?Sized> Module for Box<T>
where Box<T>: Display + Any + Send + Sync,

Source§

type Algebra = <T as Module>::Algebra

Source§

fn algebra(&self) -> Arc<Self::Algebra>

Source§

fn min_degree(&self) -> i32

Source§

fn compute_basis(&self, degree: i32)

Source§

fn max_computed_degree(&self) -> i32

Source§

fn dimension(&self, degree: i32) -> usize

Source§

fn act_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, mod_degree: i32, mod_index: usize, )

Source§

fn basis_element_to_string(&self, degree: i32, idx: usize) -> String

Source§

fn is_unit(&self) -> bool

Source§

fn prime(&self) -> ValidPrime

Source§

fn max_degree(&self) -> Option<i32>

Source§

fn max_generator_degree(&self) -> Option<i32>

Source§

fn total_dimension(&self) -> usize

Source§

fn act( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, input_degree: i32, input: FpSlice<'_>, )

Source§

fn act_by_element( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input: FpSlice<'_>, )

Source§

fn act_by_element_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input_index: usize, )

Source§

fn element_to_string(&self, degree: i32, element: FpSlice<'_>) -> String

Implementors§