public class EigenvectorCentrality extends Object implements Statistics, LongTask
Modifier and Type | Field and Description |
---|---|
private double[] |
centralities |
static String |
EIGENVECTOR |
private boolean |
isCanceled |
private boolean |
isDirected |
private int |
numRuns |
private ProgressTicket |
progress |
private double |
sumChange |
Constructor and Description |
---|
EigenvectorCentrality() |
Modifier and Type | Method and Description |
---|---|
double |
calculateEigenvectorCentrality(org.gephi.graph.api.Graph hgraph,
double[] eigCentralities,
HashMap<Integer,org.gephi.graph.api.Node> indicies,
HashMap<org.gephi.graph.api.Node,Integer> invIndicies,
boolean directed,
int numIterations) |
boolean |
cancel()
Cancel the task.
|
private double |
computeMaxValueAndTempValues(org.gephi.graph.api.Graph hgraph,
HashMap<Integer,org.gephi.graph.api.Node> indicies,
HashMap<org.gephi.graph.api.Node,Integer> invIndicies,
double[] tempValues,
double[] centralityValues,
boolean directed) |
void |
execute(org.gephi.graph.api.Graph hgraph) |
void |
execute(org.gephi.graph.api.GraphModel graphModel)
Executes the statistics algorithm.
|
void |
fillIndiciesMaps(org.gephi.graph.api.Graph hgraph,
double[] eigCentralities,
HashMap<Integer,org.gephi.graph.api.Node> indicies,
HashMap<org.gephi.graph.api.Node,Integer> invIndicies) |
int |
getNumRuns() |
String |
getReport()
Returns an HTML string that displays the statistics result.
|
private org.gephi.graph.api.Column |
initializeAttributeColunms(org.gephi.graph.api.GraphModel graphModel) |
boolean |
isDirected() |
private void |
saveCalculatedValues(org.gephi.graph.api.Graph hgraph,
org.gephi.graph.api.Column attributeColumn,
HashMap<Integer,org.gephi.graph.api.Node> indicies,
double[] eigCenrtalities) |
void |
setDirected(boolean isDirected) |
void |
setNumRuns(int numRuns) |
void |
setProgressTicket(ProgressTicket progressTicket)
Set the progress ticket for the long task.
|
private double |
updateValues(org.gephi.graph.api.Graph hgraph,
double[] tempValues,
double[] centralityValues,
double max) |
public static final String EIGENVECTOR
private int numRuns
private double[] centralities
private double sumChange
private ProgressTicket progress
private boolean isCanceled
private boolean isDirected
public void setNumRuns(int numRuns)
public int getNumRuns()
public boolean isDirected()
public void setDirected(boolean isDirected)
isDirected
- public void execute(org.gephi.graph.api.GraphModel graphModel)
Statistics
It is preferable to work on visible graphs, to be synchronized with the visualization.
execute
in interface Statistics
graphModel
- attributeModel
- public void execute(org.gephi.graph.api.Graph hgraph)
private org.gephi.graph.api.Column initializeAttributeColunms(org.gephi.graph.api.GraphModel graphModel)
private void saveCalculatedValues(org.gephi.graph.api.Graph hgraph, org.gephi.graph.api.Column attributeColumn, HashMap<Integer,org.gephi.graph.api.Node> indicies, double[] eigCenrtalities)
public void fillIndiciesMaps(org.gephi.graph.api.Graph hgraph, double[] eigCentralities, HashMap<Integer,org.gephi.graph.api.Node> indicies, HashMap<org.gephi.graph.api.Node,Integer> invIndicies)
private double computeMaxValueAndTempValues(org.gephi.graph.api.Graph hgraph, HashMap<Integer,org.gephi.graph.api.Node> indicies, HashMap<org.gephi.graph.api.Node,Integer> invIndicies, double[] tempValues, double[] centralityValues, boolean directed)
private double updateValues(org.gephi.graph.api.Graph hgraph, double[] tempValues, double[] centralityValues, double max)
public double calculateEigenvectorCentrality(org.gephi.graph.api.Graph hgraph, double[] eigCentralities, HashMap<Integer,org.gephi.graph.api.Node> indicies, HashMap<org.gephi.graph.api.Node,Integer> invIndicies, boolean directed, int numIterations)
public String getReport()
Statistics
getReport
in interface Statistics
public boolean cancel()
LongTask
true
if the task has been sucessfully cancelled, false
otherwise.public void setProgressTicket(ProgressTicket progressTicket)
LongTask
setProgressTicket
in interface LongTask
progressTicket
- the progress ticket for this taskCopyright © 2007–2016 Gephi Consortium. All rights reserved.