|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.data.cluster.SimpleHierarchy<C>
C
- public class SimpleHierarchy<C extends HierarchyInterface<C>>
Hierarchy implementation with a per-object representation.
Field Summary | |
---|---|
private List<C> |
children
Storage for children |
private C |
owner
Owner |
private List<C> |
parents
Storage for parents |
Constructor Summary | |
---|---|
SimpleHierarchy(C owner,
List<C> children,
List<C> parents)
Constructor for hierarchy object. |
Method Summary | ||
---|---|---|
|
getAncestors(C self,
T collection)
Collect ancestors. |
|
List<C> |
getChildren(C self)
Return children |
|
|
getDescendants(C self,
T collection)
Collect descendants. |
|
List<C> |
getParents(C self)
Return parents |
|
boolean |
isHierarchical()
Return that this model is hierarchical. |
|
int |
numChildren(C self)
Return number of children. |
|
int |
numParents(C self)
Return number of parents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private C extends HierarchyInterface<C> owner
private List<C extends HierarchyInterface<C>> children
private List<C extends HierarchyInterface<C>> parents
Constructor Detail |
---|
public SimpleHierarchy(C owner, List<C> children, List<C> parents)
owner
- owning cluster.children
- child clusters. May be null.parents
- parent clusters. May be null.Method Detail |
---|
public final boolean isHierarchical()
isHierarchical
in interface HierarchyImplementation<C extends HierarchyInterface<C>>
public int numChildren(C self)
numChildren
in interface HierarchyImplementation<C extends HierarchyInterface<C>>
public List<C> getChildren(C self)
getChildren
in interface HierarchyImplementation<C extends HierarchyInterface<C>>
public <T extends Collection<C>> T getDescendants(C self, T collection)
getDescendants
in interface HierarchyImplementation<C extends HierarchyInterface<C>>
T
- Collection typecollection
- Collection to fill
public int numParents(C self)
numParents
in interface HierarchyImplementation<C extends HierarchyInterface<C>>
self
- reference object
public List<C> getParents(C self)
getParents
in interface HierarchyImplementation<C extends HierarchyInterface<C>>
public <T extends Collection<C>> T getAncestors(C self, T collection)
getAncestors
in interface HierarchyImplementation<C extends HierarchyInterface<C>>
T
- Collection typecollection
- Collection to fill
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |