T
- ID typepublic static class JaccardIndex.Result<T> extends Tuple4<T,T,IntValue,IntValue> implements PrintableResult, BinaryResult<T>, Comparable<JaccardIndex.Result<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.
|
T |
getVertexId0()
Get the first vertex ID.
|
T |
getVertexId1()
Get the second vertex ID.
|
int |
hashCode() |
void |
setVertexId0(T value)
Set the first vertex ID.
|
void |
setVertexId1(T value)
Set the second vertex ID.
|
String |
toPrintableString()
A human-readable representation of this value.
|
copy, equals, getArity, getField, of, setField, setFields, toString
getFieldNotNull, getTupleClass
public static final int HASH_SEED
public T getVertexId0()
BinaryResult
getVertexId0
in interface BinaryResult<T>
public void setVertexId0(T value)
BinaryResult
setVertexId0
in interface BinaryResult<T>
value
- new vertex IDpublic T getVertexId1()
BinaryResult
getVertexId1
in interface BinaryResult<T>
public void setVertexId1(T value)
BinaryResult
setVertexId1
in interface BinaryResult<T>
value
- new vertex IDpublic IntValue getSharedNeighborCount()
public IntValue getDistinctNeighborCount()
public double getJaccardIndexScore()
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.