Package org.iam.model
Class LabelTree<T>
java.lang.Object
org.iam.model.LabelTree<T>
- Type Parameters:
T- the type of the nodes in the label tree
LabelTree represents a tree structure where each node has a set of children.
Provides methods to find the maximal children of each node, where a maximal child is not contained by any other child of the same parent.
- Since:
- 2025-02-28
- Author:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMaximumChildrens(T nodeName) Finds the set of maximal children for a given node.Returns a map from each node to its set of maximal children.
-
Constructor Details
-
LabelTree
Constructs a LabelTree with the given mapping of nodes to their children.- Parameters:
nodeToChildren- map from node to its children
-
-
Method Details
-
getNodeToMaximumChildren
Returns a map from each node to its set of maximal children.- Returns:
- map from node to set of maximal children
-
getMaximumChildrens
Finds the set of maximal children for a given node. A child is maximal if it is not contained by any other child of the same parent.- Parameters:
nodeName- the node for which to find maximal children- Returns:
- set of maximal children
-