Quivers
Quivers are represented via their adjacency matrix. Vertices are numbered from $1$ to $n$.
QuiverTools.Quiver — Type
Summary
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 — Function
kronecker_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 quiverQuiverTools.loop_quiver — Function
loop_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 quiverQuiverTools.subspace_quiver — Function
subspace_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))
4QuiverTools.three_vertex_quiver — Function
three_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 quiverQuiverTools.cyclic_quiver — Function
cyclic_quiver(n)Construct the cyclic quiver on n vertices.
Examples
julia> cyclic_quiver(4)
cyclic quiver on 4 verticesQuiverTools.bipartite_quiver — Function
bipartite_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 Matrix{Int64}:
0 0 1 1 1
0 0 1 1 1
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0QuiverTools.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 quiverQuiverTools.double_quiver — Function
double_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 quiverQuiverTools.dynkin_quiver — Function
dynkin_quiver(type, n)Construct the Dynkin quiver, with arbitrary orientation of the arrows.
Examples
julia> dynkin_quiver("D", 4)
Dynkin quiver of type D4Properties
QuiverTools offers various methods to study some graph-theoretical properties of quivers.
QuiverTools.n_vertices — Function
n_vertices(Q::Quiver)Return the number of vertices of Q.
Examples
julia> Q = kronecker_quiver(4);
julia> n_vertices(Q) == 2
trueQuiverTools.n_arrows — Function
n_arrows(Q::Quiver)Return the number of arrows of Q.
Examples
julia> Q = kronecker_quiver(4);
julia> n_arrows(Q) == 4
trueQuiverTools.arrows — Function
arrows(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 — Function
indegree(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)
4QuiverTools.outdegree — Function
outdegree(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)
0QuiverTools.is_acyclic — Function
is_acyclic(Q::Quiver)Check whether Q is acyclic, i.e., has no oriented cycles.
Examples
julia> Q = kronecker_quiver(4);
julia> is_acyclic(Q)
trueQuiverTools.is_connected — Function
is_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))
trueQuiverTools.is_sink — Function
is_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)
trueQuiverTools.is_source — Function
is_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)
falseQuiverTools.underlying_graph — Function
underlying_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