Home | History | Annotate | Download | only in lib

Lines Matching defs:candidate

433 /* Return true if CANDIDATE is a prime number.  CANDIDATE should be an odd
437 is_prime (size_t candidate)
442 while (square < candidate && (candidate % divisor))
449 return (candidate % divisor ? true : false);
452 /* Round a given CANDIDATE number up to the nearest prime, and return that
456 next_prime (size_t candidate)
459 if (candidate < 10)
460 candidate = 10;
463 candidate |= 1;
465 while (!is_prime (candidate))
466 candidate += 2;
468 return candidate;
510 may insert at least CANDIDATE different user entries before any growth of
514 the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
540 hash_initialize (size_t candidate, const Hash_tuning *tuning,
568 float new_candidate = candidate / tuning->growth_threshold;
571 candidate = new_candidate;
574 if (xalloc_oversized (candidate, sizeof *table->bucket))
576 table->n_buckets = next_prime (candidate);
811 specifying CANDIDATE. The contents of the hash table are preserved. The
813 the table may receive at least CANDIDATE different user entries, including
815 occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
819 hash_rehash (Hash_table *table, size_t candidate)
826 new_table = hash_initialize (candidate, table->tuning, table->hasher,
960 float candidate =
966 if (SIZE_MAX <= candidate)
970 if (!hash_rehash (table, candidate))
1010 size_t candidate =
1016 hash_rehash (table, candidate);