|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.utilities.datastructures.hierarchy.HierarchyReferenceLists<O>
O
- Type of objects in hierarchypublic class HierarchyReferenceLists<O extends Hierarchical<O>>
Hierarchy implementation with a per-object representation.
Nested Class Summary | |
---|---|
private class |
HierarchyReferenceLists.ItrAnc
Iterator over all Ancestors. |
private class |
HierarchyReferenceLists.ItrDesc
Iterator to collect into the descendants. |
Field Summary | |
---|---|
protected List<O> |
children
Storage for children |
protected O |
owner
Owner |
protected List<O> |
parents
Storage for parents |
Constructor Summary | |
---|---|
HierarchyReferenceLists(O owner,
List<O> children,
List<O> parents)
Constructor for hierarchy object. |
Method Summary | |
---|---|
List<O> |
getChildren(O self)
Get children list. |
List<O> |
getParents(O self)
Return parents |
IterableIterator<O> |
iterAncestors(O self)
Iterate ancestors (recursive parents) |
IterableIterator<O> |
iterDescendants(O self)
Iterate descendants (recursive children) |
int |
numChildren(O self)
Get number of children |
int |
numParents(O self)
Get number of (direct) parents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected O extends Hierarchical<O> owner
protected List<O extends Hierarchical<O>> children
protected List<O extends Hierarchical<O>> parents
Constructor Detail |
---|
public HierarchyReferenceLists(O owner, List<O> children, List<O> parents)
owner
- owning cluster.children
- child clusters. May be null.parents
- parent clusters. May be null.Method Detail |
---|
public int numChildren(O self)
Hierarchy
numChildren
in interface Hierarchy<O extends Hierarchical<O>>
self
- object to get number of children for
public List<O> getChildren(O self)
Hierarchy
getChildren
in interface Hierarchy<O extends Hierarchical<O>>
self
- object to get children for
public IterableIterator<O> iterDescendants(O self)
Hierarchy
iterDescendants
in interface Hierarchy<O extends Hierarchical<O>>
self
- object to get descendants for
public int numParents(O self)
Hierarchy
numParents
in interface Hierarchy<O extends Hierarchical<O>>
self
- reference object
public List<O> getParents(O self)
getParents
in interface Hierarchy<O extends Hierarchical<O>>
self
- object to get parents for
public IterableIterator<O> iterAncestors(O self)
Hierarchy
iterAncestors
in interface Hierarchy<O extends Hierarchical<O>>
self
- object to get ancestors for
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |