Daylight v4.9
Release Date: 1 February 2008

Name

dt_fp_foldfp - fold a fingerprint zero or more times

Generic Prototype

dt_fp_foldfp(dt_Handle, dt_Integer, dt_Real) => dt_Boolean

C Prototype

#include "dt_finger.h"

dt_Boolean dt_fp_foldfp(dt_Handle fingerprint, dt_Integer minsize, dt_Real mindensity)

FORTRAN Prototype

include 'dt_f_finger.inc'

logical dt_f_fp_foldfp(fingerprint, minsize, mindensity)

integer*4 fingerprint
integer*4 minsize
real*4 mindensity

Description

Folds the fingerprint 'fingerprint'. The function will fold the fingerprint zero or more times until the size of the fingerprint decreases to 'minsize' or the density of set bits increases above 'mindensity'.

The argument 'mindensity' expresses the fraction of bits on of the total number of bits in the fingerprint. Valid values are 0.0 - 1.0.

The argument 'minsize' expressed the total number of bits in the fingerprint. A value of 32 is the practical minimum allowed (values below this will be ignored, 32 bits are used in its place).

Note: a common desired operation is to fold a fingerprint exactly one time (to half its original size), regardless of density. Use the following:

dt_fp_foldfp(fingerprint, dt_fp_nbits(fingerprint) / 2, 1.0);

Return Value

Returns the success (TRUE) or failure (FALSE) of the operation. That folding does not occur is not an error.

Related Topics

dt_fp_allocfp(3) dt_fp_bitcount(3) dt_fp_bitvalue(3) dt_fp_euclid(3) dt_fp_fingertest(3) dt_fp_generatefp(3) dt_fp_nbits(3) dt_fp_obitcount(3) dt_fp_obits(3) dt_fp_range(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)