Graph Structure | ||
GraphNumberOfEdges GraphNumberOfVertices |
edge or vertex count | |
GraphEdgeValuesMatrix GraphEdgeValuesList |
edge weights as matrix or as list | |
GraphAdjacencyMatrix GraphAdjacencyList |
adjacency matrix or list | |
GraphVerticesNeighbors | predecessors and successors for vertices | |
GraphUndirectedQ | test if graph is completely undirected | |
GraphStronglyCompleteQ GraphWeaklyCompleteQ |
test if all vertex pairs are connected by an edge |
Vertex Information | ||
VertexDegree GraphDegrees |
vertex degree(s) in a graph | |
VertexIn/OutDegree GraphIn/OutDegrees |
in-degree(s) and out-degree(s) in a directed graph | |
GraphVerticesWithOddInDegree GraphVerticesWithOddOutDegree |
vertices with odd in-degree or out-degree | |
VertexIsolatedQ | test if vertex is not connected to an edge |
Edge Information | ||
GraphNegativeEdgesQ | test if any edge has a negative weight | |
GraphParallelEdgesQ | test if graph contains parallel edges | |
GraphSelfLoopsQ | test if any vertex connects itself |
Path Properties | ||
WalkLength | length of a path with respect to edge weights | |
WalkClosedQ | test if start and end vertex coincide | |
WalkCyclesQ | test if path contains any cycles |
Cycles and Trees | ||
GraphCyclesQ | test if graph contains (undirected) cycles | |
GraphDirectedCyclesQ | test if graph contains directed cycles | |
GraphNegativeCyclesQ | test if graph contains any cycles with a negative length | |
GraphNegativeDirectedCyclesQ | test if graph contains any directed cycles with a negative length | |
GraphTreeQ | test if graph is a tree | |
GraphDirectedTreeQ | test if graph is a directed root tree |
Order | ||
GraphTopologicalVertexOrderQ | test if graph is sorted topologically | |
AnyTopologicalVertexOrder | topologically sorted list of vertices |
Connectivity | ||
GraphWeaklyConnectedQ | test if all vertices are connected by undirected edges | |
GraphStronglyConnectedQ | test if all vertices are connected by directed edges | |
GraphWeaklyConnectedComponentSet VertexWeaklyConnectedComponent |
vertex set(s) that are each weakly connected | |
GraphStronglyConnectedComponentSet VertexDirectedPathsToVertexSet VertexDirectedPathsFromVertexSet |
vertex set(s) that are each connected by directed edges | |
VertexPairWeaklyConnectedQ | test if two vertices are connected by undirected edges | |
VertexPairDirectedPathFromToQ | test if two vertices are connected by directed edges | |
VertexDirectedPathsToAllQ | test if a vertex can reach all others by directed edges | |
VertexDirectedPathsFromAllQ | test if a vertex can be reached from all others by directed edges |