public class Ranking<V> extends Object implements Comparable
| Modifier and Type | Field and Description |
|---|---|
int |
originalPos
The original (0-indexed) position of the instance being ranked
|
double |
rankScore
The actual rank score (normally between 0 and 1)
|
| Constructor and Description |
|---|
Ranking(int originalPos,
double rankScore,
V ranked)
Constructor which allows values to be set on construction
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object other)
Compares two ranking based on the rank score.
|
V |
getRanked() |
void |
setRanked(V ranked) |
String |
toString()
Returns the rank score as a string.
|
public int originalPos
public double rankScore
public Ranking(int originalPos,
double rankScore,
V ranked)
originalPos - The original (0-indexed) position of the instance being rankedrankScore - The actual rank score (normally between 0 and 1)ranked - the vertex being rankedpublic int compareTo(Object other)
compareTo in interface Comparableother - The other rankingpublic String toString()
public V getRanked()
public void setRanked(V ranked)
ranked - the ranked to setCopyright © 2015. All rights reserved.