MilnorAlgebra

Struct MilnorAlgebra 

Source
pub struct MilnorAlgebra {
    profile: MilnorProfile,
    p: ValidPrime,
    generic: bool,
    unstable_enabled: bool,
    ppart_table: OnceVec<Vec<PPart>>,
    basis_table: OnceVec<Vec<MilnorBasisElement>>,
    excess_table: OnceVec<Vec<usize>>,
    basis_element_to_index_map: OnceVec<FxHashMap<MilnorBasisElement, usize>>,
    multiplication_table: OnceVec<OnceVec<Vec<Vec<FpVector>>>>,
}

Fields§

§profile: MilnorProfile§p: ValidPrime§generic: bool§unstable_enabled: bool§ppart_table: OnceVec<Vec<PPart>>

This is a list of possible P(R) of each degree, where ppart_table[i] contains elements of degree q * i.

§basis_table: OnceVec<Vec<MilnorBasisElement>>

A list of all basis elements of each degree, constructed from Self::ppart_table

§excess_table: OnceVec<Vec<usize>>§basis_element_to_index_map: OnceVec<FxHashMap<MilnorBasisElement, usize>>

degree -> MilnorBasisElement -> index

§multiplication_table: OnceVec<OnceVec<Vec<Vec<FpVector>>>>

source_deg -> target_deg -> source_op -> target_op

Implementations§

Source§

impl MilnorAlgebra

Source

pub fn new(p: ValidPrime, unstable_enabled: bool) -> Self

Source

pub fn new_with_profile( p: ValidPrime, profile: MilnorProfile, unstable_enabled: bool, ) -> Self

Source

pub fn generic(&self) -> bool

Source

pub fn q(&self) -> i32

Source

pub fn profile(&self) -> &MilnorProfile

Source

pub fn basis_element_from_index( &self, degree: i32, idx: usize, ) -> &MilnorBasisElement

Source

pub fn try_basis_element_to_index( &self, elt: &MilnorBasisElement, ) -> Option<usize>

Source

pub fn basis_element_to_index(&self, elt: &MilnorBasisElement) -> usize

Source

pub fn ppart_table(&self, t: i32) -> &[PPart]

Gives a list of PPart’s in degree t.

Source§

impl MilnorAlgebra

Source

fn compute_ppart(&self, max_degree: i32)

Source

fn generate_basis_generic(&self, max_degree: i32)

Source

fn generate_basis_2(&self, max_degree: i32)

Source

fn generate_excess_table(&self, max_degree: i32)

Source§

impl MilnorAlgebra

Source

fn try_beps_pn(&self, e: u32, x: PPartEntry) -> Option<(i32, usize)>

Source

pub fn beps_pn(&self, e: u32, x: PPartEntry) -> (i32, usize)

Return the degree and index of $Q_1^e P(x)$.

Source

fn multiply_qpart( &self, m1: &MilnorBasisElement, f: u32, ) -> Vec<(u32, MilnorBasisElement)>

Source

pub fn multiply( &self, res: FpSliceMut<'_>, coef: u32, m1: &MilnorBasisElement, m2: &MilnorBasisElement, )

Source

pub fn multiply_with_allocation( &self, res: FpSliceMut<'_>, coef: u32, m1: &MilnorBasisElement, m2: &MilnorBasisElement, excess: i32, allocation: PPartAllocation, ) -> PPartAllocation

Source

pub fn multiply_basis_by_element( &self, res: FpSliceMut<'_>, coef: u32, m1: &MilnorBasisElement, s_deg: i32, s: FpSlice<'_>, )

Source

fn multiply_basis_by_element_with_allocation( &self, res: FpSliceMut<'_>, coef: u32, m1: &MilnorBasisElement, s_deg: i32, s: FpSlice<'_>, allocation: PPartAllocation, ) -> PPartAllocation

Source§

impl MilnorAlgebra

Source

fn decompose_basis_element_qpart( &self, degree: i32, idx: usize, ) -> Vec<(u32, (i32, usize), (i32, usize))>

Source

fn decompose_basis_element_ppart( &self, degree: i32, idx: usize, ) -> Vec<(u32, (i32, usize), (i32, usize))>

Source§

impl MilnorAlgebra

Source

fn increment_p_part(element: &mut PPart, max: &[PPartEntry]) -> bool

Returns true if the new element is not within the bounds

Trait Implementations§

Source§

impl Algebra for MilnorAlgebra

Source§

fn prefix(&self) -> &str

A name for the algebra to use in serialization operations. This defaults to “” for algebras that don’t care about this problem.
Source§

fn magic(&self) -> u32

A magic constant used to identify the algebra in save files. When working with the Milnor algebra, it is easy to forget to specify the algebra and load Milnor save files with the Adem basis. If we somehow manage to resume computation, this can have disasterous consequences. So we store the magic in the save files. Read more
Source§

fn prime(&self) -> ValidPrime

Returns the prime the algebra is over.
Source§

fn default_filtration_one_products(&self) -> Vec<(String, i32, usize)>

Returns a list of filtration-one elements in $Ext(k, k)$. Read more
Source§

fn compute_basis(&self, max_degree: i32)

Computes basis elements up to and including degree. Read more
Source§

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

Returns the dimension of the algebra in degree degree.
Source§

fn multiply_basis_elements( &self, result: FpSliceMut<'_>, coef: u32, r_degree: i32, r_idx: usize, s_degree: i32, s_idx: usize, )

Computes the product r * s of two basis elements, and adds the result to result. Read more
Source§

fn multiply_basis_element_by_element( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r_idx: usize, s_degree: i32, s: FpSlice<'_>, )

Computes the product r * s of a basis element r and a general element s, and adds the result to result. Read more
Source§

fn multiply_element_by_element( &self, res: FpSliceMut<'_>, coef: u32, r_deg: i32, r: FpSlice<'_>, s_deg: i32, s: FpSlice<'_>, )

Computes the product r * s of two general elements, and adds the result to result. Read more
Source§

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

Converts a basis element into a string for display.
Source§

fn basis_element_from_string(&self, elt: &str) -> Option<(i32, usize)>

Converts a string to a basis element. This must be a one-sided inverse inverse to both basis_element_to_string and generator_to_string (if GeneratedAlgebra is implemented). Read more
Source§

fn multiply_element_by_basis_element( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r: FpSlice<'_>, s_degree: i32, s_idx: usize, )

Computes the product r * s of a general element r and a basis element s, and adds the result to result. Read more
Source§

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

Converts a general element into a string for display.
Source§

impl Bialgebra for MilnorAlgebra

Source§

fn coproduct(&self, op_deg: i32, op_idx: usize) -> Vec<(i32, usize, i32, usize)>

Computes a coproduct $\Delta(x)$, expressed as Read more
Source§

fn decompose(&self, op_deg: i32, op_idx: usize) -> Vec<(i32, usize)>

Decomposes an element of the algebra into a product of elements, each of which we can compute a coproduct on efficiently. Read more
Source§

impl Display for MilnorAlgebra

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<MilnorAlgebra> for SteenrodAlgebra

Source§

fn from(v: MilnorAlgebra) -> SteenrodAlgebra

Converts to this type from the input type.
Source§

impl GeneratedAlgebra for MilnorAlgebra

Source§

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

Returns the name of a generator. Read more
Source§

fn generators(&self, degree: i32) -> Vec<usize>

Return generators in degree. Read more
Source§

fn decompose_basis_element( &self, degree: i32, idx: usize, ) -> Vec<(u32, (i32, usize), (i32, usize))>

Decomposes an element into generators. Read more
Source§

fn generating_relations( &self, degree: i32, ) -> Vec<Vec<(u32, (i32, usize), (i32, usize))>>

Returns relations that the algebra wants checked to ensure the consistency of module. Read more
Source§

impl PairAlgebra for MilnorAlgebra

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§

type Element = MilnorPairElement

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.
Source§

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

Create a new zero element in the given degree.
Source§

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

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 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 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>

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.
Source§

impl<'a> TryInto<&'a MilnorAlgebra> for &'a SteenrodAlgebra

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a MilnorAlgebra, Self::Error>

Performs the conversion.
Source§

impl TryInto<MilnorAlgebra> for SteenrodAlgebra

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into( self, ) -> Result<MilnorAlgebra, <Self as TryInto<MilnorAlgebra>>::Error>

Performs the conversion.
Source§

impl UnstableAlgebra for MilnorAlgebra

Source§

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

Source§

fn multiply_basis_elements_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r_index: usize, s_degree: i32, s_index: usize, excess: i32, )

Source§

fn multiply_basis_element_by_element_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r_idx: usize, s_degree: i32, s: FpSlice<'_>, excess: i32, )

Computes the product r * s of a basis element r and a general element s, and adds the result to result. Read more
Source§

fn multiply_element_by_basis_element_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r: FpSlice<'_>, s_degree: i32, s_idx: usize, excess: i32, )

Computes the product r * s of a general element r and a basis element s, and adds the result to result. Read more
Source§

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

Computes the product r * s of two general elements, and adds the result to result. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<A> MuAlgebra<false> for A
where A: Algebra,

Source§

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

Source§

fn multiply_basis_elements_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r_index: usize, s_degree: i32, s_index: usize, _excess: i32, )

Source§

fn multiply_basis_element_by_element_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r_idx: usize, s_degree: i32, s: FpSlice<'_>, _excess: i32, )

Source§

fn multiply_element_by_basis_element_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r: FpSlice<'_>, s_degree: i32, s_idx: usize, _excess: i32, )

Computes the product r * s of a general element r and a basis element s, and adds the result to result. Read more
Source§

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

Computes the product r * s of two general elements, and adds the result to result. Read more
Source§

impl<A> MuAlgebra<true> for A
where A: UnstableAlgebra,

Source§

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

Source§

fn multiply_basis_elements_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r_index: usize, s_degree: i32, s_index: usize, excess: i32, )

Source§

fn multiply_basis_element_by_element_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r_idx: usize, s_degree: i32, s: FpSlice<'_>, excess: i32, )

Source§

fn multiply_element_by_basis_element_unstable( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r: FpSlice<'_>, s_degree: i32, s_idx: usize, excess: i32, )

Computes the product r * s of a general element r and a basis element s, and adds the result to result. Read more
Source§

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

Computes the product r * s of two general elements, and adds the result to result. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V