Daylight v4.9
Release Date: 1 February 2008

Name

dt_fp_range - retrieve a range of bits from a fingerprint

Generic Prototype

dt_fp_range(dt_Handle, dt_Integer, dt_Integer, dt_Integer *) => dt_String

C Prototype

#include "dt_finger.h"

dt_String dt_fp_range(dt_Integer *slen, dt_Handle fp, dt_Integer offset, dt_Integer nbits, dt_Integer *soffset)

FORTRAN Prototype

include 'dt_f_finger.inc'

integer*4 dt_f_fp_range(fp, offset, nbits, soffset, string)

integer*4 fp
integer*4 offset
integer*4 nbits
integer soffset
character*() string

Description

Gets a range of bits from a fingerprint. The range of bits desired is specified by the 'offset' and 'nbits'. The returned value 'soffset' is the bit offset into the first byte of the string returned.

The returned bits will retain their internal byte-alignment (they are not copied). Hence, 'soffset' will be a value in the range of 0 - 7, depending on the given 'offset'. In the current implementation, 'soffset' is the remainder: (offset % 8). The values of the bits below 'soffset' in the first byte of the returned string are undefined.

Return Value

Returns a string. The string is owned by the toolkit and must not be deallocated by the user. Returns the 'invalid string' if the handle is not an appropriate object, or if the range of bits requested is not in the fingerprint.

Related Topics

dt_fp_allocfp(3) dt_fp_bitcount(3) dt_fp_bitvalue(3) dt_fp_euclid(3) dt_fp_fingertest(3) dt_fp_foldfp(3) dt_fp_generatefp(3) dt_fp_nbits(3) dt_fp_obitcount(3) dt_fp_obits(3) dt_fp_setbitvalue(3) dt_fp_setobitcount(3) dt_fp_setobits(3) dt_fp_setrange(3) dt_fp_tanimoto(3) dt_fp_tversky(3)