public class UtilityMethodsForG6Graphs
extends java.lang.Object
Constructor and Description |
---|
UtilityMethodsForG6Graphs() |
Modifier and Type | Method and Description |
---|---|
static EfficientListGraph |
convertStringToAdjacencyListGraph(java.lang.String toConvert)
Convert a string of the following format into an EfficientListGraph: 0 : 8; 1 : 8; 2 : 8; 3 : 8; 4 : 8; 5 : 8; 6
: 8; 7 : 8; 8 : 0 1 2 3 4 5 6 7;
|
static EfficientMatrixGraph |
convertStringToAdjacencyMatrixGraph(java.lang.String toConvert)
Convert a string of the following format into an EfficientMatrixGraph: 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0
0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0
1 0 0
|
static Graph |
G6toGraph(java.lang.String graph6)
Adapted from JS at "http://treedecompositions.com/#/translate" The string parameter is a graph of the format
specified here "https://users.cecs.anu.edu.au/~bdm/data/formats.html"
|
static java.util.List<EfficientListGraph> |
readListFile(java.lang.String pathToFile) |
static java.util.List<Graph> |
readListFileIntoGenericGraphs(java.lang.String pathToFile) |
static java.util.List<EfficientMatrixGraph> |
readMatrixFile(java.lang.String pathToFile)
Read a .MATRIX file and convert it into a list of EfficientMatrixGraph objects.
|
public static java.util.List<EfficientMatrixGraph> readMatrixFile(java.lang.String pathToFile) throws FileFormatException, java.io.IOException
pathToFile
- The path to the file to be readFileFormatException
- If the file is not a .MATRIX file.java.io.IOException
- If the .MATRIX file is malformed.public static EfficientMatrixGraph convertStringToAdjacencyMatrixGraph(java.lang.String toConvert)
toConvert
- The string object representing the graph.public static java.util.List<EfficientListGraph> readListFile(java.lang.String pathToFile) throws FileFormatException, java.io.IOException
FileFormatException
java.io.IOException
public static EfficientListGraph convertStringToAdjacencyListGraph(java.lang.String toConvert)
toConvert
- The string object representing the graph.public static java.util.List<Graph> readListFileIntoGenericGraphs(java.lang.String pathToFile) throws FileFormatException, java.io.IOException
FileFormatException
java.io.IOException
public static Graph G6toGraph(java.lang.String graph6)