public class ArrayBasedGraphLoader
extends java.lang.Object
Constructor and Description |
---|
ArrayBasedGraphLoader() |
Modifier and Type | Method and Description |
---|---|
static ArrayBasedGraph |
constructFromPolyhedron(Polyhedron_3<Point_> polyhedron)
Construct the graph corresponding to the 1-skeleton of a 3D surface.
|
static ArrayBasedGraph |
readGraphFromFile(java.lang.String filename)
Load a graph from a file
|
static ArrayBasedGraph |
readMetisFile(java.lang.String filename)
Load a graph from a file (in Metis format)
|
static void |
writeGraphToFile(ArrayBasedGraph g,
java.lang.String filename)
Encode (the connectivity of) a given graph into a text file
|
static void |
writeMeshSkeletonToFile(java.lang.String meshname,
java.lang.String output)
Construct the skeleton graph from a mesh and encode it into a file
Warning: it works only for triangle meshes
|
public static ArrayBasedGraph readGraphFromFile(java.lang.String filename)
filename
- the input file encoding the graphpublic static ArrayBasedGraph readMetisFile(java.lang.String filename)
filename
- the input file encoding the graph (lists of neighbors)public static void writeGraphToFile(ArrayBasedGraph g, java.lang.String filename)
g
- the graph to encodefilename
- the output filepublic static void writeMeshSkeletonToFile(java.lang.String meshname, java.lang.String output)
meshname
- the file storing the meshoutput
- the output file (encoding the graph)public static ArrayBasedGraph constructFromPolyhedron(Polyhedron_3<Point_> polyhedron)