|
|
|||||||||||||||||||||
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<FloatDistance,Float>
de.lmu.ifi.dbs.elki.distance.FloatDistance
public class FloatDistance
Provides a Distance for a float-valued distance.
Field Summary | |
---|---|
private static long |
serialVersionUID
Generated serialVersionUID. |
Constructor Summary | |
---|---|
FloatDistance()
Empty constructor for serialization purposes. |
|
FloatDistance(float value)
Constructs a new FloatDistance object that represents the float 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. |
FloatDistance |
minus(FloatDistance distance)
Returns a new Distance by subtracting the given distance from this distance. |
FloatDistance |
plus(FloatDistance distance)
Returns a new distance as sum of this distance and the given distance. |
void |
readExternal(ObjectInput in)
Reads the float value of this FloatDistance from the specified stream. |
FloatDistance |
times(float lambda)
Returns a new distance as the product of this distance and the given float value. |
FloatDistance |
times(FloatDistance distance)
Returns a new distance as the product of this distance and the given distance. |
void |
writeExternal(ObjectOutput out)
Writes the float value of this FloatDistance 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 FloatDistance()
public FloatDistance(float value)
value
- the value to be represented by the FloatDistance.Method Detail |
---|
public String description()
Distance
public FloatDistance plus(FloatDistance distance)
Distance
distance
- the distance to be added to this distance
public FloatDistance minus(FloatDistance distance)
Distance
distance
- the distance to be subtracted from this distance
public FloatDistance times(FloatDistance distance)
distance
- the distance to be multiplied with this distance
public FloatDistance times(float lambda)
lambda
- the float 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 |