|
|
|||||||||||||||||||||
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.NumberDistance<DoubleDistance,Double>
de.lmu.ifi.dbs.elki.distance.DoubleDistance
public class DoubleDistance
Provides a Distance for a double-valued distance.
Field Summary | |
---|---|
private static long |
serialVersionUID
Generated serialVersionUID. |
Constructor Summary | |
---|---|
DoubleDistance()
Empty constructor for serialization purposes. |
|
DoubleDistance(double value)
Constructs a new DoubleDistance object that represents the double argument. |
Method Summary | |
---|---|
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. |
DoubleDistance |
minus(DoubleDistance distance)
Returns a new Distance by subtracting the given distance from this distance. |
DoubleDistance |
plus(DoubleDistance distance)
Returns a new distance as sum of this distance and the given distance. |
void |
readExternal(ObjectInput in)
Reads the double value of this DoubleDistance from the specified stream. |
DoubleDistance |
times(double lambda)
Returns a new distance as the product of this distance and the given double value. |
DoubleDistance |
times(DoubleDistance distance)
Returns a new distance as the product of this distance and the given distance. |
void |
writeExternal(ObjectOutput out)
Writes the double value of this DoubleDistance to the specified stream. |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.NumberDistance |
---|
compareTo, getValue, hashCode, setValue, toString |
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
Constructor Detail |
---|
public DoubleDistance()
public DoubleDistance(double value)
value
- the value to be represented by the DoubleDistance.Method Detail |
---|
public String description()
Distance
public DoubleDistance plus(DoubleDistance distance)
Distance
distance
- the distance to be added to this distance
public DoubleDistance minus(DoubleDistance distance)
Distance
distance
- the distance to be subtracted from this distance
public DoubleDistance times(DoubleDistance distance)
distance
- the distance to be multiplied with this distance
public DoubleDistance times(double lambda)
lambda
- the double value this distance should be multiplied with
public void writeExternal(ObjectOutput out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException
IOException
public int externalizableSize()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |