public class TraversalMetrics
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
TraversalMetrics.graph_traversor<N,E>
action callback interface, for each node of a graph
|
static interface |
TraversalMetrics.node_test<N> |
class |
TraversalMetrics.traversor_degree_distribution<N,E> |
Constructor and Description |
---|
TraversalMetrics() |
Modifier and Type | Method and Description |
---|---|
static <N,E> int |
count(Graph<N,E> graph,
TraversalMetrics.node_test<N> t)
Traverse the graph and count those nodes which are accepted by
the node_test callback.
|
static <N,E> int[] |
degree_distribution(Graph<N,E> graph)
Traverse the Graph and create a histogram of the distribution
of nodal out-degree.
|
static <N,E> int |
edges(Graph<N,E> graph)
Traverse the graph and count the number of edges.
|
static <N,E> dmap<N> |
FloydWarshal(Graph<N,E> graph) |
static <N,E> float[] |
norm_degree_distribution(Graph<N,E> graph)
Traverse the Graph and create a histogram of the normalised distribution
of nodal out-degree.
|
static <N,E> java.util.Map<java.lang.String,java.lang.Double> |
stats(dmap<N> dmap,
Graph<N,E> graph) |
static <N,E> java.util.Map<java.lang.String,java.lang.Double> |
stats(Graph<N,E> graph) |
static <N,E> void |
traverse_graph(Graph<N,E> graph,
TraversalMetrics.graph_traversor<N,E> gt)
Simple convenience function to traverse a graph with the given traversor.
|
static <N,E> void |
traverse_graph(Graph<N,E> graph,
TraversalMetrics.graph_traversor<N,E>[] gts)
Simple convenience function to traverse a graph for each of the
given traversors
|
public static <N,E> void traverse_graph(Graph<N,E> graph, TraversalMetrics.graph_traversor<N,E> gt)
N
- E
- graph
- gt
- public static <N,E> void traverse_graph(Graph<N,E> graph, TraversalMetrics.graph_traversor<N,E>[] gts)
public static <N,E> int[] degree_distribution(Graph<N,E> graph)
N
- The type of the nodes in the graph.E
- The type of the edges in the graph.graph
- The graph to traversepublic static <N,E> float[] norm_degree_distribution(Graph<N,E> graph)
N
- The type of the nodes in the graph.E
- The type of the edges in the graph.graph
- The graph to traversepublic static <N,E> int count(Graph<N,E> graph, TraversalMetrics.node_test<N> t)
N
- The type of the nodes in the graph.E
- The type of the edges in the graph.graph
- The graph to traverset
- The boolean callback to apply to decide whether a node
should be counted or not.public static <N,E> int edges(Graph<N,E> graph)
public static <N,E> java.util.Map<java.lang.String,java.lang.Double> stats(Graph<N,E> graph)