com.daylight
Class Fingerprint

java.lang.Object
  extended by com.daylight.DaylightCppObject
      extended by com.daylight.DaylightObject
          extended by com.daylight.Fingerprint

public class Fingerprint
extends DaylightObject

Object representing a Daylight fingerprint


Field Summary
 
Fields inherited from class com.daylight.DaylightCppObject
ref
 
Constructor Summary
Fingerprint(int numbits)
          Allocate a new fingerprint.
 
Method Summary
 Fingerprint copy()
          from dt_copy.
protected  void finalize()
          Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
 boolean fingerTest(Fingerprint other)
          from dt_fp_fingertest.
 void fold(int minimumSize, float minimumDensity)
          from dt_fp_foldfp.
 int getBitOnCount()
          from dt_fp_bitcount.
 int getBitValue(int bitNumber)
          from dt_fp_bitvalue.
 int getCommonBitOnCount(Fingerprint other)
          from dt_fp_commonbitcount.
 float getEuclidianDistance(Fingerprint other)
          from dt_fp_euclid.
 int getOriginalBitOnCount()
          from dt_fp_obitcount.
 int getOriginalSize()
          from dt_fp_obits.
 byte[] getRange(int offset, int numberOfBits)
          from dt_fp_range.
 int getRangeSourceOffset(int offset, int numberOfBits)
          from dt_fp_range.
 float getSimilarity(Fingerprint other, java.lang.String expression)
          from dt_fp_similarity.
 int getSize()
          from dt_fp_nbits.
 java.lang.String getStringValue()
          from dt_stringvalue.
 float getTanimotoDistance(Fingerprint other)
          from dt_fp_tanimoto.
 float getTverskyDistance(Fingerprint other, float alpha, float beta)
          from dt_fp_tversky.
 void setBitValue(int bitNumber, int value)
          from dt_fp_setbitvalue.
 void setOriginalBitOnCount(int count)
          from dt_fp_setobitcount.
 void setOriginalSize(int size)
          from dt_fp_setobits.
 int setRange(int dstBitOffset, int numberOfBits, byte[] range, int sourceBitOffset, FingerprintOperation operation)
          from dt_fp_setrange.
 void setStringValue(java.lang.String value)
          from dt_setstringvalue.
 
Methods inherited from class com.daylight.DaylightObject
appendStringProperty, checkProgramLicense, checkToolkitLicense, clearErrors, disableVirtualHandles, equals, getAdjunct, getAncestor, getBase, getBooleanProperty, getChiralClass, getChiralOrder, getCount, getErrors, getExistingObjectCount, getHandleProperty, getIntegerProperty, getParent, getPropertyNames, getPropertyType, getRealProperty, getRuntimeLibraryCreationDate, getRuntimeLibraryVersion, getStream, getStringProperty, getType, getTypename, getUniqueId, getUniqueIdRange, getWorstErrorType, hashCode, isNullObject, mpInitialize, mpLock, mpTrylock, mpUnlock, saveError, setAdjunct, setBooleanProperty, setHandleProperty, setIntegerProperty, setRealProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fingerprint

public Fingerprint(int numbits)
            throws DaylightException
Allocate a new fingerprint. Allocates a new, empty fingerprint. The fingerprint's size will be set to the value of 'size'. Legal values of 'size' are 32 to 1073741824 (2^30). If not a power of two, 'size' will be rounded to the next highest power of two. The object initially has no bits set (all bits are zero). Note that a 1Gbit fingerprint consumes significant system memory (128MB).

Throws:
DaylightException
Method Detail

copy

public Fingerprint copy()
                 throws DaylightException
from dt_copy.

Throws:
DaylightException

getBitOnCount

public int getBitOnCount()
                  throws DaylightException
from dt_fp_bitcount.

Throws:
DaylightException

getCommonBitOnCount

public int getCommonBitOnCount(Fingerprint other)
                        throws DaylightException
from dt_fp_commonbitcount.

Throws:
DaylightException

getSize

public int getSize()
            throws DaylightException
from dt_fp_nbits. Returns fingerprint size in bits.

Throws:
DaylightException

getBitValue

public int getBitValue(int bitNumber)
                throws DaylightException
from dt_fp_bitvalue.

Throws:
DaylightException

setBitValue

public void setBitValue(int bitNumber,
                        int value)
                 throws DaylightException
from dt_fp_setbitvalue.

Throws:
DaylightException

getOriginalBitOnCount

public int getOriginalBitOnCount()
                          throws DaylightException
from dt_fp_obitcount. This method returns the last value supplied to setOriginalPositiveBitCount, otherwise 0.

Throws:
DaylightException

setOriginalBitOnCount

public void setOriginalBitOnCount(int count)
                           throws DaylightException
from dt_fp_setobitcount.

Throws:
DaylightException

getOriginalSize

public int getOriginalSize()
                    throws DaylightException
from dt_fp_obits.

Throws:
DaylightException

setOriginalSize

public void setOriginalSize(int size)
                     throws DaylightException
from dt_fp_setobits.

Throws:
DaylightException

getRange

public byte[] getRange(int offset,
                       int numberOfBits)
                throws DaylightException
from dt_fp_range. Caller owns returned memory.

Throws:
DaylightException

getRangeSourceOffset

public int getRangeSourceOffset(int offset,
                                int numberOfBits)
                         throws DaylightException
from dt_fp_range. Present for java wrapper. Returns the offset within the byte of the start of valid data returned by getRange().

Throws:
DaylightException

setRange

public int setRange(int dstBitOffset,
                    int numberOfBits,
                    byte[] range,
                    int sourceBitOffset,
                    FingerprintOperation operation)
             throws DaylightException
from dt_fp_setrange.

Throws:
DaylightException

fold

public void fold(int minimumSize,
                 float minimumDensity)
          throws DaylightException
from dt_fp_foldfp.

Throws:
DaylightException

fingerTest

public boolean fingerTest(Fingerprint other)
                   throws DaylightException
from dt_fp_fingertest.

Throws:
DaylightException

getEuclidianDistance

public float getEuclidianDistance(Fingerprint other)
                           throws DaylightException
from dt_fp_euclid.

Throws:
DaylightException

getSimilarity

public float getSimilarity(Fingerprint other,
                           java.lang.String expression)
                    throws DaylightException
from dt_fp_similarity.

Throws:
DaylightException

getTanimotoDistance

public float getTanimotoDistance(Fingerprint other)
                          throws DaylightException
from dt_fp_tanimoto.

Throws:
DaylightException

getTverskyDistance

public float getTverskyDistance(Fingerprint other,
                                float alpha,
                                float beta)
                         throws DaylightException
from dt_fp_tversky.

Throws:
DaylightException

setStringValue

public void setStringValue(java.lang.String value)
                    throws DaylightException
from dt_setstringvalue.

Throws:
DaylightException

getStringValue

public java.lang.String getStringValue()
                                throws DaylightException
from dt_stringvalue.

Throws:
DaylightException

finalize

protected void finalize()
                 throws java.lang.Throwable
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

Overrides:
finalize in class DaylightObject
Throws:
java.lang.Throwable