pub struct MultiDegreeElement<const N: usize> {
degree: MultiDegree<N>,
vec: FpVector,
}Expand description
An element of a graded vector space. Most commonly used to index elements of spectral sequences.
Fields§
§degree: MultiDegree<N>Degree of the element
vec: FpVectorRepresenting vector
Implementations§
Source§impl<const N: usize> MultiDegreeElement<N>
impl<const N: usize> MultiDegreeElement<N>
pub fn new(degree: MultiDegree<N>, vec: FpVector) -> Self
pub fn s(&self) -> i32
pub fn t(&self) -> i32
pub fn degree(&self) -> MultiDegree<N>
pub fn n(&self) -> i32
pub fn x(&self) -> i32
pub fn y(&self) -> i32
pub fn vec(&self) -> FpSlice<'_>
pub fn into_vec(self) -> FpVector
Sourcepub fn to_basis_string(&self) -> String
pub fn to_basis_string(&self) -> String
Get the string representation of the element as a linear combination of generators. For
example, an element in bidegree (n,s) with vector [0,2,1] will be printed as `2 x_(n, s,
-
- x_(n, s, 2)`.
Trait Implementations§
Source§impl<const N: usize> Clone for MultiDegreeElement<N>
impl<const N: usize> Clone for MultiDegreeElement<N>
Source§fn clone(&self) -> MultiDegreeElement<N>
fn clone(&self) -> MultiDegreeElement<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for MultiDegreeElement<N>
impl<const N: usize> Debug for MultiDegreeElement<N>
Source§impl<'de, const N: usize> Deserialize<'de> for MultiDegreeElement<N>
impl<'de, const N: usize> Deserialize<'de> for MultiDegreeElement<N>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<const N: usize> Display for MultiDegreeElement<N>
impl<const N: usize> Display for MultiDegreeElement<N>
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
let vec = FpVector::from_slice(P2, &[1, 0, 1]);
let el3 = MultiDegreeElement::new(MultiDegree::new([1, 2, 3]), vec.clone());
assert_eq!(format!("{el3}"), String::from("(1, 2, 3, [1, 0, 1])"));
assert_eq!(format!("{el3:#}"), String::from("(1,2,3)[101]"));
let el0 = MultiDegreeElement::new(MultiDegree::new([]), vec);
assert_eq!(format!("{el0}"), String::from("([1, 0, 1])"));
assert_eq!(format!("{el0:#}"), String::from("()[101]"));Source§impl<const N: usize> Hash for MultiDegreeElement<N>
impl<const N: usize> Hash for MultiDegreeElement<N>
Source§impl<const N: usize> PartialEq for MultiDegreeElement<N>
impl<const N: usize> PartialEq for MultiDegreeElement<N>
Source§impl<const N: usize> Serialize for MultiDegreeElement<N>
impl<const N: usize> Serialize for MultiDegreeElement<N>
Source§impl<const N: usize> TryFrom<MultiDegreeElement<N>> for MultiDegreeGenerator<N>
impl<const N: usize> TryFrom<MultiDegreeElement<N>> for MultiDegreeGenerator<N>
impl<const N: usize> Eq for MultiDegreeElement<N>
impl<const N: usize> StructuralPartialEq for MultiDegreeElement<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for MultiDegreeElement<N>
impl<const N: usize> RefUnwindSafe for MultiDegreeElement<N>
impl<const N: usize> Send for MultiDegreeElement<N>
impl<const N: usize> Sync for MultiDegreeElement<N>
impl<const N: usize> Unpin for MultiDegreeElement<N>
impl<const N: usize> UnwindSafe for MultiDegreeElement<N>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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>
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 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>
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