Class NetworkGraph<V>
java.lang.Object
org.episteme.core.mathematics.discrete.NetworkGraph<V>
- All Implemented Interfaces:
Graph<V>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Graph
Graph.Edge<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds an edge between two vertices.booleanbooleanAdds a vertex to the graph.intReturns the degree (number of edges) of a vertex.Set<Graph.Edge<V>> edges()Returns all edges in this graph.booleanChecks if this graph is directed.Returns neighbors of a vertex.intReturns the number of vertices in the graph.vertices()Returns all vertices in this graph.
-
Constructor Details
-
NetworkGraph
public NetworkGraph()
-
-
Method Details
-
vertices
-
edges
-
addVertex
-
addEdge
-
addEdge
-
neighbors
-
degree
-
isDirected
public boolean isDirected()Description copied from interface:GraphChecks if this graph is directed.- Specified by:
isDirectedin interfaceGraph<V>- Returns:
- true if directed, false if undirected
-
vertexCount
public int vertexCount()Description copied from interface:GraphReturns the number of vertices in the graph.- Specified by:
vertexCountin interfaceGraph<V>- Returns:
- the number of vertices
-