public class PointerHierarchyRepresentationResult extends BasicResult
CutDendrogramByNumberOfClusters
 and
 CutDendrogramByHeight.
 can be used to extract partitions from this graph.
 This class can also compute dendrogram positions, but using a faster algorithm than the one proposed by Sibson 1971, using only O(n log n) time due to sorting, but using an additional temporary array.
| Modifier and Type | Class and Description | 
|---|---|
private class  | 
PointerHierarchyRepresentationResult.Sorter
Class for generating / optimizing the merge order. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
(package private) DBIDs | 
ids
The DBIDs in this result. 
 | 
(package private) boolean | 
isSquared
Flag for squared distances. 
 | 
(package private) IntegerDataStore | 
mergeOrder
Merge order, useful for non-monotonous hierarchies. 
 | 
(package private) DBIDDataStore | 
parent
The parent DBID relation. 
 | 
(package private) DoubleDataStore | 
parentDistance
Distance to the parent object. 
 | 
(package private) IntegerDataStore | 
positions
Position storage, computed on demand. 
 | 
| Constructor and Description | 
|---|
PointerHierarchyRepresentationResult(DBIDs ids,
                                    DBIDDataStore parent,
                                    DoubleDataStore parentDistance,
                                    boolean isSquared)
Constructor. 
 | 
PointerHierarchyRepresentationResult(DBIDs ids,
                                    DBIDDataStore parent,
                                    DoubleDataStore parentDistance,
                                    boolean isSquared,
                                    IntegerDataStore mergeOrder)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
private WritableDoubleDataStore | 
computeMaxHeight()
Compute the maximum height of nodes. 
 | 
private WritableIntegerDataStore | 
computeSubtreeSizes(DBIDs order)
Compute the size of all subtrees. 
 | 
DBIDs | 
getDBIDs()
Get the clustered DBIDs. 
 | 
DoubleDataStore | 
getParentDistanceStore()
Get the distance to the parent. 
 | 
DBIDDataStore | 
getParentStore()
Get the parent DBID relation. 
 | 
IntegerDataStore | 
getPositions()
Get / compute the positions. 
 | 
boolean | 
isSquared()
Get the flag for squared distances. 
 | 
ArrayDBIDs | 
topologicalSort()
Topological sort the object IDs. 
 | 
getLongName, getShortNameaddChildResult, getHierarchy, setHierarchyDBIDs ids
DBIDDataStore parent
DoubleDataStore parentDistance
IntegerDataStore positions
IntegerDataStore mergeOrder
boolean isSquared
public PointerHierarchyRepresentationResult(DBIDs ids, DBIDDataStore parent, DoubleDataStore parentDistance, boolean isSquared)
ids - IDs processed.parent - Parent pointer.parentDistance - Distance to parent.isSquared - Flag to indicate squared distancespublic PointerHierarchyRepresentationResult(DBIDs ids, DBIDDataStore parent, DoubleDataStore parentDistance, boolean isSquared, IntegerDataStore mergeOrder)
ids - IDs processed.parent - Parent pointer.parentDistance - Distance to parent.isSquared - Flag to indicate squared distancesmergeOrder - Order in which to execute mergespublic DBIDs getDBIDs()
public DBIDDataStore getParentStore()
public DoubleDataStore getParentDistanceStore()
public IntegerDataStore getPositions()
public boolean isSquared()
true if squared distances are used.private WritableIntegerDataStore computeSubtreeSizes(DBIDs order)
order - Object orderprivate WritableDoubleDataStore computeMaxHeight()
d(a+b,c) < min(d(a,c), d(b,c)).public ArrayDBIDs topologicalSort()
Copyright © 2019 ELKI Development Team. License information.