|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.logging.AbstractLoggable de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult<O> de.lmu.ifi.dbs.elki.algorithm.result.clustering.ClusterOrder<O,D>
O
- the type of DatabaseObjects handled by this ResultD
- the type of Distance used by this Resultpublic class ClusterOrder<O extends DatabaseObject,D extends Distance<D>>
A class representing the cluster order of the OPTICS algorithm.
Field Summary | |
---|---|
private List<ClusterOrderEntry<D>> |
co
The cluster order. |
private DistanceFunction<O,D> |
distanceFunction
The distance function of the OPTICS algorithm. |
private D |
maxReachability
The maximum reachability in this cluster order. |
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult |
---|
db, FILE_EXTENSION |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Fields inherited from interface de.lmu.ifi.dbs.elki.algorithm.result.Result |
---|
SEPARATOR |
Constructor Summary | |
---|---|
ClusterOrder(Database<O> database,
DistanceFunction<O,D> distanceFunction)
Provides the cluster order of the OPTICS algorithm. |
Method Summary | |
---|---|
void |
add(Integer objectID,
Integer predecessorID,
D reachability)
Adds an object with the given predecessor and the given reachability to this cluster order. |
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one. |
D |
getMaxReachability()
Returns the maximum reachability in this cluster order. |
int |
hashCode()
Returns a hash code value for the object. |
Iterator<ClusterOrderEntry<D>> |
iterator()
Returns an iterator over the elements in this cluster order in proper sequence. |
void |
output(File out,
Normalization<O> normalization,
List<AttributeSettings> settings)
Writes the clustering result to the given file. |
void |
output(PrintStream outStream,
Normalization<O> normalization,
List<AttributeSettings> settings)
Writes the clustering result to the given stream. |
int |
size()
Returns the size of this cluster order. |
String |
toString()
Returns a string representation of this cluster order. |
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult |
---|
getDatabase, writeHeader |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final DistanceFunction<O extends DatabaseObject,D extends Distance<D>> distanceFunction
private final List<ClusterOrderEntry<D extends Distance<D>>> co
private D extends Distance<D> maxReachability
Constructor Detail |
---|
public ClusterOrder(Database<O> database, DistanceFunction<O,D> distanceFunction)
database
- the database containing the objectsdistanceFunction
- the distance function of the OPTICS algorithmMethod Detail |
---|
public void add(Integer objectID, Integer predecessorID, D reachability)
objectID
- the id of the object to be addedpredecessorID
- the id of the object's predecessorreachability
- the reachability of the objectpublic final int size()
public void output(File out, Normalization<O> normalization, List<AttributeSettings> settings) throws UnableToComplyException
Result
output
in interface Result<O extends DatabaseObject>
output
in class AbstractResult<O extends DatabaseObject>
out
- file, which designates the location to write the results,
or which's name designates the prefix of any locations to write the results,
or which could remain null to designate the standard-out as location for output.normalization
- Normalization to restore original values according to, if this action is supported
- may remain null.settings
- the settings to be written into the header, if this parameter is null
,
no header will be written
UnableToComplyException
- if any feature vector is not compatible with values initialized during normalizationResult.output(File,Normalization,List)
public void output(PrintStream outStream, Normalization<O> normalization, List<AttributeSettings> settings) throws UnableToComplyException
Result
outStream
- the stream to write tonormalization
- Normalization to restore original values according to, if this action is supported
- may remain null.settings
- the settings to be written into the header, if this parameter is null
,
no header will be written
UnableToComplyException
- if any feature vector is not compatible with values initialized during normalizationResult.output(java.io.PrintStream, de.lmu.ifi.dbs.elki.normalization.Normalization, java.util.List)
public final String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
o
- the reference object with which to compare.
true
if this object has the same attribute values
as the o argument; false
otherwise.public int hashCode()
hashCode
in class Object
public D getMaxReachability()
public Iterator<ClusterOrderEntry<D>> iterator()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |