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 boolean
add(O entry)
Add an entry (initializes data structures).boolean
add(O parent, O child)
Add a parent-child relationship.boolean
remove(O entry)
Remove an entry and all its parent-child relationships.boolean
remove(O parent, O child)
Remove a parent-child relationship.boolean
removeSubtree(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:
true
if changed
-
add
boolean add(O entry)
Add an entry (initializes data structures).- Parameters:
entry
- Entry- Returns:
true
if changed
-
remove
boolean remove(O parent, O child)
Remove a parent-child relationship.- Parameters:
parent
- Parentchild
- Child- Returns:
true
if changed
-
remove
boolean remove(O entry)
Remove an entry and all its parent-child relationships.- Parameters:
entry
- Entry- Returns:
true
if 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:
true
if changed
-
-