Skip to main content

SchubertCalculus

Struct SchubertCalculus 

Source
pub struct SchubertCalculus {
    pub grassmannian_dim: (usize, usize),
    /* private fields */
}
Expand description

Schubert calculus engine

Fields§

§grassmannian_dim: (usize, usize)

The underlying Grassmannian

Implementations§

Source§

impl SchubertCalculus

Source

pub fn new(grassmannian_dim: (usize, usize)) -> Self

Create a new Schubert calculus engine

Source

pub fn grassmannian_dimension(&self) -> usize

Get the dimension of the Grassmannian

§Contract
ensures: result == k * (n - k)
Source

pub fn intersection_number( &mut self, class1: &SchubertClass, class2: &SchubertClass, ) -> EnumerativeResult<Rational64>

Compute intersection number of two Schubert classes

§Contract
requires: class1.grassmannian_dim == class2.grassmannian_dim == self.grassmannian_dim
ensures: result >= 0
ensures: class1.dimension() + class2.dimension() != self.grassmannian_dimension()
         => result == 0
Source

pub fn multi_intersect( &mut self, classes: &[SchubertClass], ) -> IntersectionResult

Intersect multiple Schubert classes

Given classes σ_{λ_1}, …, σ_{λ_m}, compute their intersection number in the Grassmannian Gr(k, n).

§Contract
requires: forall c in classes. c.grassmannian_dim == self.grassmannian_dim
ensures:
  - sum(c.codimension() for c in classes) > dim(Gr) => Empty
  - sum(c.codimension() for c in classes) == dim(Gr) => Finite(n)
  - sum(c.codimension() for c in classes) < dim(Gr) => PositiveDimensional
Source

pub fn lr_cached( &mut self, lambda: &Partition, mu: &Partition, nu: &Partition, ) -> u64

Get or compute LR coefficient with caching

§Contract
ensures: result == lr_coefficient(lambda, mu, nu)
ensures: lr_cached(lambda, mu, nu) == lr_cached(mu, lambda, nu)  // symmetry
Source

pub fn product( &mut self, class1: &SchubertClass, class2: &SchubertClass, ) -> Vec<(SchubertClass, u64)>

Expand product of two Schubert classes

§Contract
requires: class1.grassmannian_dim == class2.grassmannian_dim == self.grassmannian_dim
ensures: forall (c, coeff) in result. coeff > 0
ensures: product(class1, class2) == product(class2, class1)  // commutativity
Source

pub fn pieri_multiply( &self, schubert_class: &SchubertClass, special_class: usize, ) -> EnumerativeResult<Vec<SchubertClass>>

Multiply two Schubert classes using Pieri’s rule (simplified)

Trait Implementations§

Source§

impl Debug for SchubertCalculus

Source§

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

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

impl Default for SchubertCalculus

Source§

fn default() -> Self

Returns the “default value” for a type. 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> 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, 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.