FullModuleHomomorphism

Struct FullModuleHomomorphism 

Source
pub struct FullModuleHomomorphism<S: Module, T: Module<Algebra = S::Algebra> = S> {
    source: Arc<S>,
    target: Arc<T>,
    degree_shift: i32,
    matrices: OnceBiVec<Matrix>,
    quasi_inverses: OnceBiVec<QuasiInverse>,
    kernels: OnceBiVec<Subspace>,
    images: OnceBiVec<Subspace>,
}
Expand description

A ModuleHomomorphism that simply records the matrix of the homomorphism in every degree. This is currently rather bare bones.

Fields§

§source: Arc<S>§target: Arc<T>§degree_shift: i32§matrices: OnceBiVec<Matrix>

The matrices of the module homomorphism. Unspecified matrices are assumed to be zero

§quasi_inverses: OnceBiVec<QuasiInverse>§kernels: OnceBiVec<Subspace>§images: OnceBiVec<Subspace>

Implementations§

Source§

impl<A, S, T> FullModuleHomomorphism<S, T>
where A: Algebra, S: Module<Algebra = A>, T: Module<Algebra = A>,

Source

pub fn new(source: Arc<S>, target: Arc<T>, degree_shift: i32) -> Self

Source

pub fn from_matrices( source: Arc<S>, target: Arc<T>, degree_shift: i32, matrices: BiVec<Matrix>, ) -> Self

Source

pub fn from<F: ModuleHomomorphism<Source = S, Target = T>>(f: &F) -> Self

Source

pub fn replace_source<S_: Module<Algebra = A>>( self, source: Arc<S_>, ) -> FullModuleHomomorphism<S_, T>

This function replaces the source of the ModuleHomomorphism and does nothing else. This is useful for changing the type of the source (but not the mathematical module itself).

Source

pub fn replace_target<T_: Module<Algebra = A>>( self, target: Arc<T_>, ) -> FullModuleHomomorphism<S, T_>

See replace_source

Trait Implementations§

Source§

impl<S: Module, T: Module<Algebra = S::Algebra>> Clone for FullModuleHomomorphism<S, T>

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<S: Module> IdentityHomomorphism<S> for FullModuleHomomorphism<S, S>

Source§

fn identity_homomorphism(source: Arc<S>) -> Self

Source§

impl<S: Module, T: Module<Algebra = S::Algebra>> ModuleHomomorphism for FullModuleHomomorphism<S, T>

Source§

type Source = S

Source§

type Target = T

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_idx: 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 image(&self, degree: i32) -> Option<&Subspace>

Source§

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

Source§

fn kernel(&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<S: Module, T: Module<Algebra = S::Algebra>> ZeroHomomorphism<S, T> for FullModuleHomomorphism<S, T>

Source§

fn zero_homomorphism(source: Arc<S>, target: Arc<T>, degree_shift: i32) -> Self

Auto Trait Implementations§

§

impl<S, T = S> !Freeze for FullModuleHomomorphism<S, T>

§

impl<S, T> RefUnwindSafe for FullModuleHomomorphism<S, T>

§

impl<S, T> Send for FullModuleHomomorphism<S, T>

§

impl<S, T> Sync for FullModuleHomomorphism<S, T>

§

impl<S, T> Unpin for FullModuleHomomorphism<S, T>

§

impl<S, T = S> !UnwindSafe for FullModuleHomomorphism<S, T>

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