|
|
|||||||||||||||||||||
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.SubspaceDistance<D>
public class SubspaceDistance<D extends SubspaceDistance<D>>
The SubspaceDistance is a special distance that indicates the dissimilarity between subspaces of equal dimensionality. The SubspaceDistance beween two points is a pair consisting of the distance between the two subspaces spanned by the strong eigenvectors of the two points and the affine distance between the two subspaces.
Field Summary | |
---|---|
private double |
affineDistance
The affine distance. |
static Pattern |
SEPARATOR
Indicates a separator. |
private double |
subspaceDistance
The subspace distance. |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Constructor Summary | |
---|---|
SubspaceDistance()
Empty constructor for serialization purposes. |
|
SubspaceDistance(double subspaceDistance,
double affineDistance)
Constructs a new SubspaceDistance object. |
Method Summary | |
---|---|
int |
compareTo(D other)
|
String |
description()
Returns a String as description of this Distance. |
boolean |
equals(Object o)
Returns true if o is of the same class as this instance and this.compareTo(o) is 0,
false otherwise. |
int |
externalizableSize()
Retuns the number of Bytes this distance uses if it is written to an external file. |
double |
getAffineDistance()
Returns the value of the affine distance. |
double |
getSubspaceDistance()
Returns the value of the subspace distance. |
int |
hashCode()
Returns a hash code value for this object. |
D |
minus(D distance)
Returns a new Distance by subtracting the given distance from this distance. |
D |
plus(D 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.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 |
---|
public static final Pattern SEPARATOR
private double subspaceDistance
private double affineDistance
Constructor Detail |
---|
public SubspaceDistance()
public SubspaceDistance(double subspaceDistance, double affineDistance)
subspaceDistance
- the subspace distanceaffineDistance
- the affine distanceMethod Detail |
---|
public D plus(D distance)
Distance
distance
- the distancce to be added to this distance
Distance.plus(de.lmu.ifi.dbs.elki.distance.Distance)
public D minus(D distance)
Distance
distance
- the distance to be subtracted from this distance
Distance.minus(de.lmu.ifi.dbs.elki.distance.Distance)
public String description()
Distance
Distance.description()
public int compareTo(D other)
Comparable.compareTo(Object)
public void writeExternal(ObjectOutput out) throws IOException
out
- the stream to write the object to
IOException
- Includes any I/O exceptions that may occurpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
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()
public String toString()
toString
in interface Distance<D extends SubspaceDistance<D>>
toString
in class Object
public boolean equals(Object o)
this.compareTo(o)
is 0,
false otherwise.
equals
in class AbstractDistance<D extends SubspaceDistance<D>>
Object.equals(Object)
public int hashCode()
hashCode
in class AbstractDistance<D extends SubspaceDistance<D>>
Object.hashCode()
public double getSubspaceDistance()
public double getAffineDistance()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |