public class GraphUtils
extends java.lang.Object
Constructor and Description |
---|
GraphUtils() |
Modifier and Type | Method and Description |
---|---|
static GraphInterface |
copy(GraphInterface inGraph)
Makes a copy of a graph
|
static boolean |
isDouble(java.lang.String s)
verifies if an input string can be parsed as a double
|
static boolean |
isInt(java.lang.String s)
Checks whether a string is a decimal representation of an integer
|
static DirectedGraph |
reverseGraph(DirectedGraph g)
Reverses the input graph
|
static GraphInterface |
toggleDirected(GraphInterface inGraph)
If the input is a directed graph it returns an undirected one,
if the input graph is undirected, it returns a directed graph
|
public static boolean isInt(java.lang.String s)
s
- the stringpublic static boolean isDouble(java.lang.String s)
s
- the stringpublic static GraphInterface copy(GraphInterface inGraph)
inGraph
- the input graphpublic static GraphInterface toggleDirected(GraphInterface inGraph)
inGraph
- the input graphpublic static DirectedGraph reverseGraph(DirectedGraph g)
g
- a graph