FiniteDimensionalModule

Struct FiniteDimensionalModule 

Source
pub struct FiniteDimensionalModule<A: Algebra> {
    algebra: Arc<A>,
    pub name: String,
    graded_dimension: BiVec<usize>,
    gen_names: BiVec<Vec<String>>,
    actions: BiVec<BiVec<Vec<Vec<FpVector>>>>,
}

Fields§

§algebra: Arc<A>§name: String§graded_dimension: BiVec<usize>§gen_names: BiVec<Vec<String>>§actions: BiVec<BiVec<Vec<Vec<FpVector>>>>

Implementations§

Source§

impl<A: Algebra> FiniteDimensionalModule<A>

Source

pub fn test_equal(&self, other: &Self) -> Result<(), String>

Source§

impl<A: Algebra> FiniteDimensionalModule<A>

Source

pub fn new( algebra: Arc<A>, name: String, graded_dimension: BiVec<usize>, ) -> Self

Source

pub fn set_basis_element_name(&mut self, degree: i32, idx: usize, name: String)

Source

fn allocate_actions( algebra: &Arc<A>, graded_dimension: &BiVec<usize>, ) -> BiVec<BiVec<Vec<Vec<FpVector>>>>

Source

pub fn add_generator(&mut self, degree: i32, name: String)

Source

pub fn string_to_basis_element(&self, string: &str) -> Option<(i32, usize)>

Source

pub fn set_action( &mut self, operation_degree: i32, operation_idx: usize, input_degree: i32, input_idx: usize, output: &[u32], )

Source

pub fn action( &self, operation_degree: i32, operation_idx: usize, input_degree: i32, input_idx: usize, ) -> &FpVector

This function will panic if you call it with input such that module.dimension(input_degree + operation_degree) = 0.

Source

pub fn action_mut( &mut self, operation_degree: i32, operation_idx: usize, input_degree: i32, input_idx: usize, ) -> &mut FpVector

This function will panic if you call it with input such that module.dimension(input_degree + operation_degree) = 0.

Source§

impl<A: GeneratedAlgebra> FiniteDimensionalModule<A>

Source

pub fn from_json(algebra: Arc<A>, json: &Value) -> Result<Self>

Source

pub fn to_json(&self, json: &mut Value)

Source

pub fn parse_action( &mut self, gen_to_idx: impl for<'a> Fn(&'a str) -> Result<(i32, usize)>, entry: &str, overwrite: bool, ) -> Result<()>

Source

pub fn check_validity( &self, input_deg: i32, output_deg: i32, ) -> Result<(), ModuleFailedRelationError>

Source

pub fn extend_actions(&mut self, input_deg: i32, output_deg: i32)

Source

fn actions_to_json(&self) -> Value

Trait Implementations§

Source§

impl<A: Algebra> Clone for FiniteDimensionalModule<A>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A: Algebra> Display for FiniteDimensionalModule<A>

Source§

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

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

impl<M: Module> From<&M> for FiniteDimensionalModule<M::Algebra>

Source§

fn from(module: &M) -> Self

This should really by try_from but orphan rules prohibit this

Source§

impl<A: Algebra> Module for FiniteDimensionalModule<A>

Source§

type Algebra = A

Source§

fn algebra(&self) -> Arc<Self::Algebra>

The algebra the module is over.
Source§

fn min_degree(&self) -> i32

The minimum degree of the module, which is required to be bounded below
Source§

fn max_computed_degree(&self) -> i32

The maximum t for which the module is fully defined at t. See Module documentation for more details.
Source§

fn compute_basis(&self, _degree: i32)

Compute internal data of the module so that we can query information up to degree degree. This should be run by the user whenever they want to query such information. Read more
Source§

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

The dimension of a module at the given degree
Source§

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

The name of a basis element. This is useful for debugging and printing results.
Source§

fn act_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, mod_degree: i32, mod_index: usize, )

Source§

fn max_degree(&self) -> Option<i32>

max_degree is the a degree such that if t > max_degree, then self.dimension(t) = 0.
Source§

fn is_unit(&self) -> bool

Whether this is the unit module.
Source§

fn prime(&self) -> ValidPrime

The prime the module is over, which should be equal to the prime of the algebra.
Source§

fn max_generator_degree(&self) -> Option<i32>

Maximum degree of a generator under the Steenrod action. Every element in higher degree must be obtainable from applying a Steenrod action to a lower degree element.
Source§

fn total_dimension(&self) -> usize

Source§

fn act( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op_index: usize, input_degree: i32, input: FpSlice<'_>, )

The length of input need not be equal to the dimension of the module in said degree. Missing entries are interpreted to be 0, while extra entries must be zero. Read more
Source§

fn act_by_element( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input: FpSlice<'_>, )

Source§

fn act_by_element_on_basis( &self, result: FpSliceMut<'_>, coeff: u32, op_degree: i32, op: FpSlice<'_>, input_degree: i32, input_index: usize, )

Source§

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

Gives the name of an element. The default implementation is derived from Module::basis_element_to_string in the obvious way.
Source§

impl<A: Algebra> PartialEq for FiniteDimensionalModule<A>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A: Algebra> ZeroModule for FiniteDimensionalModule<A>

Source§

fn zero_module(algebra: Arc<A>, min_degree: i32) -> Self

Source§

impl<A: Algebra> Eq for FiniteDimensionalModule<A>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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
§

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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