public class PointerHierarchyRepresentationBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected WritableIntegerDataStore |
csize
Cluster size storage.
|
protected DBIDs |
ids
The DBIDs in this result.
|
private static Logging |
LOG
Class logger.
|
protected WritableDBIDDataStore |
parent
The parent DBID relation.
|
protected WritableDoubleDataStore |
parentDistance
Distance to the parent object.
|
protected double |
prevdist
Last linking distance.
|
Constructor and Description |
---|
PointerHierarchyRepresentationBuilder(DBIDs ids)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DBIDRef cur,
double distance,
DBIDRef par)
Add an element to the pointer representation.
|
PointerHierarchyRepresentationResult |
complete()
Finalize the result.
|
double |
getDistance(DBIDRef id)
Get the current linking distance of an object.
|
int |
getSize(DBIDRef id)
Get the cluster size of the current object.
|
boolean |
isLinked(DBIDRef id)
Test if an object is already linked.
|
void |
setSize(DBIDRef id,
int size)
Set the cluster size of an object.
|
private static final Logging LOG
protected final DBIDs ids
protected WritableDBIDDataStore parent
protected WritableDoubleDataStore parentDistance
protected double prevdist
protected WritableIntegerDataStore csize
public PointerHierarchyRepresentationBuilder(DBIDs ids)
ids
- IDspublic void add(DBIDRef cur, double distance, DBIDRef par)
cur
- Current objectdistance
- Link distancepar
- Parentpublic PointerHierarchyRepresentationResult complete()
public int getSize(DBIDRef id)
id
- Object idpublic void setSize(DBIDRef id, int size)
id
- Object to setsize
- Cluster sizepublic boolean isLinked(DBIDRef id)
id
- Objecttrue
if the object is already linked.public double getDistance(DBIDRef id)
id
- ObjectCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.