Quivers
Quivers are represented via their adjacency matrix. Vertices are numbered from $1$ to $n$.
QuiverTools.Quiver
— TypeSummary
struct Quiver
A quiver is represented by its adjacency $n \times n$ matrix $adjacency = (a_{ij})$,
where $n$ is the number of vertices and $a_{ij}$ is the number of arrows $i \to j$.
Fields
adjacency :: AbstractMatrix{Int}
name :: String
Constructors
QuiverTools implements constructors for most known quivers.
QuiverTools.kronecker_quiver
— Functionkronecker_quiver(m::Int)
Construct the Kronecker quiver with m
arrows.
Input
m
: (Default = 2) The number of arrows.
Output
The Kronecker quiver with m
arrows.
Examples
julia> kronecker_quiver(3)
3-Kronecker quiver
QuiverTools.loop_quiver
— Functionloop_quiver(m::Int)
Construct the loop quiver with m
arrows.
Input
m
: The number of arrows.
Output
The loop quiver with m
arrows.
Examples
julia> loop_quiver(4)
4-loop quiver
QuiverTools.subspace_quiver
— Functionsubspace_quiver(m::Int)
Construct the subspace quiver with m + 1
vertices.
Input
m
: The number of subspace-vertices.
Output
The subspace quiver with m
subspaces.
Examples
julia> subspace_quiver(3)
3-subspace quiver
julia> n_vertices(subspace_quiver(3))
4
QuiverTools.three_vertex_quiver
— Functionthree_vertex_quiver(m12::Int, m13::Int, m23::Int)
Construct the three-vertex quiver with the given arrow counts.
Input
m12
: The number of arrows from vertex 1 to vertex 2.m13
: The number of arrows from vertex 1 to vertex 3.m23
: The number of arrows from vertex 2 to vertex 3.
Output
A three-vertex quiver with the specified arrows.
Examples
julia> three_vertex_quiver(1, 2, 3)
Acyclic 3-vertex quiver
QuiverTools.cyclic_quiver
— Functioncyclic_quiver(n)
Construct the cyclic quiver on n
vertices.
Examples
julia> cyclic_quiver(4)
cyclic quiver on 4 vertices
QuiverTools.bipartite_quiver
— Functionbipartite_quiver(m, n)
Construct the bipartite quiver on m
and n
vertices.
Input
m
: The number of vertices in the first part.n
: The number of vertices in the second part.
Output
The bipartite quiver with m + n
vertices.
Examples
julia> bipartite_quiver(2, 3).adjacency
5×5 StaticArraysCore.SMatrix{5, 5, Int64, 25} with indices SOneTo(5)×SOneTo(5):
0 0 1 1 1
0 0 1 1 1
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
QuiverTools.opposite_quiver
— Function" opposite_quiver(Q::Quiver)
Construct the opposite quiver.
The opposite quiver has the same vertices, and an arrow $j \to i$ for every arrow $i \to j$ in the original quiver.
Input
Q::Quiver
: The quiver to be reversed.
Output
The quiver with the same vertices and reversed arrows.
Examples
julia> Q = kronecker_quiver()
2-Kronecker quiver
julia> opposite_quiver(Q)
opposite of 2-Kronecker quiver
QuiverTools.double_quiver
— Functiondouble_quiver(Q::Quiver)
Construct the double of a quiver.
The double of a quiver has the same vertices, and for every arrow $i \to j$ in the original quiver, an arrow $j\to i$ is added. In other words, the double of a quiver is the quiver obtained by adding the transpose of the adjacency matrix.
Examples
julia> Q = kronecker_quiver();
julia> double_quiver(Q)
double of 2-Kronecker quiver
QuiverTools.dynkin_quiver
— Functiondynkin_quiver(type, n)
Construct the Dynkin quiver, with arbitrary orientation of the arrows.
Examples
julia> dynkin_quiver("D", 4)
Dynkin quiver of type D4
Properties
QuiverTools offers various methods to study some graph-theoretical properties of quivers.
QuiverTools.n_vertices
— Functionn_vertices(Q::Quiver)
Return the number of vertices of Q
.
Examples
julia> Q = kronecker_quiver(4);
julia> n_vertices(Q) == 2
true
QuiverTools.n_arrows
— Functionn_arrows(Q::Quiver)
Return the number of arrows of Q
.
Examples
julia> Q = kronecker_quiver(4);
julia> n_arrows(Q) == 4
true
QuiverTools.arrows
— Functionarrows(Q::Quiver)
Return a list of all arrows of Q
.
Examples
julia> arrows(kronecker_quiver(3))
3-element Vector{Tuple{Int64, Int64}}:
(1, 2)
(1, 2)
(1, 2)
julia> arrows(loop_quiver(3))
3-element Vector{Tuple{Int64, Int64}}:
(1, 1)
(1, 1)
(1, 1)
QuiverTools.indegree
— Functionindegree(Q::Quiver, j::Int)
Return the number of incoming arrows to the vertex j
.
Examples
julia> Q = kronecker_quiver(4);
julia> indegree(Q, 1)
0
julia> indegree(Q, 2)
4
QuiverTools.outdegree
— Functionoutdegree(Q::Quiver, i::Int)
Return the number of outgoing arrows from the vertex i
.
Examples
julia> Q = kronecker_quiver(4);
julia> outdegree(Q, 1)
4
julia> outdegree(Q, 2)
0
QuiverTools.is_acyclic
— Functionis_acyclic(Q::Quiver)
Check whether Q
is acyclic, i.e., has no oriented cycles.
Examples
julia> Q = kronecker_quiver(4);
julia> is_acyclic(Q)
true
QuiverTools.is_connected
— Functionis_connected(Q::Quiver)
Check whether Q
is connected.
Examples
julia> is_connected(Quiver([0 1 0; 0 0 1; 1 0 0]))
true
julia> is_connected(Quiver([0 1 0; 1 0 0; 0 0 2]))
false
julia> is_connected(kronecker_quiver(4))
true
julia> is_connected(loop_quiver(4))
true
julia> is_connected(subspace_quiver(4))
true
QuiverTools.is_sink
— Functionis_sink(Q::Quiver, j::Int)
Checks if the vertex j
is a sink, i.e., a vertex with no outgoing arrows.
Examples
julia> Q = kronecker_quiver(4);
julia> is_sink(Q, 1)
false
julia> is_sink(Q, 2)
true
QuiverTools.is_source
— Functionis_source(Q::Quiver, i::Int)
Check whether the vertex i
is a source, i.e., a vertex with no incoming arrows.
Examples
julia> Q = kronecker_quiver(4);
julia> is_source(Q, 1)
true
julia> is_source(Q, 2)
false
QuiverTools.underlying_graph
— Functionunderlying_graph(Q::Quiver)
Return the (necessarily symmetric) adjacency matrix of the underlying graph of Q
.
Examples
julia> Q = kronecker_quiver(4);
julia> underlying_graph(Q) == [0 4; 4 0]
true