Interface ModifiableHierarchy<O>
-
- Type Parameters:
O- Object type
- All Superinterfaces:
Hierarchy<O>
- All Known Implementing Classes:
HashMapHierarchy,VisualizationTree
public interface ModifiableHierarchy<O> extends Hierarchy<O>
Modifiable Hierarchy.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(O entry)Add an entry (initializes data structures).booleanadd(O parent, O child)Add a parent-child relationship.booleanremove(O entry)Remove an entry and all its parent-child relationships.booleanremove(O parent, O child)Remove a parent-child relationship.booleanremoveSubtree(O entry)Remove an entry and it's whole subtree (unless the elements are reachable by a different path!)-
Methods inherited from interface elki.utilities.datastructures.hierarchy.Hierarchy
contains, iterAll, iterAncestors, iterAncestorsSelf, iterChildren, iterChildrenReverse, iterDescendants, iterDescendantsSelf, iterParents, iterParentsReverse, numChildren, numParents, size
-
-
-
-
Method Detail
-
add
boolean add(O parent, O child)
Add a parent-child relationship.- Parameters:
parent- Parentchild- Child- Returns:
trueif changed
-
add
boolean add(O entry)
Add an entry (initializes data structures).- Parameters:
entry- Entry- Returns:
trueif changed
-
remove
boolean remove(O parent, O child)
Remove a parent-child relationship.- Parameters:
parent- Parentchild- Child- Returns:
trueif changed
-
remove
boolean remove(O entry)
Remove an entry and all its parent-child relationships.- Parameters:
entry- Entry- Returns:
trueif changed
-
removeSubtree
boolean removeSubtree(O entry)
Remove an entry and it's whole subtree (unless the elements are reachable by a different path!)- Parameters:
entry- Entry- Returns:
trueif changed
-
-