Graphs functions

Graphs functions are complex functions used to perform operations on particular direct graphs.

Rulex Platform formula

Function

Formula

Description

connComp

connComp(parent, son, group)

This function operates on directed graphs. For each note, 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.

leaf

leaf(parent, son, group, whichpath, separator, weights, operator)

This function operates on a directed graph, the leaf of a node is meant as the very last node of a branch.
The leaf function retrieves the corresponding leaf for each node of the son attribute.

leafDistance

leafDistance(parent, son, group, whichpath, separator, weights, operator)

The leafDistance function calculates the distance, in terms of number of edges, of each node of the son attribute from its leaf.

A leaf is the very last node of the branch.

An edge is the link from one node to another.

root

root(parent, son, group, whichpath, separator, weights, operator)

The root function returns the corresponding root of a node. The root is the very first node of the branch.

rootDistance

rootDistance(parent, son, group, whichpath, separator, weights, operator)

The rootDistance function operates on a directed graph, two major components in a directed graph are nodes and edges. A node is a data element while an edge is a link that helps to connect vertices, and the rootDistance function calculates the distance of each node from the root.

Parameters in bold are mandatory.