Uses of Interface
dev.nm.graph.Graph
-
Packages that use Graph Package Description dev.nm.graph dev.nm.graph.algorithm.traversal dev.nm.graph.type -
-
Uses of Graph in dev.nm.graph
Subinterfaces of Graph in dev.nm.graph Modifier and Type Interface Description interface
DAGraph<V,E extends Arc<V>>
A directed acyclic graph (DAG), is a directed graph with no directed cycles.interface
DiGraph<V,E extends Arc<V>>
A directed graph or digraph is a graph, or set of nodes connected by edges, where the edges have a direction associated with them.interface
Forest<V,E extends HyperEdge<V>>
A forest is a disjoint union of trees.interface
RootedTree<V,E extends Arc<V>>
A rooted tree is a directed graph, and has a root to measure distance from the root.interface
Tree<V,E extends HyperEdge<V>>
A tree is an undirected graph in which any two vertices are connected by exactly one simple path.interface
UnDiGraph<V,E extends UndirectedEdge<V>>
An undirected graph is a graph, or set of nodes connected by edges, where an edge does not differentiate between (a, b) or (b, a).Methods in dev.nm.graph that return Graph Modifier and Type Method Description Graph<V,E>
Graph. addEdge(E e)
Adds an edge to this graph.Graph<V,E>
Graph. addVertex(V v)
Adds a vertex to this graph.Graph<V,E>
Graph. removeEdge(E e)
Removes an edge from this graph.static <V,E extends HyperEdge<V>>
Graph<V,E>GraphUtils. removeIsolatedVertices(Graph<V,E> g)
Removes those nodes that have no edges from a graph.Graph<V,E>
Graph. removeVertex(V v)
Removes a vertex from this graph.Methods in dev.nm.graph with parameters of type Graph Modifier and Type Method Description static <V,E extends HyperEdge<V>>
voidGraphUtils. addEdges(Graph<V,E> g, E... edges)
Add a set of edges to a graph.static <V> void
GraphUtils. addVertices(Graph<V,?> G, V... V)
Add a set of vertices to a graph.static <V> boolean
GraphUtils. containsEdge(Graph<V,?> g, HyperEdge<V> e)
Returns true if this graph's edge collection containse
static <V> boolean
GraphUtils. containsVertex(Graph<V,?> g, V v)
Returns true if this graph's vertex collection containsv
static <V> boolean
GraphUtils. equals(Graph<V,?> g1, Graph<V,?> g2)
Check if two graphs are equal in terms of node values and edges.static <V> Set<HyperEdge<V>>
GraphUtils. getEdges(Graph<V,?> g, V v1, V v2)
Gets the set of edges that connect the two vertices.static <V> Set<V>
GraphUtils. getNeighbors(Graph<V,?> g, V v)
Gets the set of vertices which are connected tov
via any edges in this graph.static <V> int
GraphUtils. numberOfEdges(Graph<V,?> g)
Gets the number of edges in this graph.static <V> int
GraphUtils. numberOfVertices(Graph<V,?> g)
Gets the number of vertices in this graph.static <V,E extends HyperEdge<V>>
Graph<V,E>GraphUtils. removeIsolatedVertices(Graph<V,E> g)
Removes those nodes that have no edges from a graph. -
Uses of Graph in dev.nm.graph.algorithm.traversal
Fields in dev.nm.graph.algorithm.traversal declared as Graph Modifier and Type Field Description protected Graph<? extends V,? extends Edge<V>>
TraversalFromRoots. g
Methods in dev.nm.graph.algorithm.traversal with parameters of type Graph Modifier and Type Method Description static <V,W extends V>
List<BFS.Node<V>>BFS. BFS(Graph<W,? extends Edge<V>> g, V root, int time)
Runs the breadth-first-search on a graph from a designated root.static <V,W extends V>
List<DFS.Node<V>>DFS. DFS(Graph<W,? extends Edge<V>> g, V root, int time)
Runs the depth-first-search on a graph from a designated root.Constructors in dev.nm.graph.algorithm.traversal with parameters of type Graph Constructor Description BFS(Graph<V,? extends Edge<V>> g)
Constructs a BFS tree of a graph.DFS(Graph<? extends V,? extends Edge<V>> g)
Constructs a DFS tree of a graph.TraversalFromRoots(Graph<? extends V,? extends Edge<V>> g)
Constructs a traversal order of a graph. -
Uses of Graph in dev.nm.graph.type
Classes in dev.nm.graph.type that implement Graph Modifier and Type Class Description class
SparseDAGraph<V,E extends Arc<V>>
This class implements the sparse directed acyclic graph representation.class
SparseDiGraph<V,E extends Arc<V>>
This class implements the sparse directed graph representation.class
SparseGraph<V,E extends HyperEdge<V>>
This class implements the sparse graph representation.class
SparseTree<V>
This class implements the sparse tree representation.class
SparseUnDiGraph<V,E extends UndirectedEdge<V>>
This class implements the sparse undirected graph representation.class
VertexTree<T>
AVertexTree
is both a tree and a vertex/node.This implementation builds a tree incrementally and recursively (combining trees).Constructors in dev.nm.graph.type with parameters of type Graph Constructor Description SparseGraph(Graph<V,E> g)
(Copy) construct a graph from another graph.
-