triplet_count#

triplet_count(graph)#

Computes the number of connected triplets within a graph

A connected triplet (also known as a wedge, 2-hop path) is a pair of edges with one node in common. For example, the triangle made up of edges A-B, B-C, C-A is formed of three connected triplets.

Parameters:

graph (GraphView) – a Raphtory graph, treated as undirected

Returns:

the number of triplets in the graph

Return type:

int