K
- graph ID typeVV
- vertex value typeEV
- edge value typepublic class JaccardIndex<K extends CopyableValue<K>,VV,EV> extends GraphAlgorithmDelegatingDataSet<K,VV,EV,JaccardIndex.Result<K>>
Modifier and Type | Class and Description |
---|---|
static class |
JaccardIndex.Result<T>
Wraps the vertex type to encapsulate results from the jaccard index algorithm.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_GROUP_SIZE |
Constructor and Description |
---|
JaccardIndex() |
Modifier and Type | Method and Description |
---|---|
protected String |
getAlgorithmName()
Algorithms are identified by name rather than by class to allow subclassing.
|
protected boolean |
mergeConfiguration(GraphAlgorithmDelegatingDataSet other)
An algorithm must first test whether the configurations can be merged
before merging individual fields.
|
DataSet<JaccardIndex.Result<K>> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
JaccardIndex<K,VV,EV> |
setGroupSize(int groupSize)
Override the default group size for the quadratic expansion of neighbor
pairs.
|
JaccardIndex<K,VV,EV> |
setLittleParallelism(int littleParallelism)
Override the parallelism of operators processing small amounts of data.
|
JaccardIndex<K,VV,EV> |
setMaximumScore(int numerator,
int denominator)
Filter out Jaccard Index scores greater than or equal to the given maximum fraction.
|
JaccardIndex<K,VV,EV> |
setMinimumScore(int numerator,
int denominator)
Filter out Jaccard Index scores less than the given minimum fraction.
|
equals, hashCode, run
public static final int DEFAULT_GROUP_SIZE
public JaccardIndex<K,VV,EV> setGroupSize(int groupSize)
groupSize
- the group size for the quadratic expansion of neighbor pairspublic JaccardIndex<K,VV,EV> setMinimumScore(int numerator, int denominator)
numerator
- numerator of the minimum scoredenominator
- denominator of the minimum scoresetMaximumScore(int, int)
public JaccardIndex<K,VV,EV> setMaximumScore(int numerator, int denominator)
numerator
- numerator of the maximum scoredenominator
- denominator of the maximum scoresetMinimumScore(int, int)
public JaccardIndex<K,VV,EV> setLittleParallelism(int littleParallelism)
littleParallelism
- operator parallelismprotected String getAlgorithmName()
GraphAlgorithmDelegatingDataSet
getAlgorithmName
in class GraphAlgorithmDelegatingDataSet<K extends CopyableValue<K>,VV,EV,JaccardIndex.Result<K extends CopyableValue<K>>>
protected boolean mergeConfiguration(GraphAlgorithmDelegatingDataSet other)
GraphAlgorithmDelegatingDataSet
mergeConfiguration
in class GraphAlgorithmDelegatingDataSet<K extends CopyableValue<K>,VV,EV,JaccardIndex.Result<K extends CopyableValue<K>>>
other
- the algorithm with which to compare and mergepublic DataSet<JaccardIndex.Result<K>> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithmDelegatingDataSet
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmDelegatingDataSet<K extends CopyableValue<K>,VV,EV,JaccardIndex.Result<K extends CopyableValue<K>>>
input
- the input graphException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.