connComp function
This function operates on directed graphs. For each node, it returns the corresponding subgroup.
The node is the parent or son value of the graph.
In other words, the connComp function defines which subgroups of nodes are interconnected.
Parameters
connComp(parent, son, group)
Parameter | Description |
---|---|
parent | The attribute containing the parent nodes of a directed graph. The parent parameter is mandatory. |
son | The attribute containing the son nodes of a directed graph. The son parameter is mandatory. |
group | The attribute by which you want to further group results. The group parameter can also be defined as a list: |
Example - connComp(parent,son)
The following example uses the connComp dataset.
Description | Screenshot |
---|---|
In this example, we want to retrieve the connected component of this graph. We initially had two attributes which define the parent and son relation, we have created a new one the ConnComp attribute, and applied the connComp function to it by specifying which attribute is the parent, and which is the son. So, the formula would be: In the ConnComp attribute, the function has defined the subgroups, so we now know that there are 3 subgroups and to which group each node belong. |
|