Class Digraph.V

java.lang.Object
com.pnfsoftware.jeb.util.graph.Digraph.V
Enclosing class:
Digraph

public class Digraph.V extends Object
Vertex of a directed graph. Additional attributes include: weight, label, centrality score.
  • Method Details

    • getId

      public int getId()
      Get the vertex id.
      Returns:
      the stable vertex id
    • getWeight

      public Double getWeight()
      Get the vertex weight.
      Returns:
      the vertex weight, or null if none was assigned
    • setWeight

      public void setWeight(Double weight)
      Set the vertex weight.
      Parameters:
      weight - vertex weight, or null to clear it
    • getLabel

      public String getLabel()
      Get the vertex label.
      Returns:
      the vertex label, or null if none was assigned
    • setLabel

      public void setLabel(String label)
      Set the vertex label.
      Parameters:
      label - vertex label, or null to clear it
    • getVertexCentralityScore

      public Double getVertexCentralityScore()
      Get the vertex centrality score.
      Returns:
      the vertex centrality score, or null if none was assigned or computed
    • setVertexCentralityScore

      public void setVertexCentralityScore(Double vcscore)
      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 that 0 <= |VC-score| <= 1. Note: a VC-score must have been previously set
      Parameters:
      divider - non-zero divider
    • clone

      public Digraph.V clone()
      Create a copy of this vertex.
      Overrides:
      clone in class Object
      Returns:
      a copy with the same id, index, attributes, and scores
    • toString

      public String toString()
      Overrides:
      toString in class Object