|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.logging.AbstractLoggable de.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. |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Constructor Summary | |
---|---|
PreferenceVectorBasedCorrelationDistance()
Empty constructor for serialization purposes. |
|
PreferenceVectorBasedCorrelationDistance(int correlationValue,
double euklideanValue,
BitSet commonPreferenceVector)
Constructs a new CorrelationDistance object. |
Method Summary | |
---|---|
int |
compareTo(PreferenceVectorBasedCorrelationDistance o)
|
String |
description()
Returns a String as description of this Distance. |
int |
externalizableSize()
Retuns 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)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
String |
toString()
Returns a string representation of the object. |
void |
writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.CorrelationDistance |
---|
getCorrelationValue, getEuklideanValue, hashCode |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractDistance |
---|
equals |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private BitSet commonPreferenceVector
Constructor Detail |
---|
public PreferenceVectorBasedCorrelationDistance()
public PreferenceVectorBasedCorrelationDistance(int correlationValue, double euklideanValue, BitSet commonPreferenceVector)
correlationValue
- the correlation dimension to be represented by the
CorrelationDistanceeuklideanValue
- 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>
Distance.description()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
out
- the stream to write the object to
IOException
- Includes any I/O exceptions that may occurpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
in
- the stream to read data from in order to restore the object
IOException
- if I/O errors occur
ClassNotFoundException
- If the class for an object being restored cannot be found.public int externalizableSize()
externalizableSize
in interface Distance<PreferenceVectorBasedCorrelationDistance>
externalizableSize
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 distancce to be added to this distance
Distance.plus(Distance)
public PreferenceVectorBasedCorrelationDistance minus(PreferenceVectorBasedCorrelationDistance distance)
Distance
minus
in interface Distance<PreferenceVectorBasedCorrelationDistance>
minus
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
distance
- the distance to be subtracted from this distance
Distance.minus(Distance)
public int compareTo(PreferenceVectorBasedCorrelationDistance o)
compareTo
in interface Comparable<PreferenceVectorBasedCorrelationDistance>
compareTo
in class CorrelationDistance<PreferenceVectorBasedCorrelationDistance>
UnsupportedOperationException
Comparable.compareTo(Object)
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |