Package com.pnfsoftware.jeb.util.graph
Class Digraph.V
java.lang.Object
com.pnfsoftware.jeb.util.graph.Digraph.V
- Enclosing class:
Digraph
Vertex of a directed graph. Additional attributes include: weight, label, centrality score.
-
Method Summary
Modifier and TypeMethodDescriptionclone()Create a copy of this vertex.intgetId()Get the vertex id.getLabel()Get the vertex label.Get the vertex centrality score.Get the vertex weight.voidnormalizeVertexCentralityScore(double divider) Divide and set the current VC-score by the provided divider, ensuring that0 <= |VC-score| <= 1.voidSet the vertex label.voidsetVertexCentralityScore(Double vcscore) Set the vertex centrality score.voidSet the vertex weight.toString()
-
Method Details
-
getId
public int getId()Get the vertex id.- Returns:
- the stable vertex id
-
getWeight
Get the vertex weight.- Returns:
- the vertex weight, or null if none was assigned
-
setWeight
Set the vertex weight.- Parameters:
weight- vertex weight, or null to clear it
-
getLabel
Get the vertex label.- Returns:
- the vertex label, or null if none was assigned
-
setLabel
Set the vertex label.- Parameters:
label- vertex label, or null to clear it
-
getVertexCentralityScore
Get the vertex centrality score.- Returns:
- the vertex centrality score, or null if none was assigned or computed
-
setVertexCentralityScore
Set the vertex centrality score.- Parameters:
vcscore- vertex centrality score, or null to clear it
-
normalizeVertexCentralityScore
public void normalizeVertexCentralityScore(double divider) Divide and set the current VC-score by the provided divider, ensuring that0 <= |VC-score| <= 1. Note: a VC-score must have been previously set- Parameters:
divider- non-zero divider
-
clone
Create a copy of this vertex. -
toString
-