|
|
|||||||||||||||||||||
| 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
|
| Fields inherited from class de.lmu.ifi.dbs.elki.distance.CorrelationDistance |
|---|
CORRELATION_DISTANCE_PATTERN, correlationValue, euclideanValue, SEPARATOR |
| Fields inherited from class de.lmu.ifi.dbs.elki.distance.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.CorrelationDistance |
|---|
equals, getCorrelationValue, getEuclideanValue, hashCode |
| Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractDistance |
|---|
isInfiniteDistance, isNullDistance, isUndefinedDistance, requiredInputPattern, testInputPattern |
| 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 distance| Method 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 equal
public 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 ExternalizablewriteExternal 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 ExternalizablereadExternal in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>IOExceptionpublic 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 | |||||||||||