Skip to main content

QuiverReprsentation

Struct QuiverReprsentation 

Source
pub struct QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations,
{ /* private fields */ }
Expand description

A quiver of type An together with a representation

Concretely, the quiver is a directed graph on vertex set 0, .., n have one directed edge of form (i, i+1) or (i+1,i) for all i < n. The representation consists of

  • A copy of F^{i_k} to each vertex k, where F is a vector space, i_k is a nonnegative integer
  • A matrix to each directed edge, where matrix dimensions match the dimensions of the vector spaces assigned to each of the incident vertices. This means that the matrix M for a directed edge (p,q) should have size i_p x i_q. We think of this matrix as a linear map on row vectors sending r to r * M, not a map of column vectors sending c to M * c. This convention is a bit unusual, but we adopt it because allows us to use some powerful computational tools. In particular, it allows us to use a U-match factorization package which works most efficiently with row-major matrices.

This struct holds three vectors:

  • vector_space_dimensions is the dimension of the vector space sitting over vertex i
  • arrow_directions[i] equals true iff arrow i <--> i+1 points forward, i.e. from i to i+1
  • matrix[i] is the matrix representation of the map between vector spaces i and i+1

It also stores a

  • ring_operator, which is an object that can perform the basic algebraic operations of the coefficient field (addition, multiplication, division, etc.)

Implementations§

Source§

impl<RingOperator> QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations,

Source

pub fn new( arrow_directions: Vec<bool>, matrices: Vec<VecOfVec<usize, RingOperator::Element>>, vector_space_dimensions: Vec<usize>, ring_operator: RingOperator, ) -> Self

Constructs a new QuiverReprsentation.

Source§

impl<RingOperator> QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations,

Source

pub fn dissolve( self, ) -> (Vec<bool>, Vec<VecOfVec<usize, RingOperator::Element>>, Vec<usize>, RingOperator)

Source§

impl<RingOperator> QuiverReprsentation<RingOperator>
where RingOperator: Clone + DivisionRingOperations,

Source

pub fn number_of_arrows(&self) -> usize

Number of arrows in the quiver

Source

pub fn number_of_vertices(&self) -> usize

Source

pub fn vector_space_dimensions(&self) -> &Vec<usize>

The list of dimensions of the vector spaces

Source

pub fn arrow_directions(&self) -> &Vec<bool>

Reference to the internally stored vector of arrow directions

If v is this vector then v[p] == true implies that arrow p points right; otherwise arrow p points left.

Source

pub fn arrow_matrices(&self) -> &Vec<VecOfVec<usize, RingOperator::Element>>

Returns a reference to the sequence of matrices corresponding to the arrows in the directed graph

Source

pub fn dimension_of_space_over_vertex(&self, n: usize) -> Option<usize>

Returns the dimension of the nth space in the sequence

Source

pub fn ring_operator(&self) -> RingOperator

Returns the ring operator for the coefficient field.

A “ring operator” is an object that performs the basic algebraic operations of a ring on the elements of the ring. For example, you could use a ring operator to multiply or add two elements. See the OAT documentation for rings for details.

Source

pub fn matrix_packet_for_vertex( &self, vertex: usize, ) -> Option<MatrixAlgebraPacket<&VecOfVec<usize, RingOperator::Element>, RingOperator, OrderOperatorByKey, OrderOperatorAuto, OrderOperatorByKey, OrderOperatorAuto>>

Returns a matrix algebra packet for the given vertex, or None if the vertex is out of bounds

Source

pub fn validate_representation(&self) -> Result<(), HashMap<&str, usize>>

Checks that the user input data is a valid quiver representation

Specifically, it checks that

  • n_arrows = n_matrices = n_vertices - 1 if n_vertices > 0
  • for each arrow p <--> p + 1, the size of the associated matrix agrees with the reported dimensions for p and p+1

If these tests pass then the function returns Ok(()). Otherwise it returns Err(hash), where hash is a dictionary containing information about the error.

Source

pub fn diagonalize( &self, ) -> Result<Diagonalization<RingOperator::Element>, HashMap<&str, usize>>

Decompose the quiver representation as a direct sum of interval modules

Source

pub fn validate_diagonalization( &self, diagonalization: &Diagonalization<RingOperator::Element>, ) -> Result<(), HashMap<&str, usize>>
where RingOperator::Element: PartialEq,

Verify a diagonalization

This will check that

  • every basis vector in the diagonalization maps either to zero or to another basis vector
  • no two basis vectors map to the same basis vector
  • the information recorded for each bar in the barcode accurately tracks the chain of associated bases vectors in the representation

Trait Implementations§

Source§

impl<RingOperator> Clone for QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations + Clone, RingOperator::Element: Clone,

Source§

fn clone(&self) -> QuiverReprsentation<RingOperator>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<RingOperator> Debug for QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations + Debug, RingOperator::Element: Debug,

Source§

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

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

impl<RingOperator> Eq for QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations + Eq, RingOperator::Element: Eq,

Source§

impl<RingOperator> PartialEq for QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations + PartialEq, RingOperator::Element: PartialEq,

Source§

fn eq(&self, other: &QuiverReprsentation<RingOperator>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<RingOperator> StructuralPartialEq for QuiverReprsentation<RingOperator>
where RingOperator: DivisionRingOperations + PartialEq, RingOperator::Element: PartialEq,

Auto Trait Implementations§

§

impl<RingOperator> Freeze for QuiverReprsentation<RingOperator>
where RingOperator: Freeze,

§

impl<RingOperator> RefUnwindSafe for QuiverReprsentation<RingOperator>
where RingOperator: RefUnwindSafe, <RingOperator as SemiringOperations>::Element: RefUnwindSafe,

§

impl<RingOperator> Send for QuiverReprsentation<RingOperator>
where RingOperator: Send, <RingOperator as SemiringOperations>::Element: Send,

§

impl<RingOperator> Sync for QuiverReprsentation<RingOperator>
where RingOperator: Sync, <RingOperator as SemiringOperations>::Element: Sync,

§

impl<RingOperator> Unpin for QuiverReprsentation<RingOperator>
where RingOperator: Unpin, <RingOperator as SemiringOperations>::Element: Unpin,

§

impl<RingOperator> UnsafeUnpin for QuiverReprsentation<RingOperator>
where RingOperator: UnsafeUnpin,

§

impl<RingOperator> UnwindSafe for QuiverReprsentation<RingOperator>
where RingOperator: UnwindSafe, <RingOperator as SemiringOperations>::Element: UnwindSafe,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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

impl<T> IntoReverseOrder for T

Source§

fn into_reverse_order(self) -> ReverseOrder<T>

Returns an inverted order operator, consuming self

Source§

impl<T> MultiVectorOperations for T

Source§

fn linearly_combine_scalar_vector_pairs_without_symplifying<RingOperator, OrderOperator, Vector, Index, RingElement>( self, ring_operator: RingOperator, order_operator: OrderOperator, ) -> IteratorsMergedInSortedOrder<Scale<Vector::IntoIter, RingOperator>, OrderOperator>
where Self: Sized + IntoIterator<Item = (RingOperator::Element, Vector)>, Vector: IntoIterator<IntoIter: Iterator<Item: KeyValSet<Key = Index, Val = RingElement>>>, Index: PartialEq, OrderOperator: JudgePartialOrder<Vector::Item>, RingOperator: Clone + SemiringOperations<Element = RingElement>,

Returns a linear combination, without simplifying Read more
Source§

fn linearly_combine_scalar_vector_pairs<RingOperator, OrderOperator, Vector, RingElement>( self, ring_operator: RingOperator, order_operator: OrderOperator, ) -> Simplify<IteratorsMergedInSortedOrder<Scale<Vector::IntoIter, RingOperator>, OrderOperator>, RingOperator>
where Self: Sized + IntoIterator<Item = (RingElement, Vector)>, Vector: IntoIterator, Vector::Item: PartialEq + KeyValSet<Val = RingElement>, <Vector::Item as KeyValGet>::Key: PartialEq, OrderOperator: JudgePartialOrder<Vector::Item>, RingOperator: Clone + SemiringOperations<Element = RingElement>,

Returns a simplified linear combination Read more
Source§

fn sum_vectors_unsimplified<OrderOperator>( self, order_operator: OrderOperator, ) -> IteratorsMergedInSortedOrder<<Self::Item as IntoIterator>::IntoIter, OrderOperator>
where Self: Sized + IntoIterator, Self::Item: IntoIterator, OrderOperator: JudgePartialOrder<<<Self as IntoIterator>::Item as IntoIterator>::Item>,

Sum two or more vectors without simplifying Read more
Source§

fn sum_vectors<RingOperator, OrderOperator, RingElement, Index>( self, ring_operator: RingOperator, order_operator: OrderOperator, ) -> Simplify<IteratorsMergedInSortedOrder<<Self::Item as IntoIterator>::IntoIter, OrderOperator>, RingOperator>
where Self: Sized + IntoIterator, Self::Item: IntoIterator, <Self::Item as IntoIterator>::Item: PartialEq + KeyValSet<Key = Index, Val = RingElement>, OrderOperator: JudgePartialOrder<<<Self as IntoIterator>::Item as IntoIterator>::Item>, RingOperator: SemiringOperations<Element = RingElement>, Index: PartialEq,

Sum a collection of vectors, and simplify Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

unsafe fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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> TransformIter for T

Source§

fn require_strict_ascent<OrderOperator>( self, order_operator: OrderOperator, ) -> RequireStrictAscent<Self, OrderOperator>
where Self: Sized + Iterator, Self::Item: Clone, OrderOperator: JudgePartialOrder<Self::Item>,

Wraps self in a struct that requires items to appear in strictly sorted order. Read more
Source§

fn require_strict_ascent_with_panic<OrderOperator>( self, order_operator: OrderOperator, ) -> RequireStrictAscentWithPanic<Self, OrderOperator>
where Self: Sized + Iterator, Self::Item: Clone, OrderOperator: JudgePartialOrder<Self::Item>,

Wraps self in a struct that requires items to appear in strictly sorted order. 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.
Source§

impl<T> Ungil for T
where T: Send,

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V