[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Adjacency, Degree and Distance

Adjacency, Degree and Distance

Subsections

Adjacency, Degree and Distance Functions for a Graph

Alldeg(G, n) : GrphUnd, RngIntElt -> { GrphVert }
Given a graph G, and a non-negative integer n, return the set of all vertices of G that have degree equal to n.
Ball(u, n) : GrphVert, RngIntElt -> { GrphVert }
Given a vertex u belonging to a graph G, and a non-negative integer n, return the set of vertices of G that are at distance n or less from u.
Bipartition(G) : GrphUnd -> [ { GrphVert } ]
Given a bipartite graph G, return its two partite sets in the form of a pair of subsets of V(G).
Degree(u) : GrphVert -> RngIntElt
Given a vertex u of the graph G, return the degree of u, ie the number of edges incident to u.
DegreeSequence(G) : Grph -> [ { GrphVert } ]
Given a graph G such that the maximum degree of any vertex of G is r, return a sequence D of length r + 1, such that D[i], 1 <= i <= r + 1, is the number of vertices in G having degree i - 1.
Distance(u, v) : GrphVert, GrphVert -> RngIntElt
Given two vertices u and v belonging to a graph G, return the length of a shortest path from u to v. If u and v lie in different components, the value -1 is returned.
EndVertices(e) : GrphEdge -> { GrphVert }
Given an edge e belonging to the graph G, return a set containing the two end vertices of e.
IncidentEdges(u) : GrphVert -> { GrphEdge }
The set of all edges incident with the vertex u.
MaximumDegree(G) : GrphUnd -> RngIntElt, GrphVert
Maxdeg(G) : GrphUnd -> RngIntElt, GrphVert
The maximum of the degrees of the vertices of G. This function returns two values: The maximum degree, and a vertex of G having that degree.
MinimumDegree(G) : GrphUnd -> RngIntElt, GrphVert
Mindeg(G) : GrphUnd -> RngIntElt, GrphVert
The minimum of the degrees of the vertices of G. This function returns two values: The minimum degree, and a vertex of G having that degree.
Neighbours(u) : GrphVert -> { GrphVert }
Neighbors(u) : GrphVert -> { GrphVert }
Given a vertex u of the graph G, return the set of vertices of G that are adjacent to u.
Sphere(u, n) : GrphVert, RngIntElt -> { GrphVert }
Given a vertex u belonging to the graph G, and a non-negative integer n, return the set of vertices of G that are at distance n from u.
Valence(G) : GrphUnd -> RngIntElt
Given a regular graph G, return the valence of G (the degree of any vertex).

Adjacency and Degree Functions for a Digraph

u adj v : GrphVert, GrphVert -> BoolElt
Given vertices u and v belonging to a digraph G, return the value true if there is an edge directed from vertex u to vertex v, otherwise false.
e adj f : GrphEdge, GrphEdge -> BoolElt
True if the edge e is adjacent to the edge f, where e and f are edges belonging to the digraph G, otherwise false.
u notadj v : GrphVert, GrphVert -> BoolElt
Given vertices u and v belonging to a digraph G, return the value true if there is not an edge directed from vertex u to vertex v, otherwise false.
e notadj f : GrphEdge, GrphEdge -> BoolElt
True if the edge e is not adjacent to the edge f, where e and f are edges belonging to the digraph G, otherwise false.
u in e : GrphVert, GrphEdge -> BoolElt
True if the vertex u is an endpoint of the edge e, where u and e belong to the digraph G, otherwise false.
Alldeg(G, n) : GrphDir, RngIntElt -> { GrphVert }
Given a digraph G, and a non-negative integer n, return the set of all vertices of G that have total degree equal to n.
Ball(u, n) : Vert, RngIntElt -> { GrphVert }
Given a vertex u belonging to a connected digraph G, and a non-negative integer n, return the set of vertices of G that are at distance n or less from u. Thus, Ball(u, n) is the set of vertices of G that are connected to u by a directed path of length at most n.
Degree(u) : GrphVert -> RngIntElt
Given a vertex u belonging to the digraph G, return the total degree of u, i.e. the sum of the in-degree and out-degree for u.
EndVertices(e) : GrphEdge -> [GrphVert]
Given an edge e belonging to the digraph G, return a sequence of length two whose first component is the first vertex of e, and whose second component is the second vertex of e.
InDegree(u) : GrphVert -> RngIntElt
The number of edges directed into the vertex u belonging to the directed graph G.
InNeighbours(u) : GrphVert -> { GrphVert }
InNeighbors(u) : GrphVert -> { GrphVert }
Given a vertex u of the digraph G, return the set containing all vertices v such that vu is an edge in the digraph, i.e. the starting points of all edges that are directed into the vertex u.
MaximumDegree(G) : GrphDir -> RngIntElt, GrphVert
Maxdeg(G) : GrphDir -> RngIntElt, GrphVert
The maximum total degree of the vertices of the digraph G. This function returns two values: The maximum total degree, and the first vertex of G having that degree.
MaximumInDegree(G) : GrphDir -> RngIntElt, GrphVert
Maxindeg(G) : GrphDir -> RngIntElt, GrphVert
The maximum indegree of the vertices of the digraph G. This function returns two values: The maximum indegree, and the first vertex of G having that degree.
MaximumOutDegree(G) : GrphDir -> RngIntElt, GrphVert
Maxoutdeg(G) : GrphDir -> RngIntElt, GrphVert
The maximum outdegree of the vertices of the digraph G. This function returns two values: The maximum outdegree, and the first vertex of G having that degree.
MinimumDegree(G) : GrphDir -> RngIntElt, GrphVert
Mindeg(G) : GrphDir -> RngIntElt, GrphVert
The minimum total degree of the vertices of the digraph G. This function returns two values: The minimum total degree, and the first vertex of G having that degree.
MinimumInDegree(G) : GrphDir -> RngIntElt, GrphVert
Minindeg(G) : GrphDir -> RngIntElt, GrphVert
The minimum indegree of the vertices of the digraph G. This function returns two values: The minimum indegree, and the first vertex of G having that degree.
MinimumOutDegree(G) : GrphDir -> RngIntElt, GrphVert
Minoutdeg(G) : GrphDir -> RngIntElt, GrphVert
The minimum outdegree of the vertices of the digraph G. This function returns two values: The minimum outdegree, and the first vertex of G having that degree.
OutDegree(u) : GrphVert -> RngIntElt
The number of edges of the form uv where u is a vertex belonging to the directed graph G.
OutNeighbours(u) : GrphVert -> { GrphVert }
OutNeighbors(u) : GrphVert -> { GrphVert }
Given a vertex u of the digraph G, return the set of vertices v of G such that uv is an edge in the graph G, i.e. the set of vertices v that are the end vertices of edges directed from u to v.
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]