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 vertexk, whereFis a vector space,i_kis 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
Mfor a directed edge(p,q)should have sizei_p x i_q. We think of this matrix as a linear map on row vectors sendingrtor * M, not a map of column vectors sendingctoM * 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_dimensionsis the dimension of the vector space sitting over vertexiarrow_directions[i]equalstrueiff arrowi <--> i+1points forward, i.e. fromitoi+1matrix[i]is the matrix representation of the map between vector spacesiandi+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,
impl<RingOperator> QuiverReprsentation<RingOperator>where
RingOperator: DivisionRingOperations,
Source§impl<RingOperator> QuiverReprsentation<RingOperator>where
RingOperator: DivisionRingOperations,
impl<RingOperator> QuiverReprsentation<RingOperator>where
RingOperator: DivisionRingOperations,
Source§impl<RingOperator> QuiverReprsentation<RingOperator>where
RingOperator: Clone + DivisionRingOperations,
impl<RingOperator> QuiverReprsentation<RingOperator>where
RingOperator: Clone + DivisionRingOperations,
Sourcepub fn number_of_arrows(&self) -> usize
pub fn number_of_arrows(&self) -> usize
Number of arrows in the quiver
pub fn number_of_vertices(&self) -> usize
Sourcepub fn vector_space_dimensions(&self) -> &Vec<usize>
pub fn vector_space_dimensions(&self) -> &Vec<usize>
The list of dimensions of the vector spaces
Sourcepub fn arrow_directions(&self) -> &Vec<bool>
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.
Sourcepub fn arrow_matrices(&self) -> &Vec<VecOfVec<usize, RingOperator::Element>>
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
Sourcepub fn dimension_of_space_over_vertex(&self, n: usize) -> Option<usize>
pub fn dimension_of_space_over_vertex(&self, n: usize) -> Option<usize>
Returns the dimension of the nth space in the sequence
Sourcepub fn ring_operator(&self) -> RingOperator
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.
Sourcepub fn matrix_packet_for_vertex(
&self,
vertex: usize,
) -> Option<MatrixAlgebraPacket<&VecOfVec<usize, RingOperator::Element>, RingOperator, OrderOperatorByKey, OrderOperatorAuto, OrderOperatorByKey, OrderOperatorAuto>>
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
Sourcepub fn validate_representation(&self) -> Result<(), HashMap<&str, usize>>
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 - 1ifn_vertices > 0- for each arrow
p <--> p + 1, the size of the associated matrix agrees with the reported dimensions forpandp+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.
Sourcepub fn diagonalize(
&self,
) -> Result<Diagonalization<RingOperator::Element>, HashMap<&str, usize>>
pub fn diagonalize( &self, ) -> Result<Diagonalization<RingOperator::Element>, HashMap<&str, usize>>
Decompose the quiver representation as a direct sum of interval modules
Sourcepub fn validate_diagonalization(
&self,
diagonalization: &Diagonalization<RingOperator::Element>,
) -> Result<(), HashMap<&str, usize>>
pub fn validate_diagonalization( &self, diagonalization: &Diagonalization<RingOperator::Element>, ) -> Result<(), HashMap<&str, usize>>
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>
impl<RingOperator> Clone for QuiverReprsentation<RingOperator>
Source§fn clone(&self) -> QuiverReprsentation<RingOperator>
fn clone(&self) -> QuiverReprsentation<RingOperator>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<RingOperator> Debug for QuiverReprsentation<RingOperator>
impl<RingOperator> Debug for QuiverReprsentation<RingOperator>
impl<RingOperator> Eq for QuiverReprsentation<RingOperator>
Source§impl<RingOperator> PartialEq for QuiverReprsentation<RingOperator>
impl<RingOperator> PartialEq for QuiverReprsentation<RingOperator>
impl<RingOperator> StructuralPartialEq for QuiverReprsentation<RingOperator>
Auto Trait Implementations§
impl<RingOperator> Freeze for QuiverReprsentation<RingOperator>where
RingOperator: Freeze,
impl<RingOperator> RefUnwindSafe for QuiverReprsentation<RingOperator>
impl<RingOperator> Send for QuiverReprsentation<RingOperator>
impl<RingOperator> Sync for QuiverReprsentation<RingOperator>
impl<RingOperator> Unpin for QuiverReprsentation<RingOperator>
impl<RingOperator> UnsafeUnpin for QuiverReprsentation<RingOperator>where
RingOperator: UnsafeUnpin,
impl<RingOperator> UnwindSafe for QuiverReprsentation<RingOperator>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> IntoReverseOrder for T
impl<T> IntoReverseOrder for T
Source§fn into_reverse_order(self) -> ReverseOrder<T>
fn into_reverse_order(self) -> ReverseOrder<T>
Returns an inverted order operator, consuming self
Source§impl<T> MultiVectorOperations for T
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>,
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>,
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>,
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>,
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>,
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>,
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,
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,
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<T> TransformIter for T
impl<T> TransformIter for T
Source§fn require_strict_ascent<OrderOperator>(
self,
order_operator: OrderOperator,
) -> RequireStrictAscent<Self, OrderOperator> ⓘ
fn require_strict_ascent<OrderOperator>( self, order_operator: OrderOperator, ) -> RequireStrictAscent<Self, OrderOperator> ⓘ
self in a struct that requires items to appear in strictly sorted order. Read moreSource§fn require_strict_ascent_with_panic<OrderOperator>(
self,
order_operator: OrderOperator,
) -> RequireStrictAscentWithPanic<Self, OrderOperator> ⓘ
fn require_strict_ascent_with_panic<OrderOperator>( self, order_operator: OrderOperator, ) -> RequireStrictAscentWithPanic<Self, OrderOperator> ⓘ
self in a struct that requires items to appear in strictly sorted order. Read more