![]() |
Leptonica
1.83.1
Image processing and image analysis suite
|
Go to the source code of this file.
Functions | |
L_DNAHASH * | l_dnaHashCreate (l_int32 nbuckets, l_int32 initsize) |
void | l_dnaHashDestroy (L_DNAHASH **pdahash) |
L_DNA * | l_dnaHashGetDna (L_DNAHASH *dahash, l_uint64 key, l_int32 copyflag) |
l_ok | l_dnaHashAdd (L_DNAHASH *dahash, l_uint64 key, l_float64 value) |
Dnahash creation, destruction L_DNAHASH *l_dnaHashCreate() void l_dnaHashDestroy() Dnahash accessor and modifier L_DNA *l_dnaHashGetDna() l_int32 l_dnaHashAdd() (1) The DnaHash is an array of Dna. It is a simple method used for fast lookup of templates in the jbig2 classifier (jbclass.c).
Definition in file dnahash.c.
l_ok l_dnaHashAdd | ( | L_DNAHASH * | dahash, |
l_uint64 | key, | ||
l_float64 | value | ||
) |
[in] | dahash | |
[in] | key | key to be hashed into a bucket number |
[in] | value | float value to be appended to the specific dna |
Definition at line 170 of file dnahash.c.
References L_DnaHash::dna, L_DnaHash::initsize, l_dnaAddNumber(), and l_dnaCreate().
L_DNAHASH* l_dnaHashCreate | ( | l_int32 | nbuckets, |
l_int32 | initsize | ||
) |
[in] | nbuckets | the number of buckets in the hash table, which should be prime. |
[in] | initsize | initial size of each allocated dna; 0 for default |
Notes: (1) If nbuckets is not prime, use the next largest prime. (2) In use, stored dna are created by l_dnaHashAdd().
Definition at line 69 of file dnahash.c.
References L_DnaHash::dna, findNextLargerPrime(), L_DnaHash::initsize, and lept_isPrime().
void l_dnaHashDestroy | ( | L_DNAHASH ** | pdahash | ) |
[in,out] | pdahash | will be set to null before returning |
Definition at line 104 of file dnahash.c.
References L_DnaHash::dna, and l_dnaDestroy().
[in] | dahash | |
[in] | key | key to be hashed into a bucket number |
[in] | copyflag | L_NOCOPY, L_COPY, L_CLONE |
Definition at line 137 of file dnahash.c.
References L_DnaHash::dna, L_COPY, l_dnaClone(), l_dnaCopy(), and L_NOCOPY.