Connected_parts
Network functions connected_parts
syntax
- connected_parts(F1, F2)
definition
The connected_parts function is used to find out how many connected (sub)networks exist in a set of links.
connected_parts(F1, F2) results in a new Domain unit with as Subitem the Attribute: part_rel.
The same attribute is also generated as PartNr, which is deprecated: GeoDMS 21 will not generate it, so use part_rel.
The arguments F1 and F2 are the relations towards the first and last node of a link set.
The Partnr item contains the relation towards the connected network(s).
Each value indicates a group of connected nodes. If all Partnr values are zero, the network is fully connected.
applies to
data items F1 and F2 with uint32 Value type
conditions
The domain units of arguments F1 and F2 must match.
The Values unit of F1 and F2, the node unit, must have a range that starts at 0, as its values are used as indices; otherwise the operator stops with the node unit, the values unit of the node relations, must have a range that starts at 0.
example
unit<uint32> connected_parts := connected_parts(F1, F2);
| F1 | F2 |
|---|---|
| 8 | 7 |
| 1 | 4 |
| 16 | 15 |
| 2 | 3 |
| 5 | 4 |
| 6 | 7 |
| 9 | 10 |
| 12 | 11 |
| 14 | 15 |
| 18 | 20 |
| 19 | 17 |
| 3 | 0 |
| 4 | 11 |
| 7 | 1 |
| 10 | 3 |
| 11 | 13 |
| 13 | 17 |
| 15 | 10 |
| 20 | 21 |
| 17 | 20 |
domain linkset, nr of rows = 20
| part_rel |
|---|
| 0 |
| 1 |
| 0 |
| 0 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
| 0 |
| 0 |
| 1 |
| 1 |
| 1 |
| 0 |
| 0 |
| 0 |
| 1 |
| 1 |
| 1 |
| 1 |
| 1 |
domain nodeSet, nr of rows = 22