Skip to content

Commit b6ba416

Browse files
committed
Add docs for triangle count node label filtering
1 parent 14886b8 commit b6ba416

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

doc/configs/algorithms-conf.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,27 @@
681681
"default": "2^63^ - 1",
682682
"optional": true,
683683
"description": "If a node has a degree higher than this it will not be considered by the algorithm. The triangle count for these nodes will be `-1`."
684+
},
685+
{
686+
"name": "aLabel",
687+
"type": "String",
688+
"default": "null",
689+
"optional": true,
690+
"description": "The required node label of the first node in the triangle. If not specified, the algorithm will not filter by label."
691+
},
692+
{
693+
"name": "bLabel",
694+
"type": "String",
695+
"default": "null",
696+
"optional": true,
697+
"description": "The required node label of the second node in the triangle. If not specified, the algorithm will not filter by label."
698+
},
699+
{
700+
"name": "cLabel",
701+
"type": "String",
702+
"default": "null",
703+
"optional": true,
704+
"description": "The required node label of the third node in the triangle. If not specified, the algorithm will not filter by label."
684705
}
685706
],
686707
"page_path": "algorithms/triangle-count/"

doc/modules/ROOT/pages/algorithms/triangle-count.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ For more information on this algorithm, see:
2828
This is described in http://chato.cl/papers/becchetti_2007_approximate_count_triangles.pdf["Efficient Semi-streaming Algorithms for Local Triangle Counting in Massive Graphs"].
2929

3030

31+
== Node label filtering
32+
33+
For some use-cases it is useful to only count triangles that contain nodes with specific labels.
34+
This is also something that can save computation time, as the algorithm will not have to consider nodes that do not match the specified labels.
35+
36+
The algorithm supports node label filtering by allowing you to specify labels for each of the three nodes in the triangle, using the `aLabel`, `bLabel`, and `cLabel` configuration parameters.
37+
They are optional and can be used individually or in combination.
38+
39+
3140
[[algorithms-triangle-count-syntax]]
3241
== Syntax
3342

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
// DO NOT EDIT: File generated automatically by the process_conf.py script
22
| maxDegree | Integer | 2^63^ - 1 | yes | If a node has a degree higher than this it will not be considered by the algorithm. The triangle count for these nodes will be `-1`.
3+
| aLabel | String | null | yes | The required node label of the first node in the triangle. If not specified, the algorithm will not filter by label.
4+
| bLabel | String | null | yes | The required node label of the second node in the triangle. If not specified, the algorithm will not filter by label.
5+
| cLabel | String | null | yes | The required node label of the third node in the triangle. If not specified, the algorithm will not filter by label.

0 commit comments

Comments
 (0)