edu.stanford.math.plex4.graph.utility
public class GraphUtility extends java.lang.Object
Constructor and Description |
---|
GraphUtility() |
Modifier and Type | Method and Description |
---|---|
static double[][] |
computeShortestPaths(AbstractUndirectedGraph graph)
This function computes all of the distances between pairs of vertices using
the Floyd-Warshall algorithm.
|
static int[][] |
getAdjacencyMatrix(AbstractUndirectedGraph graph)
This function computes the adjacency matrix of the given graph.
|
static double[][] |
getAdjacencyMatrix(AbstractWeightedUndirectedGraph graph)
This function computes the adjacency matrix of the given graph.
|
static int[][] |
getLaplacianMatrix(AbstractUndirectedGraph graph)
This function computes the Laplacian matrix of a graph.
|
static double[][] |
getLaplacianMatrix(AbstractWeightedUndirectedGraph graph)
This function computes the Laplacian matrix of a graph.
|
static edu.stanford.math.primitivelib.autogen.matrix.IntSparseMatrix |
getSparseAdjacencyMatrix(AbstractUndirectedGraph graph)
This function computes the adjacency matrix of the given graph.
|
static edu.stanford.math.primitivelib.autogen.matrix.DoubleSparseMatrix |
getSparseAdjacencyMatrix(AbstractWeightedUndirectedGraph graph)
This function computes the adjacency matrix of the given graph.
|
static edu.stanford.math.primitivelib.autogen.matrix.IntSparseMatrix |
getSparseLaplacianMatrix(AbstractUndirectedGraph graph)
This function computes the Laplacian matrix of a graph.
|
static edu.stanford.math.primitivelib.autogen.matrix.DoubleSparseMatrix |
getSparseLaplacianMatrix(AbstractWeightedUndirectedGraph graph)
This function computes the Laplacian matrix of a graph.
|
static GeometricSimplexStream |
toGeometricSimplexStream(AbstractUndirectedGraph graph,
double[][] points) |
static ExplicitSimplexStream |
toSimplexStream(AbstractUndirectedGraph graph) |
public static GeometricSimplexStream toGeometricSimplexStream(AbstractUndirectedGraph graph, double[][] points)
public static ExplicitSimplexStream toSimplexStream(AbstractUndirectedGraph graph)
public static double[][] computeShortestPaths(AbstractUndirectedGraph graph)
graph
- the graphpublic static int[][] getAdjacencyMatrix(AbstractUndirectedGraph graph)
graph
- the graph to compute the adjacency matrix ofpublic static edu.stanford.math.primitivelib.autogen.matrix.IntSparseMatrix getSparseAdjacencyMatrix(AbstractUndirectedGraph graph)
graph
- the graph to compute the adjacency matrix ofpublic static double[][] getAdjacencyMatrix(AbstractWeightedUndirectedGraph graph)
graph
- the graph to compute the adjacency matrix ofpublic static edu.stanford.math.primitivelib.autogen.matrix.DoubleSparseMatrix getSparseAdjacencyMatrix(AbstractWeightedUndirectedGraph graph)
graph
- the graph to compute the adjacency matrix ofpublic static int[][] getLaplacianMatrix(AbstractUndirectedGraph graph)
graph
- the graphpublic static edu.stanford.math.primitivelib.autogen.matrix.IntSparseMatrix getSparseLaplacianMatrix(AbstractUndirectedGraph graph)
graph
- the graphpublic static double[][] getLaplacianMatrix(AbstractWeightedUndirectedGraph graph)
graph
- the graphpublic static edu.stanford.math.primitivelib.autogen.matrix.DoubleSparseMatrix getSparseLaplacianMatrix(AbstractWeightedUndirectedGraph graph)
graph
- the graph