Subquotient

Struct Subquotient 

Source
pub struct Subquotient {
    gens: Subspace,
    quotient: Subspace,
    dimension: usize,
}

Fields§

§gens: Subspace§quotient: Subspace§dimension: usize

Implementations§

Source§

impl Subquotient

Source

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.

Source

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.

Source

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.

Source

pub fn reduce_by_quotient(&self, elt: FpSliceMut<'_>)

Project the vector onto the complement of the quotient part of the subquotient.

Source

pub fn set_to_full(&mut self)

Set the subquotient to be the full ambient space quotiented by zero

Source

pub fn zeros(&self) -> &Subspace

Source

pub fn gens(&self) -> impl Iterator<Item = FpSlice<'_>>

Source

pub fn quotient_dimension(&self) -> usize

Source

pub fn subspace_dimension(&self) -> usize

The dimension of the subspace part of the subquotient.

Source

pub fn subspace_gens(&self) -> impl Iterator<Item = FpSlice<'_>>

The generators of the subspace part of the subquotient.

Source

pub fn complement_pivots(&self) -> impl Iterator<Item = usize> + '_

The pivot columns of the complement to the subspace

Source

pub fn quotient(&mut self, elt: FpSlice<'_>)

Source

pub fn dimension(&self) -> usize

Source

pub fn ambient_dimension(&self) -> usize

Source

pub fn prime(&self) -> ValidPrime

Source

pub fn is_empty(&self) -> bool

Source

pub fn clear_gens(&mut self)

Source

pub fn add_gen(&mut self, g: FpSlice<'_>)

Source

pub fn reduce_matrix( matrix: &Matrix, source: &Self, target: &Self, ) -> Vec<Vec<u32>>

Source

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.

Source

pub fn quotient_pivots(&self) -> &[isize]

Trait Implementations§

Source§

impl Arbitrary for Subquotient

Source§

type Parameters = SubquotientArbParams

The type of parameters that arbitrary_with accepts for configuration of the generated Strategy. Parameters must implement Default.
Source§

type Strategy = BoxedStrategy<Subquotient>

The type of Strategy used to generate values of type Self.
Source§

fn arbitrary_with(args: Self::Parameters) -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
Source§

impl Clone for Subquotient

Source§

fn clone(&self) -> Subquotient

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 Debug for Subquotient

Source§

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

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

impl Display for Subquotient

Source§

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

Formats the value using the given formatter. Read more

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