Field

Struct Field 

Source
pub struct Field {
    prime: ValidPrime,
}
Expand description

$\mathbb{F}_p$, viewed as an Algebra over itself.

As an Algebra, a field is one-dimensional, with basis element 1. It is also trivially a coalgebra via the trivial diagonal comultiplication, and thus a Bialgebra.

Fields§

§prime: ValidPrime

Implementations§

Source§

impl Field

Source

pub fn new(p: ValidPrime) -> Self

Returns a new Field over the given prime p.

Trait Implementations§

Source§

impl Algebra for Field

Source§

fn prime(&self) -> ValidPrime

Returns the prime the algebra is over.
Source§

fn compute_basis(&self, _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<'_>, coeff: 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 default_filtration_one_products(&self) -> Vec<(String, i32, usize)>

Returns a list of filtration-one elements in $Ext(k, k)$. 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 element_to_string(&self, degree: i32, element: FpSlice<'_>) -> String

Converts a general 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 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 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_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 multiply_element_by_element( &self, result: FpSliceMut<'_>, coeff: u32, r_degree: i32, r: FpSlice<'_>, s_degree: i32, s: FpSlice<'_>, )

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

impl Bialgebra for Field

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 Field

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field

§

impl Sync for Field

§

impl Unpin for Field

§

impl UnwindSafe for Field

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
§

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