|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.distance.distancevalue.AbstractDistance<D> de.lmu.ifi.dbs.elki.distance.distancevalue.CorrelationDistance<PreferenceVectorBasedCorrelationDistance> de.lmu.ifi.dbs.elki.distance.distancevalue.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). |
static PreferenceVectorBasedCorrelationDistance |
FACTORY
The static factory instance |
private static long |
serialVersionUID
Serial version |
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancevalue.CorrelationDistance |
---|
CORRELATION_DISTANCE_PATTERN, correlationValue, euclideanValue, SEPARATOR |
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancevalue.AbstractDistance |
---|
DOUBLE_PATTERN, INFINITY_PATTERN, INTEGER_PATTERN |
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. |
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. |
Pattern |
getPattern()
Get the pattern accepted by this distance |
PreferenceVectorBasedCorrelationDistance |
infiniteDistance()
Provides an infinite distance. |
PreferenceVectorBasedCorrelationDistance |
minus(PreferenceVectorBasedCorrelationDistance distance)
Returns a new Distance by subtracting the given distance from this distance. |
PreferenceVectorBasedCorrelationDistance |
nullDistance()
Provides a null distance. |
PreferenceVectorBasedCorrelationDistance |
parseString(String pattern)
Provides a measurement suitable to this measurement function based on the given pattern. |
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. |
PreferenceVectorBasedCorrelationDistance |
undefinedDistance()
Provides an undefined distance. |
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.distancevalue.CorrelationDistance |
---|
equals, getCorrelationValue, getEuclideanValue, hashCode |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancevalue.AbstractDistance |
---|
isInfiniteDistance, isNullDistance, isUndefinedDistance, requiredInputPattern, testInputPattern |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PreferenceVectorBasedCorrelationDistance FACTORY
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 toString()
toString
in interface Distance<PreferenceVectorBasedCorrelationDistance>
toString
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
public PreferenceVectorBasedCorrelationDistance plus(PreferenceVectorBasedCorrelationDistance distance)
Distance
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
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>
public Pattern getPattern()
AbstractDistance
getPattern
in class AbstractDistance<PreferenceVectorBasedCorrelationDistance>
public PreferenceVectorBasedCorrelationDistance parseString(String pattern) throws IllegalArgumentException
Distance
pattern
- a pattern defining a similarity suitable to this measurement
function
IllegalArgumentException
- if the given pattern is not compatible
with the requirements of this measurement functionpublic PreferenceVectorBasedCorrelationDistance infiniteDistance()
Distance
public PreferenceVectorBasedCorrelationDistance nullDistance()
Distance
public PreferenceVectorBasedCorrelationDistance undefinedDistance()
Distance
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |