|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.distance.AbstractDistance<D>
de.lmu.ifi.dbs.elki.distance.CorrelationDistance<D>
D - distance typepublic class CorrelationDistance<D extends CorrelationDistance<D>>
The correlation distance is a special Distance that indicates the dissimilarity between correlation connected objects. The correlation distance between 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 |
euclideanValue
The euclidean distance. |
private static long |
serialVersionUID
Generated SerialVersionUID. |
| Constructor Summary | |
|---|---|
CorrelationDistance()
Empty constructor for serialization purposes. |
|
CorrelationDistance(int correlationValue,
double euclideanValue)
Constructs a new CorrelationDistance object consisting of the specified correlation value and euclidean value. |
|
| Method Summary | |
|---|---|
int |
compareTo(D other)
Compares this CorrelationDistance with the given CorrelationDistance wrt the represented correlation values. |
String |
description()
Returns a String as description of this Distance. |
int |
externalizableSize()
Returns 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 |
getEuclideanValue()
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)
Reads the correlation value and the euclidean value of this CorrelationDistance from the specified stream. |
String |
toString()
Returns a string representation of this CorrelationDistance. |
void |
writeExternal(ObjectOutput out)
Writes the correlation value and the euclidean value of this CorrelationDistance to the specified stream. |
| Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractDistance |
|---|
equals |
| 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 euclideanValue
| Constructor Detail |
|---|
public CorrelationDistance()
public CorrelationDistance(int correlationValue,
double euclideanValue)
correlationValue - the correlation dimension to be represented by the
CorrelationDistanceeuclideanValue - the euclidean distance to be represented by the
CorrelationDistance| Method Detail |
|---|
public D plus(D distance)
Distance
distance - the distance to be added to this distance
public D minus(D distance)
Distance
distance - the distance to be subtracted from this distance
public String description()
Distance
public String toString()
toString in interface Distance<D extends CorrelationDistance<D>>toString in class Objectpublic int compareTo(D other)
Integer.compareTo(Integer) this.correlationValue.compareTo(other.correlationValue)}
if it is a non zero value,
the value of Double.compare(this.euclideanValue, other.euclideanValue)
otherwisepublic int hashCode()
AbstractDistance
hashCode in class AbstractDistance<D extends CorrelationDistance<D>>public int getCorrelationValue()
public double getEuclideanValue()
public void writeExternal(ObjectOutput out)
throws IOException
IOException
public void readExternal(ObjectInput in)
throws IOException
IOExceptionpublic int externalizableSize()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||