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§
Required Methods§
fn element_is_zero(elt: &Self::Element) -> bool
Sourcefn new_pair_element(&self, degree: i32) -> Self::Element
fn new_pair_element(&self, degree: i32) -> Self::Element
Create a new zero element in the given degree.
Sourcefn sigma_multiply_basis(
&self,
result: &mut Self::Element,
coeff: u32,
r_degree: i32,
r_idx: usize,
s_degree: i32,
s_idx: usize,
)
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.
Sourcefn a_multiply(
&self,
result: FpSliceMut<'_>,
coeff: u32,
r_degree: i32,
r: FpSlice<'_>,
s_degree: i32,
s: &Self::Element,
)
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.
Sourcefn p_tilde(&self) -> usize
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.
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§
Sourcefn finalize_element(_elt: &mut Self::Element)
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.
Sourcefn sigma_multiply(
&self,
result: &mut Self::Element,
coeff: u32,
r_degree: i32,
r: FpSlice<'_>,
s_degree: i32,
s: FpSlice<'_>,
)
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.