|
|
|||||||||||||||||||||
| 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<SubspaceDistance>
de.lmu.ifi.dbs.elki.distance.SubspaceDistance
public class SubspaceDistance
The subspace distance is a special distance that indicates the dissimilarity between subspaces of equal dimensionality. The subspace distance between 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 static long |
serialVersionUID
|
private double |
subspaceDistance
The subspace distance. |
| Constructor Summary | |
|---|---|
SubspaceDistance()
Empty constructor for serialization purposes. |
|
SubspaceDistance(double subspaceDistance,
double affineDistance)
Constructs a new SubspaceDistance object consisting of the specified subspace distance and affine distance. |
|
| Method Summary | |
|---|---|
int |
compareTo(SubspaceDistance other)
Compares this SubspaceDistance with the given SubspaceDistance wrt the represented subspace distance values. |
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. |
double |
getAffineDistance()
Returns the value of the affine distance. |
double |
getSubspaceDistance()
Returns the value of the subspace distance. |
int |
hashCode()
Any extending class should implement a proper hashCode method. |
SubspaceDistance |
minus(SubspaceDistance distance)
Returns a new Distance by subtracting the given distance from this distance. |
SubspaceDistance |
plus(SubspaceDistance distance)
Returns a new distance as sum of this distance and the given distance. |
void |
readExternal(ObjectInput in)
Reads the subspace distance value and the affine distance value of this SubspaceDistance from the specified stream. |
String |
toString()
Returns a string representation of this SubspaceDistance. |
void |
writeExternal(ObjectOutput out)
Writes the subspace distance value and the affine distance value of this SubspaceDistance to the specified stream. |
| 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
public static final Pattern SEPARATOR
private double subspaceDistance
private double affineDistance
| Constructor Detail |
|---|
public SubspaceDistance()
public SubspaceDistance(double subspaceDistance,
double affineDistance)
subspaceDistance - the distance between the two subspaces
spanned by the strong eigenvectors of the two pointsaffineDistance - the affine distance
between the two subspaces| Method Detail |
|---|
public SubspaceDistance plus(SubspaceDistance distance)
Distance
distance - the distance to be added to this distance
public SubspaceDistance minus(SubspaceDistance distance)
Distance
distance - the distance to be subtracted from this distance
public String description()
Distance
public String toString()
toString in interface Distance<SubspaceDistance>toString in class Objectpublic int compareTo(SubspaceDistance other)
Double.compare(this.subspaceDistance, other.subspaceDistance)
if it is a non zero value,
the value of Double.compare(this.affineDistance, other.affineDistance)
otherwisepublic int hashCode()
AbstractDistance
hashCode in class AbstractDistance<SubspaceDistance>public double getSubspaceDistance()
public double getAffineDistance()
public void writeExternal(ObjectOutput out)
throws IOException
IOException
public void readExternal(ObjectInput in)
throws IOException
IOExceptionpublic int externalizableSize()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||