public class ClusterOrder extends BasicResult implements OrderingResult
Modifier and Type | Field and Description |
---|---|
(package private) ArrayModifiableDBIDs |
ids
Cluster order.
|
(package private) WritableDBIDDataStore |
predecessor
Predecessor storage.
|
(package private) WritableDoubleDataStore |
reachability
Reachability storage.
|
Constructor and Description |
---|
ClusterOrder(DBIDs ids,
java.lang.String name,
java.lang.String shortname)
Constructor
|
ClusterOrder(java.lang.String name,
java.lang.String shortname,
ArrayModifiableDBIDs ids,
WritableDoubleDataStore reachability,
WritableDBIDDataStore predecessor)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(DBIDRef id,
double reach,
DBIDRef pre)
Add an object to the cluster order.
|
ArrayDBIDs |
getDBIDs()
Get the full set of DBIDs this ordering is defined for.
|
void |
getPredecessor(DBIDRef id,
DBIDVar out)
Get the predecessor.
|
double |
getReachability(DBIDRef id)
Get the reachability of an object.
|
DBIDArrayIter |
iter()
Get an iterator.
|
ArrayModifiableDBIDs |
order(DBIDs ids)
Use the cluster order to sort the given collection ids.
|
int |
size()
Size.
|
getLongName, getShortName
addChildResult, getHierarchy, setHierarchy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLongName, getShortName
ArrayModifiableDBIDs ids
WritableDoubleDataStore reachability
WritableDBIDDataStore predecessor
public ClusterOrder(DBIDs ids, java.lang.String name, java.lang.String shortname)
ids
- Object IDs includedname
- The long name (for pretty printing)shortname
- the short name (for filenames etc.)public ClusterOrder(java.lang.String name, java.lang.String shortname, ArrayModifiableDBIDs ids, WritableDoubleDataStore reachability, WritableDBIDDataStore predecessor)
ids
- Object IDs includedname
- The long name (for pretty printing)shortname
- the short name (for filenames etc.)public void add(DBIDRef id, double reach, DBIDRef pre)
id
- Object idreach
- Reachabilitypre
- Predecessorpublic ArrayDBIDs getDBIDs()
OrderingResult
getDBIDs
in interface OrderingResult
public DBIDArrayIter iter()
public ArrayModifiableDBIDs order(DBIDs ids)
OrderingResult
interface.order
in interface OrderingResult
ids
- Collection of ids.public int size()
public double getReachability(DBIDRef id)
id
- Object idCopyright © 2019 ELKI Development Team. License information.