pub struct MuFreeModuleHomomorphism<const U: bool, M: Module>{
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: i32degree shift, such that ouptut_degree = input_degree - degree_shift
Implementations§
Source§impl<const U: bool, M: Module> MuFreeModuleHomomorphism<U, M>
impl<const U: bool, M: Module> MuFreeModuleHomomorphism<U, M>
pub fn new( source: Arc<MuFreeModule<U, M::Algebra>>, target: Arc<M>, degree_shift: i32, ) -> Self
pub fn degree_shift(&self) -> i32
pub fn min_degree(&self) -> i32
pub fn next_degree(&self) -> i32
pub fn output(&self, generator_degree: i32, generator_index: usize) -> &FpVector
pub fn differential_density(&self, degree: i32) -> f32
pub fn extend_by_zero(&self, degree: i32)
pub fn add_generators_from_big_vector( &self, degree: i32, outputs_vectors: FpSlice<'_>, )
Sourcepub fn add_generators_from_matrix_rows(
&self,
degree: i32,
matrix: MatrixSliceMut<'_>,
)
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…
pub fn add_generators_from_rows(&self, degree: i32, rows: Vec<FpVector>)
Sourcepub fn add_generators_from_rows_ooo(
&self,
degree: i32,
rows: Vec<FpVector>,
) -> Range<i32>
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.
Sourcepub fn ooo_outputs(&self) -> Vec<i32>
pub fn ooo_outputs(&self) -> Vec<i32>
List of outputs that have been added out of order
pub fn apply_to_generator( &self, result: &mut FpVector, coeff: u32, degree: i32, idx: usize, )
pub fn set_image(&self, degree: i32, image: Option<Subspace>)
pub fn set_kernel(&self, degree: i32, kernel: Option<Subspace>)
pub fn set_quasi_inverse( &self, degree: i32, quasi_inverse: Option<QuasiInverse>, )
Trait Implementations§
Source§impl<const U: bool, M: Module> ModuleHomomorphism for MuFreeModuleHomomorphism<U, M>
impl<const U: bool, M: Module> ModuleHomomorphism for MuFreeModuleHomomorphism<U, M>
type Source = MuFreeModule<U, <M as Module>::Algebra>
type Target = M
fn source(&self) -> Arc<Self::Source>
fn target(&self) -> Arc<Self::Target>
fn degree_shift(&self) -> i32
Source§fn apply_to_basis_element(
&self,
result: FpSliceMut<'_>,
coeff: u32,
input_degree: i32,
input_index: usize,
)
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.fn quasi_inverse(&self, degree: i32) -> Option<&QuasiInverse>
fn kernel(&self, degree: i32) -> Option<&Subspace>
fn image(&self, degree: i32) -> Option<&Subspace>
fn compute_auxiliary_data_through_degree(&self, degree: i32)
fn apply( &self, result: FpSliceMut<'_>, coeff: u32, input_degree: i32, input: FpSlice<'_>, )
fn prime(&self) -> ValidPrime
fn min_degree(&self) -> i32
Source§fn auxiliary_data(&self, degree: i32) -> (Subspace, Subspace, QuasiInverse)
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_inverseSource§fn get_matrix(&self, matrix: MatrixSliceMut<'_>, degree: i32)
fn get_matrix(&self, matrix: MatrixSliceMut<'_>, degree: i32)
Source§fn get_partial_matrix(&self, degree: i32, inputs: &[usize]) -> Matrix
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
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>
impl<const U: bool, M: Module> ZeroHomomorphism<MuFreeModule<U, <M as Module>::Algebra>, M> for MuFreeModuleHomomorphism<U, M>
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> 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> 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