K
- graph ID typeVV
- vertex value typeEV
- edge value typepublic class LocalClusteringCoefficient<K extends Comparable<K> & CopyableValue<K>,VV,EV> extends GraphAlgorithmWrappingDataSet<K,VV,EV,LocalClusteringCoefficient.Result<K>>
An edge between a vertex's neighbors is a triangle. Counting edges between neighbors is equivalent to counting the number of triangles which include the vertex.
The input graph must be a simple graph containing no duplicate edges or self-loops.
Modifier and Type | Class and Description |
---|---|
static class |
LocalClusteringCoefficient.Result<T>
Wraps
Tuple3 to encapsulate results from the Local Clustering Coefficient algorithm. |
Constructor and Description |
---|
LocalClusteringCoefficient() |
Modifier and Type | Method and Description |
---|---|
protected String |
getAlgorithmName()
Algorithms are identified by name rather than by class to allow subclassing.
|
protected boolean |
mergeConfiguration(GraphAlgorithmWrappingDataSet other)
An algorithm must first test whether the configurations can be merged
before merging individual fields.
|
DataSet<LocalClusteringCoefficient.Result<K>> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
LocalClusteringCoefficient<K,VV,EV> |
setIncludeZeroDegreeVertices(boolean includeZeroDegreeVertices)
By default the vertex set is checked for zero degree vertices.
|
LocalClusteringCoefficient<K,VV,EV> |
setLittleParallelism(int littleParallelism)
Override the parallelism of operators processing small amounts of data.
|
equals, hashCode, run
public LocalClusteringCoefficient<K,VV,EV> setIncludeZeroDegreeVertices(boolean includeZeroDegreeVertices)
includeZeroDegreeVertices
- whether to output scores for vertices
with a degree of zeropublic LocalClusteringCoefficient<K,VV,EV> setLittleParallelism(int littleParallelism)
littleParallelism
- operator parallelismprotected String getAlgorithmName()
GraphAlgorithmWrappingDataSet
getAlgorithmName
in class GraphAlgorithmWrappingDataSet<K extends Comparable<K> & CopyableValue<K>,VV,EV,LocalClusteringCoefficient.Result<K extends Comparable<K> & CopyableValue<K>>>
protected boolean mergeConfiguration(GraphAlgorithmWrappingDataSet other)
GraphAlgorithmWrappingDataSet
mergeConfiguration
in class GraphAlgorithmWrappingDataSet<K extends Comparable<K> & CopyableValue<K>,VV,EV,LocalClusteringCoefficient.Result<K extends Comparable<K> & CopyableValue<K>>>
other
- the algorithm with which to compare and mergepublic DataSet<LocalClusteringCoefficient.Result<K>> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithmWrappingDataSet
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmWrappingDataSet<K extends Comparable<K> & CopyableValue<K>,VV,EV,LocalClusteringCoefficient.Result<K extends Comparable<K> & CopyableValue<K>>>
input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.