|
|
|||||||||||||||||||||
| 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 abstract 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 | |
|---|---|
static Pattern |
CORRELATION_DISTANCE_PATTERN
The pattern used for correlation distances |
protected int |
correlationValue
The correlation dimension. |
protected double |
euclideanValue
The euclidean distance. |
static String |
SEPARATOR
The component separator used by correlation distances. |
private static long |
serialVersionUID
Generated SerialVersionUID. |
| Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractDistance |
|---|
DOUBLE_PATTERN, INFINITY_PATTERN, INTEGER_PATTERN |
| 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. |
boolean |
equals(Object obj)
Returns true if this == o has the value true or o
is not null and o is of the same class as this instance and
this.compareTo(o) is 0, false otherwise. |
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. |
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 |
|---|
getPattern, isInfiniteDistance, isNullDistance, isUndefinedDistance, requiredInputPattern, testInputPattern |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.distance.Distance |
|---|
infiniteDistance, minus, nullDistance, parseString, plus, undefinedDistance |
| Field Detail |
|---|
public static final String SEPARATOR
public static final Pattern CORRELATION_DISTANCE_PATTERN
private static final long serialVersionUID
protected int correlationValue
protected 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 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 boolean equals(Object obj)
AbstractDistancethis == o has the value true or o
is not null and o is of the same class as this instance and
this.compareTo(o) is 0, false otherwise.
equals 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 | |||||||||||