Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data.cluster
Interface HierarchyImplementation<C extends HierarchyInterface<C>>

Type Parameters:
C -
All Known Implementing Classes:
SimpleHierarchy

public interface HierarchyImplementation<C extends HierarchyInterface<C>>

Hierarchy abstraction layer. Note that this allows the hierarchy to be implemented either using one Hierarchy Object per C object, or using a shared object for all of them. "self" is the parameter that is the referencing object.

Author:
Erich Schubert

Method Summary
<T extends Collection<C>>
T
getAncestors(C self, T collection)
          Collect ancestors (recursive parents)
 List<C> getChildren(C self)
          Get children list.
<T extends Collection<C>>
T
getDescendants(C self, T collection)
          Collect descendants (recursive children)
 List<C> getParents(C self)
          Get parents list.
 boolean isHierarchical()
          Test for hierarchical properties
 int numChildren(C self)
          Get number of children
 int numParents(C self)
          Get number of parents
 

Method Detail

isHierarchical

boolean isHierarchical()
Test for hierarchical properties

Returns:
hierarchical data model.

numChildren

int numChildren(C self)
Get number of children

Parameters:
self -
Returns:
number of children

getChildren

List<C> getChildren(C self)
Get children list. Resulting list MAY be modified. Result MAY be null, if the model is not hierarchical.

Parameters:
self -
Returns:
list of children

getDescendants

<T extends Collection<C>> T getDescendants(C self,
                                           T collection)
Collect descendants (recursive children)

Type Parameters:
T - Collection type
Parameters:
self -
collection - Collection to fill
Returns:
collection of descendants

numParents

int numParents(C self)
Get number of parents

Parameters:
self - reference object
Returns:
number of parents

getParents

List<C> getParents(C self)
Get parents list. Resulting list MAY be modified. Result MAY be null, if the model is not hierarchical.

Parameters:
self -
Returns:
list of parents

getAncestors

<T extends Collection<C>> T getAncestors(C self,
                                         T collection)
Collect ancestors (recursive parents)

Type Parameters:
T - Collection type
Parameters:
self -
collection - Collection to fill
Returns:
collection of ancestors

Release 0.2 (2009-07-06_1820)