PairAlgebra

Trait PairAlgebra 

Source
pub trait PairAlgebra: Algebra {
    type Element: Send + Sync;

    // Required methods
    fn element_is_zero(elt: &Self::Element) -> bool;
    fn new_pair_element(&self, degree: i32) -> Self::Element;
    fn sigma_multiply_basis(
        &self,
        result: &mut Self::Element,
        coeff: u32,
        r_degree: i32,
        r_idx: usize,
        s_degree: i32,
        s_idx: usize,
    );
    fn a_multiply(
        &self,
        result: FpSliceMut<'_>,
        coeff: u32,
        r_degree: i32,
        r: FpSlice<'_>,
        s_degree: i32,
        s: &Self::Element,
    );
    fn p_tilde(&self) -> usize;
    fn element_to_bytes(
        &self,
        elt: &Self::Element,
        buffer: &mut impl Write,
    ) -> Result<()>;
    fn element_from_bytes(
        &self,
        degree: i32,
        buffer: &mut impl Read,
    ) -> Result<Self::Element>;

    // Provided methods
    fn finalize_element(_elt: &mut Self::Element) { ... }
    fn sigma_multiply(
        &self,
        result: &mut Self::Element,
        coeff: u32,
        r_degree: i32,
        r: FpSlice<'_>,
        s_degree: i32,
        s: FpSlice<'_>,
    ) { ... }
}
Expand description

A lift of an algebra to a split pair algebra. See module introduction for more.

Required Associated Types§

Source

type Element: Send + Sync

An element in the cohomological degree zero part of the pair algebra. This tends to not be a ring over Fp, so we let the algebra specify how it wants to represent the elements.

Required Methods§

Source

fn element_is_zero(elt: &Self::Element) -> bool

Source

fn new_pair_element(&self, degree: i32) -> Self::Element

Create a new zero element in the given degree.

Source

fn sigma_multiply_basis( &self, result: &mut Self::Element, coeff: u32, r_degree: i32, r_idx: usize, s_degree: i32, s_idx: usize, )

Given $r, s \in \pi_0(A)$, compute $\sigma(r) \sigma(s)$ and add the result to result.

Source

fn a_multiply( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r: FpSlice<'_>, s_degree: i32, s: &Self::Element, )

Compute $A(r, s)$ and write the result to result.

Source

fn p_tilde(&self) -> usize

The element p is classified by a filtration on element in Ext of the underlying algebra, which is represented by an indecomposable in degree 1. This returns the index of said indecomposable.

Source

fn element_to_bytes( &self, elt: &Self::Element, buffer: &mut impl Write, ) -> Result<()>

Source

fn element_from_bytes( &self, degree: i32, buffer: &mut impl Read, ) -> Result<Self::Element>

Provided Methods§

Source

fn finalize_element(_elt: &mut Self::Element)

Assert that elt is in the image of the differential. Drop the data recording the complement of the image of the differential.

Source

fn sigma_multiply( &self, result: &mut Self::Element, coeff: u32, r_degree: i32, r: FpSlice<'_>, s_degree: i32, s: FpSlice<'_>, )

Same as PairAlgebra::sigma_multiply_basis but with non-basis elements.

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.

Implementors§