|
|
|||||||||||||||||||||
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<PreferenceVectorBasedCorrelationDistance>
de.lmu.ifi.dbs.elki.distance.PreferenceVectorBasedCorrelationDistance
public class PreferenceVectorBasedCorrelationDistance
A PreferenceVectorBasedCorrelationDistance holds additionally to the CorrelationDistance the common preference vector of the two objects defining the distance.
Field Summary | |
---|---|
private BitSet |
commonPreferenceVector
The common preference vector of the two objects defining this distance. |
private int |
dimensionality
The dimensionality of the feature space (needed for serialization). |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
PreferenceVectorBasedCorrelationDistance()
Empty constructor for serialization purposes. |
|
PreferenceVectorBasedCorrelationDistance(int dimensionality,
int correlationValue,
double euclideanValue,
BitSet commonPreferenceVector)
Constructs a new CorrelationDistance object. |
Method Summary | |
---|---|
int |
compareTo(PreferenceVectorBasedCorrelationDistance distance)
Checks if the dimensionality values of this distance and the specified distance are equal. |
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. |
BitSet |
getCommonPreferenceVector()
Returns the common preference vector of the two objects defining this distance. |
PreferenceVectorBasedCorrelationDistance |
minus(PreferenceVectorBasedCorrelationDistance distance)
Returns a new Distance by subtracting the given distance from this distance. |
PreferenceVectorBasedCorrelationDistance |
plus(PreferenceVectorBasedCorrelationDistance distance)
Returns a new distance as sum of this distance and the given distance. |
void |
readExternal(ObjectInput in)
Calls CorrelationDistance.readExternal(java.io.ObjectInput)
and reads additionally the dimensionality and each Byte of the common preference vector
from the specified stream.. |
String |
toString()
Returns a string representation of this PreferenceVectorBasedCorrelationDistance. |
void |
writeExternal(ObjectOutput out)
Calls CorrelationDistance.writeExternal(java.io.ObjectOutput)
and writes additionally the dimensionality and each Byte of the common preference vector
to the specified stream. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.CorrelationDistance |
---|
getCorrelationValue, getEuclideanValue, hashCode |
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 dimensionality
private BitSet commonPreferenceVector
Constructor Detail |
---|
public PreferenceVectorBasedCorrelationDistance()
public PreferenceVectorBasedCorrelationDistance(int dimensionality, int correlationValue, double euclideanValue, BitSet commonPreferenceVector)
dimensionality
- the dimensionality of the feature space (needed for serialization)correlationValue
- the correlation dimension to be represented by the
CorrelationDistanceeuclideanValue
- the euclidean distance to be represented by the
CorrelationDistancecommonPreferenceVector
- the common preference vector of the two objects defining this distanceMethod Detail |
---|
public BitSet getCommonPreferenceVector()
public String description()
Distance
description
in interface Distance<PreferenceVectorBasedCorrelationDistance>
description
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
public String toString()
toString
in interface Distance<PreferenceVectorBasedCorrelationDistance>
toString
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
public PreferenceVectorBasedCorrelationDistance plus(PreferenceVectorBasedCorrelationDistance distance)
Distance
plus
in interface Distance<PreferenceVectorBasedCorrelationDistance>
plus
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
distance
- the distance to be added to this distance
IllegalArgumentException
- if the dimensionality values and common preference vectors
of this distance and the specified distance are not equalpublic PreferenceVectorBasedCorrelationDistance minus(PreferenceVectorBasedCorrelationDistance distance)
Distance
minus
in interface Distance<PreferenceVectorBasedCorrelationDistance>
minus
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
distance
- the distance to be subtracted from this distance
IllegalArgumentException
- if the dimensionality values and common preference vectors
of this distance and the specified distance are not equalpublic int compareTo(PreferenceVectorBasedCorrelationDistance distance)
CorrelationDistance#compareTo(distance)
is returned.
compareTo
in interface Comparable<PreferenceVectorBasedCorrelationDistance>
compareTo
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
CorrelationDistance#compareTo(distance)
IllegalArgumentException
- if the dimensionality values
of this distance and the specified distance are not equalpublic void writeExternal(ObjectOutput out) throws IOException
CorrelationDistance.writeExternal(java.io.ObjectOutput)
and writes additionally the dimensionality and each Byte of the common preference vector
to the specified stream.
writeExternal
in interface Externalizable
writeExternal
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
IOException
public void readExternal(ObjectInput in) throws IOException
CorrelationDistance.readExternal(java.io.ObjectInput)
and reads additionally the dimensionality and each Byte of the common preference vector
from the specified stream..
readExternal
in interface Externalizable
readExternal
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
IOException
public int externalizableSize()
externalizableSize
in interface Distance<PreferenceVectorBasedCorrelationDistance>
externalizableSize
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |