pub struct Subquotient {
gens: Subspace,
quotient: Subspace,
dimension: usize,
}Fields§
§gens: Subspace§quotient: Subspace§dimension: usizeImplementations§
Source§impl Subquotient
impl Subquotient
Sourcepub fn new(p: ValidPrime, dim: usize) -> Self
pub fn new(p: ValidPrime, dim: usize) -> Self
Create a new subquotient of an ambient space of dimension dim. This defaults to the zero
subspace.
Sourcepub fn new_full(p: ValidPrime, dim: usize) -> Self
pub fn new_full(p: ValidPrime, dim: usize) -> Self
Create a new subquotient of an ambient space of dimension dim, where the subspace is the
full subspace and quotient is trivial.
Sourcepub fn reduce(&self, elt: FpSliceMut<'_>) -> Vec<u32>
pub fn reduce(&self, elt: FpSliceMut<'_>) -> Vec<u32>
Given a vector elt, project elt to the complement and express
as a linear combination of the basis. The result is returned as a list of coefficients.
If elt is nonzero afterwards, this means the vector was not in the subspace to begin with.
Sourcepub fn reduce_by_quotient(&self, elt: FpSliceMut<'_>)
pub fn reduce_by_quotient(&self, elt: FpSliceMut<'_>)
Project the vector onto the complement of the quotient part of the subquotient.
Sourcepub fn set_to_full(&mut self)
pub fn set_to_full(&mut self)
Set the subquotient to be the full ambient space quotiented by zero
pub fn zeros(&self) -> &Subspace
pub fn gens(&self) -> impl Iterator<Item = FpSlice<'_>>
pub fn quotient_dimension(&self) -> usize
Sourcepub fn subspace_dimension(&self) -> usize
pub fn subspace_dimension(&self) -> usize
The dimension of the subspace part of the subquotient.
Sourcepub fn subspace_gens(&self) -> impl Iterator<Item = FpSlice<'_>>
pub fn subspace_gens(&self) -> impl Iterator<Item = FpSlice<'_>>
The generators of the subspace part of the subquotient.
Sourcepub fn complement_pivots(&self) -> impl Iterator<Item = usize> + '_
pub fn complement_pivots(&self) -> impl Iterator<Item = usize> + '_
The pivot columns of the complement to the subspace
pub fn quotient(&mut self, elt: FpSlice<'_>)
pub fn dimension(&self) -> usize
pub fn ambient_dimension(&self) -> usize
pub fn prime(&self) -> ValidPrime
pub fn is_empty(&self) -> bool
pub fn clear_gens(&mut self)
pub fn add_gen(&mut self, g: FpSlice<'_>)
pub fn reduce_matrix( matrix: &Matrix, source: &Self, target: &Self, ) -> Vec<Vec<u32>>
Sourcepub fn from_parts(sub: Subspace, quotient: Subspace) -> Self
pub fn from_parts(sub: Subspace, quotient: Subspace) -> Self
Given a chain of subspaces quotient < sub in some ambient space, compute the subquotient
sub/quotient. The answer is expressed as a list of basis vectors of sub whose image in
sub/quotient forms a basis, and a basis vector of sub is described by its index in the
list of basis vectors of sub (not the ambient space).
Note that the quotient argument does not need to be a subspace of the sub argument, nor
do they need to be disjoint. Mathematically, this method constructs the space (sub + quotient) / quotient.
pub fn quotient_pivots(&self) -> &[isize]
Trait Implementations§
Source§impl Arbitrary for Subquotient
impl Arbitrary for Subquotient
Source§type Parameters = SubquotientArbParams
type Parameters = SubquotientArbParams
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<Subquotient>
type Strategy = BoxedStrategy<Subquotient>
Strategy used to generate values of type Self.Source§fn arbitrary_with(args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(args: Self::Parameters) -> Self::Strategy
Source§impl Clone for Subquotient
impl Clone for Subquotient
Source§fn clone(&self) -> Subquotient
fn clone(&self) -> Subquotient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Subquotient
impl Debug for Subquotient
Auto Trait Implementations§
impl Freeze for Subquotient
impl RefUnwindSafe for Subquotient
impl Send for Subquotient
impl Sync for Subquotient
impl Unpin for Subquotient
impl UnwindSafe for Subquotient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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