MuFreeModuleHomomorphism

Struct MuFreeModuleHomomorphism 

Source
pub struct MuFreeModuleHomomorphism<const U: bool, M: Module>
where M::Algebra: MuAlgebra<U>,
{ source: Arc<MuFreeModule<U, M::Algebra>>, target: Arc<M>, outputs: OnceBiVec<Vec<FpVector>>, pub images: OnceBiVec<Option<Subspace>>, pub kernels: OnceBiVec<Option<Subspace>>, pub quasi_inverses: OnceBiVec<Option<QuasiInverse>>, min_degree: i32, degree_shift: i32, }

Fields§

§source: Arc<MuFreeModule<U, M::Algebra>>§target: Arc<M>§outputs: OnceBiVec<Vec<FpVector>>§images: OnceBiVec<Option<Subspace>>§kernels: OnceBiVec<Option<Subspace>>§quasi_inverses: OnceBiVec<Option<QuasiInverse>>§min_degree: i32§degree_shift: i32

degree shift, such that ouptut_degree = input_degree - degree_shift

Implementations§

Source§

impl<const U: bool, M: Module> MuFreeModuleHomomorphism<U, M>
where M::Algebra: MuAlgebra<U>,

Source

pub fn new( source: Arc<MuFreeModule<U, M::Algebra>>, target: Arc<M>, degree_shift: i32, ) -> Self

Source

pub fn degree_shift(&self) -> i32

Source

pub fn min_degree(&self) -> i32

Source

pub fn next_degree(&self) -> i32

Source

pub fn output(&self, generator_degree: i32, generator_index: usize) -> &FpVector

Source

pub fn differential_density(&self, degree: i32) -> f32

Source

pub fn extend_by_zero(&self, degree: i32)

Source

pub fn add_generators_from_big_vector( &self, degree: i32, outputs_vectors: FpSlice<'_>, )

Source

pub fn add_generators_from_matrix_rows( &self, degree: i32, matrix: MatrixSliceMut<'_>, )

A MatrixSlice will do but there is no application of this struct, so it doesn’t exist yet…

Source

pub fn add_generators_from_rows(&self, degree: i32, rows: Vec<FpVector>)

Source

pub fn add_generators_from_rows_ooo( &self, degree: i32, rows: Vec<FpVector>, ) -> Range<i32>

Add the image of a bidegree out of order. See OnceVec::push_ooo for details on return value.

Source

pub fn ooo_outputs(&self) -> Vec<i32>

List of outputs that have been added out of order

Source

pub fn apply_to_generator( &self, result: &mut FpVector, coeff: u32, degree: i32, idx: usize, )

Source

pub fn set_image(&self, degree: i32, image: Option<Subspace>)

Source

pub fn set_kernel(&self, degree: i32, kernel: Option<Subspace>)

Source

pub fn set_quasi_inverse( &self, degree: i32, quasi_inverse: Option<QuasiInverse>, )

Source§

impl<const U: bool, A: MuAlgebra<U>> MuFreeModuleHomomorphism<U, MuFreeModule<U, A>>

Source

pub fn hom_k(&self, t: i32) -> Vec<Vec<u32>>

Given f: M -> N, compute the dual f*: Hom(N, k) -> Hom(M, k) in source (N) degree t.

Trait Implementations§

Source§

impl<const U: bool, M: Module> ModuleHomomorphism for MuFreeModuleHomomorphism<U, M>
where M::Algebra: MuAlgebra<U>,

Source§

type Source = MuFreeModule<U, <M as Module>::Algebra>

Source§

type Target = M

Source§

fn source(&self) -> Arc<Self::Source>

Source§

fn target(&self) -> Arc<Self::Target>

Source§

fn degree_shift(&self) -> i32

Source§

fn apply_to_basis_element( &self, result: FpSliceMut<'_>, coeff: u32, input_degree: i32, input_index: usize, )

Calling this function when input_idx < source().dimension(input_degree) results in undefined behaviour. Implementations are encouraged to panic when this happens (this is usually the case because of out-of-bounds errors.
Source§

fn quasi_inverse(&self, degree: i32) -> Option<&QuasiInverse>

Source§

fn kernel(&self, degree: i32) -> Option<&Subspace>

Source§

fn image(&self, degree: i32) -> Option<&Subspace>

Source§

fn compute_auxiliary_data_through_degree(&self, degree: i32)

Source§

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

Source§

fn prime(&self) -> ValidPrime

Source§

fn min_degree(&self) -> i32

Source§

fn auxiliary_data(&self, degree: i32) -> (Subspace, Subspace, QuasiInverse)

Compute the auxiliary data associated to the homomorphism at input degree degree. Returns it in the order image, kernel, quasi_inverse
Source§

fn get_matrix(&self, matrix: MatrixSliceMut<'_>, degree: i32)

Write the matrix of the homomorphism at input degree degree to matrix. Read more
Source§

fn get_partial_matrix(&self, degree: i32, inputs: &[usize]) -> Matrix

Get the values of the homomorphism on the specified inputs to matrix.
Source§

fn apply_quasi_inverse( &self, result: FpSliceMut<'_>, degree: i32, input: FpSlice<'_>, ) -> bool

Attempt to apply quasi inverse to the input. Returns whether the operation was successful. This is required to either always succeed or always fail for each degree.
Source§

impl<const U: bool, M: Module> ZeroHomomorphism<MuFreeModule<U, <M as Module>::Algebra>, M> for MuFreeModuleHomomorphism<U, M>
where M::Algebra: MuAlgebra<U>,

Source§

fn zero_homomorphism( source: Arc<MuFreeModule<U, M::Algebra>>, target: Arc<M>, degree_shift: i32, ) -> Self

Auto Trait Implementations§

§

impl<const U: bool, M> !Freeze for MuFreeModuleHomomorphism<U, M>

§

impl<const U: bool, M> RefUnwindSafe for MuFreeModuleHomomorphism<U, M>

§

impl<const U: bool, M> Send for MuFreeModuleHomomorphism<U, M>

§

impl<const U: bool, M> Sync for MuFreeModuleHomomorphism<U, M>

§

impl<const U: bool, M> Unpin for MuFreeModuleHomomorphism<U, M>

§

impl<const U: bool, M> !UnwindSafe for MuFreeModuleHomomorphism<U, M>

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
§

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