Package com.mastfrog.graph.algorithm
Interface Score<T>
-
- All Superinterfaces:
Comparable<Score<?>>
public interface Score<T> extends Comparable<Score<?>>
Implementation over strings of the scores as returned by page rank and eigenvector centrality algorithms.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intcompareTo(Score<?> o)Compares scores, sorting higher scores to the top.Tnode()The name of graph nodeintnodeId()The integer index of the node in the underlying graph.doublescore()The score of the graph node, relative to others.
-
-
-
Method Detail
-
node
T node()
The name of graph node- Returns:
- The name
-
score
double score()
The score of the graph node, relative to others.- Returns:
- A score
-
nodeId
int nodeId()
The integer index of the node in the underlying graph.- Returns:
-
compareTo
default int compareTo(Score<?> o)
Compares scores, sorting higher scores to the top.- Specified by:
compareToin interfaceComparable<T>- Parameters:
o- Another score- Returns:
- a comparison
-
-