struct MilnorSubalgebra {
profile: Vec<u8>,
}Expand description
A Milnor subalgebra to be used in Nassau’s algorithm. This is equipped with an ordering of the signature as in Lemma 2.4 of the paper.
To simplify implementation, we pick the ordering so that the (reverse) lexicographic ordering in Lemma 2.4 is just the (reverse) lexicographic ordering of the P parts. This corresponds to the ordering of $\mathcal{P}$ where $P^s_t < P^{s’}_t$ if $s < s’$).
Fields§
§profile: Vec<u8>Implementations§
Source§impl MilnorSubalgebra
impl MilnorSubalgebra
fn new(profile: Vec<u8>) -> Self
Sourcefn zero_algebra() -> Self
fn zero_algebra() -> Self
The algebra with trivial profile, corresponding to the trivial algebra.
Sourcefn has_signature(&self, ppart: &[PPartEntry], signature: &[PPartEntry]) -> bool
fn has_signature(&self, ppart: &[PPartEntry], signature: &[PPartEntry]) -> bool
Computes the signature of an element
fn zero_signature(&self) -> Vec<PPartEntry> ⓘ
Sourcefn signature_mask<'a>(
&'a self,
algebra: &'a MilnorAlgebra,
module: &'a FreeModule<MilnorAlgebra>,
degree: i32,
signature: &'a [PPartEntry],
) -> impl Iterator<Item = usize> + 'a
fn signature_mask<'a>( &'a self, algebra: &'a MilnorAlgebra, module: &'a FreeModule<MilnorAlgebra>, degree: i32, signature: &'a [PPartEntry], ) -> impl Iterator<Item = usize> + 'a
Give a list of basis elements in degree degree that has signature signature.
This requires passing the algebra for borrow checker reasons.
Sourcefn signature_matrix(
&self,
hom: &FreeModuleHomomorphism<FreeModule<MilnorAlgebra>>,
degree: i32,
signature: &[PPartEntry],
) -> Matrix
fn signature_matrix( &self, hom: &FreeModuleHomomorphism<FreeModule<MilnorAlgebra>>, degree: i32, signature: &[PPartEntry], ) -> Matrix
Get the matrix of a free module homomorphism when restricted to the subquotient given by the signature.
Sourcefn iter_signatures(
&self,
degree: i32,
) -> impl Iterator<Item = Vec<PPartEntry>> + '_
fn iter_signatures( &self, degree: i32, ) -> impl Iterator<Item = Vec<PPartEntry>> + '_
Iterate through all signatures of this algebra that contain elements of degree at most
degree (inclusive). This skips the initial zero signature.
fn top_degree(&self) -> i32
fn optimal_for(b: Bidegree) -> Self
fn to_bytes(&self, buffer: &mut impl Write) -> Result<()>
fn from_bytes(data: &mut impl Read) -> Result<Self>
fn signature_to_bytes( signature: &[PPartEntry], buffer: &mut impl Write, ) -> Result<()>
fn signature_from_bytes(&self, data: &mut impl Read) -> Result<Vec<PPartEntry>>
Trait Implementations§
Source§impl Clone for MilnorSubalgebra
impl Clone for MilnorSubalgebra
Source§fn clone(&self) -> MilnorSubalgebra
fn clone(&self) -> MilnorSubalgebra
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MilnorSubalgebra
impl RefUnwindSafe for MilnorSubalgebra
impl Send for MilnorSubalgebra
impl Sync for MilnorSubalgebra
impl Unpin for MilnorSubalgebra
impl UnwindSafe for MilnorSubalgebra
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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