From a /gn/ object, the set of nodes/variables is partitioned in four
(i) the root and leaf nodes/variables,
(ii) the root but not leaf nodes/variables,
(iii) the leaf but not root nodes/variables,
(iv) the remaining nodes/variables.
Of course, some of the classes can be empty.
No check about
a list of four named numeric vectors with the iin of the corresponding nodes/variables and the names as names. The four items are \$RaL (root and leaf), \$RwL (root but not leaf), \$LwR (leaf but not root) and \$rema (the remaining nodes/variables).