|
|
|||||||||||||||||||||
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.distance.AbstractDistance<D> de.lmu.ifi.dbs.elki.distance.CorrelationDistance<D>
public class CorrelationDistance<D extends CorrelationDistance<D>>
The CorrelationDistance is a special Distance that indicates the dissimilarity between correlation connected objects. The CorrelationDistance beween two points is a pair consisting of the correlation dimension of two points and the euclidean distance between the two points.
Field Summary | |
---|---|
private int |
correlationValue
The correlation dimension. |
private double |
euklideanValue
The euclidean distance. |
private static long |
serialVersionUID
Generated SerialVersionUID. |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Constructor Summary | |
---|---|
CorrelationDistance()
Empty constructor for serialization purposes. |
|
CorrelationDistance(int correlationValue,
double euklideanValue)
Constructs a new CorrelationDistance object. |
Method Summary | |
---|---|
int |
compareTo(D other)
|
String |
description()
Returns a String as description of this Distance. |
int |
externalizableSize()
Retuns the number of Bytes this distance uses if it is written to an external file. |
int |
getCorrelationValue()
Returns the correlation dimension between the objects. |
double |
getEuklideanValue()
Returns the euclidean distance between the objects. |
int |
hashCode()
Any extending class should implement a proper hashCode method. |
D |
minus(D distance)
Returns a new Distance by subtracting the given distance from this distance. |
D |
plus(D distance)
Returns a new distance as sum of this distance and the given distance. |
void |
readExternal(ObjectInput in)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
String |
toString()
Returns a string representation of the object. |
void |
writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractDistance |
---|
equals |
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 static final long serialVersionUID
private int correlationValue
private double euklideanValue
Constructor Detail |
---|
public CorrelationDistance()
public CorrelationDistance(int correlationValue, double euklideanValue)
correlationValue
- the correlation dimension to be represented by the
CorrelationDistanceeuklideanValue
- the euclidean distance to be represented by the
CorrelationDistanceMethod Detail |
---|
public int hashCode()
AbstractDistance
hashCode
in class AbstractDistance<D extends CorrelationDistance<D>>
Object.hashCode()
public D plus(D distance)
Distance
distance
- the distancce to be added to this distance
Distance.plus(Distance)
public D minus(D distance)
Distance
distance
- the distance to be subtracted from this distance
Distance.minus(Distance)
public String description()
Distance
Distance.description()
public int compareTo(D other)
Comparable.compareTo(Object)
public void writeExternal(ObjectOutput out) throws IOException
out
- the stream to write the object to
IOException
- Includes any I/O exceptions that may occurpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
in
- the stream to read data from in order to restore the object
IOException
- if I/O errors occur
ClassNotFoundException
- If the class for an object being restored cannot be found.public int externalizableSize()
public String toString()
toString
in interface Distance<D extends CorrelationDistance<D>>
toString
in class Object
public int getCorrelationValue()
public double getEuklideanValue()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |