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