- All Implemented Interfaces:
- GraphAlgorithm<K,VV,EV,DataSet<Integer>>
public class GSATriangleCount<K extends Comparable<K>,VV,EV>
extends Object
implements GraphAlgorithm<K,VV,EV,DataSet<Integer>>
Triangle Count Algorithm.
This algorithm operates in three phases. First, vertices select neighbors with id greater than theirs
and send messages to them. Each received message is then propagated to neighbors with higher id.
Finally, if a node encounters the target id in the list of received messages, it increments the number
of triangles found.
This implementation is non - iterative.
The algorithm takes an undirected, unweighted graph as input and outputs a DataSet
which contains a single integer representing the number of triangles.