Macaulay2 » Documentation
Packages » Graphs :: numberOfTriangles
next | previous | forward | backward | up | index | toc

numberOfTriangles -- counts how many subtriangles are present in a graph

Synopsis

Description

A triangle is formed by three vertexSet which are mutually adjacent.

i1 : G = graph({{1,2},{2,3},{3,1},{3,4},{2,4}},EntryMode=>"edges");
i2 : numberOfTriangles G

o2 = 2

See also

Ways to use numberOfTriangles :

For the programmer

The object numberOfTriangles is a method function.