K
- graph ID typeVV
- vertex value typeEV
- edge value typepublic class TriangleListing<K extends Comparable<K> & CopyableValue<K>,VV,EV> extends TriangleListingBase<K,VV,EV,TriangleListing.Result<K>>
A triangle is a 3-clique with vertices A, B, and C connected by edges (A, B), (A, C), and (B, C).
The input graph must not contain duplicate edges or self-loops.
This algorithm is similar to the undirected version but also tracks and computes a bitmask representing the six potential graph edges connecting the triangle vertices.
Modifier and Type | Class and Description |
---|---|
static class |
TriangleListing.Result<T>
A result for the directed Triangle Listing algorithm.
|
permuteResults, sortTriangleVertices
parallelism
Constructor and Description |
---|
TriangleListing() |
Modifier and Type | Method and Description |
---|---|
DataSet<TriangleListing.Result<K>> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
canMergeConfigurationWith, mergeConfiguration, setPermuteResults, setSortTriangleVertices
equals, hashCode, run
getAlgorithmName, setParallelism
public DataSet<TriangleListing.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,TriangleListing.Result<K extends Comparable<K> & CopyableValue<K>>>
input
- the input graphException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.