T
- ID typepublic static class JaccardIndex.Result<T> extends BinaryResultBase<T> implements PrintableResult, Comparable<JaccardIndex.Result<T>>
BinaryResult.MirrorResult<T,RT extends BinaryResult<T>>
Modifier and Type | Field and Description |
---|---|
static int |
HASH_SEED |
Constructor and Description |
---|
Result() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JaccardIndex.Result<T> o) |
IntValue |
getDistinctNeighborCount()
Get the distinct neighbor count.
|
double |
getJaccardIndexScore()
Get the Jaccard Index score, equal to the number of shared neighbors
of the source and target vertices divided by the number of distinct
neighbors.
|
IntValue |
getSharedNeighborCount()
Get the shared neighbor count.
|
int |
hashCode() |
void |
setDistinctNeighborCount(IntValue distinctNeighborCount)
Set the distinct neighbor count.
|
void |
setSharedNeighborCount(IntValue sharedNeighborCount)
Set the shared neighbor count.
|
String |
toPrintableString()
A human-readable representation of this value.
|
String |
toString()
Object.toString() must be overridden to write POJO values in the
same form as Tuple . |
getVertexId0, getVertexId1, setVertexId0, setVertexId1, translate
public static final int HASH_SEED
public IntValue getSharedNeighborCount()
public void setSharedNeighborCount(IntValue sharedNeighborCount)
sharedNeighborCount
- the shared neighbor countpublic IntValue getDistinctNeighborCount()
public void setDistinctNeighborCount(IntValue distinctNeighborCount)
distinctNeighborCount
- the distinct neighbor countpublic double getJaccardIndexScore()
public String toString()
ResultBase
Object.toString()
must be overridden to write POJO values in the
same form as Tuple
. Values are
comma-separated and enclosed in parenthesis, e.g. "(f0,f1)".toString
in class ResultBase
public String toPrintableString()
PrintableResult
toPrintableString
in interface PrintableResult
public int compareTo(JaccardIndex.Result<T> o)
compareTo
in interface Comparable<JaccardIndex.Result<T>>
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.