public interface GraphType
The graph type describes various properties of a graph such as whether it is directed/undirected or mixed, whether it contain self-loops (edges with the same source and target vertices), whether it contain parallel-edges (multiple edges with the same source and target) and whether it is weighted or not.
Modifier and Type | Method and Description |
---|---|
GraphType |
asDirected()
Create a directed variant of the current graph type.
|
GraphType |
asMixed()
Create a mixed variant of the current graph type.
|
GraphType |
asModifiable()
Create a modifiable variant of the current graph type.
|
GraphType |
asUndirected()
Create an undirected variant of the current graph type.
|
GraphType |
asUnmodifiable()
Create an unmodifiable variant of the current graph type.
|
GraphType |
asUnweighted()
Create an unweighted variant of the current graph type.
|
GraphType |
asWeighted()
Create a weighted variant of the current graph type.
|
boolean |
isAllowingCycles()
Returns
true if and only if cycles are allowed in this graph. |
boolean |
isAllowingMultipleEdges()
Returns
true if and only if multiple edges are allowed in this graph. |
boolean |
isAllowingSelfLoops()
Returns
true if and only if self-loops are allowed in this graph. |
boolean |
isDirected()
Returns true if all edges of the graph are directed, false otherwise.
|
boolean |
isMixed()
Returns true if the graph contain both directed and undirected edges, false otherwise.
|
boolean |
isModifiable()
Returns
true if the graph is modifiable, false otherwise. |
boolean |
isMultigraph()
Returns
true if the graph is a multigraph, false otherwise. |
boolean |
isPseudograph()
Returns
true if the graph is a pseudograph, false otherwise. |
boolean |
isSimple()
Returns
true if the graph is simple, false otherwise. |
boolean |
isUndirected()
Returns true if all edges of the graph are undirected, false otherwise.
|
boolean |
isWeighted()
Returns
true if and only if the graph supports edge weights. |
boolean isDirected()
boolean isUndirected()
boolean isMixed()
boolean isAllowingMultipleEdges()
true
if and only if multiple edges are allowed in this graph. The
meaning of multiple edges is that there can be many edges going from vertex v1 to vertex v2.true
if and only if multiple edges are allowed.boolean isAllowingSelfLoops()
true
if and only if self-loops are allowed in this graph. A self loop is
an edge that its source and target vertices are the same.true
if and only if graph self-loops are allowed.boolean isAllowingCycles()
true
if and only if cycles are allowed in this graph.true
if and only if graph cycles are allowed.boolean isWeighted()
true
if and only if the graph supports edge weights.true
if the graph supports edge weights, false
otherwise.boolean isSimple()
true
if the graph is simple, false
otherwise.true
if the graph is simple, false
otherwiseboolean isPseudograph()
true
if the graph is a pseudograph, false
otherwise.true
if the graph is a pseudograph, false
otherwiseboolean isMultigraph()
true
if the graph is a multigraph, false
otherwise.true
if the graph is a multigraph, false
otherwiseboolean isModifiable()
true
if the graph is modifiable, false
otherwise.true
if the graph is modifiable, false
otherwiseGraphType asDirected()
GraphType asUndirected()
GraphType asMixed()
GraphType asUnweighted()
GraphType asWeighted()
GraphType asModifiable()
GraphType asUnmodifiable()
Copyright © 2017. All rights reserved.