public class GraphDistance extends Object implements Statistics, LongTask
| Modifier and Type | Field and Description |
|---|---|
static String |
BETWEENNESS |
static String |
CLOSENESS |
static String |
ECCENTRICITY |
static String |
HARMONIC_CLOSENESS |
| Constructor and Description |
|---|
GraphDistance()
Construct a GraphDistance calculator for the current graph model
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,double[]> |
calculateDistanceMetrics(org.gephi.graph.api.Graph graph,
HashMap<org.gephi.graph.api.Node,Integer> indicies,
boolean directed,
boolean normalized) |
boolean |
cancel()
Cancel the task.
|
HashMap<org.gephi.graph.api.Node,Integer> |
createIndiciesMap(org.gephi.graph.api.Graph graph) |
void |
execute(org.gephi.graph.api.Graph graph) |
void |
execute(org.gephi.graph.api.GraphModel graphModel)
Executes the statistics algorithm.
|
double |
getDiameter() |
double |
getPathLength()
Gets the average shortest path length in the network
|
double |
getRadius() |
String |
getReport()
Returns an HTML string that displays the statistics result.
|
void |
initializeStartValues() |
boolean |
isDirected() |
boolean |
isNormalized() |
void |
setDirected(boolean isDirected) |
void |
setNormalized(boolean isNormalized) |
void |
setProgressTicket(ProgressTicket progressTicket)
Set the progress ticket for the long task.
|
public static final String BETWEENNESS
public static final String CLOSENESS
public static final String HARMONIC_CLOSENESS
public static final String ECCENTRICITY
public GraphDistance()
public double getPathLength()
public double getDiameter()
public double getRadius()
public void execute(org.gephi.graph.api.GraphModel graphModel)
StatisticsIt is preferable to work on visible graphs, to be synchronized with the visualization.
execute in interface StatisticsgraphModel - public void execute(org.gephi.graph.api.Graph graph)
public Map<String,double[]> calculateDistanceMetrics(org.gephi.graph.api.Graph graph, HashMap<org.gephi.graph.api.Node,Integer> indicies, boolean directed, boolean normalized)
public HashMap<org.gephi.graph.api.Node,Integer> createIndiciesMap(org.gephi.graph.api.Graph graph)
public void initializeStartValues()
public void setNormalized(boolean isNormalized)
public boolean isNormalized()
public void setDirected(boolean isDirected)
public boolean isDirected()
public String getReport()
StatisticsgetReport in interface Statisticspublic boolean cancel()
LongTasktrue if the task has been sucessfully cancelled, false otherwise.public void setProgressTicket(ProgressTicket progressTicket)
LongTasksetProgressTicket in interface LongTaskprogressTicket - Copyright © 2007–2017. All rights reserved.