.TH "cormr_set" 3 "corm" \" -*- nroff -*- .ad l .nh .SH NAME cormr_set \- Candidate sets .SH SYNOPSIS .br .PP .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBcormr_set_exactness\fP { \fBCORMR_SET_EXACT\fP = 0, \fBCORMR_SET_APPROX\fP = 1 }" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "cormr_set_t * \fBcormr_set_new\fP (void)" .br .ti -1c .RI "void \fBcormr_set_push\fP (cormr_set_t *s, cormr_ref_t r)" .br .ti -1c .RI "void \fBcormr_set_seal\fP (cormr_set_t *s)" .br .ti -1c .RI "int \fBcormr_set_drain\fP (cormr_set_t *s, uint32_t hd)" .br .ti -1c .RI "int \fBcormr_set_intersect\fP (cormr_set_t *dst, const cormr_set_t *a, const cormr_set_t *b)" .br .ti -1c .RI "int \fBcormr_set_subtract\fP (cormr_set_t *dst, const cormr_set_t *a, const cormr_set_t *b)" .br .ti -1c .RI "int \fBcormr_set_union\fP (cormr_set_t *dst, const cormr_set_t *a, const cormr_set_t *b)" .br .ti -1c .RI "size_t \fBcormr_set_count\fP (const cormr_set_t *s)" .br .ti -1c .RI "const cormr_ref_t * \fBcormr_set_at\fP (const cormr_set_t *s)" .br .ti -1c .RI "void \fBcormr_set_free\fP (cormr_set_t *s)" .br .ti -1c .RI "int \fBcormr_set_approx\fP (cormr_set_t *s, int approx, float recall_bound)" .br .ti -1c .RI "int \fBcormr_set_is_approx\fP (const cormr_set_t *s)" .br .ti -1c .RI "float \fBcormr_set_bound\fP (const cormr_set_t *s)" .br .in -1c .SH "Detailed Description" .PP .SH "Enumeration Type Documentation" .PP .SS "enum \fBcormr_set_exactness\fP" Exactness of a filled set\&. Approximate fills (e\&.g\&. ANN neighbors) must declare themselves: intersecting with an approximate set bounds final recall by the approximate one\&. Default for every set: exact, bound 1\&.0\&. .PP \fBEnumerator\fP .in +1c .TP \f(BICORMR_SET_EXACT \fP every matching ref is reported .TP \f(BICORMR_SET_APPROX \fP bounded candidate window m; owed recall@k < 1 .SH "Function Documentation" .PP .SS "int cormr_set_approx (cormr_set_t * s, int approx, float recall_bound)" Mark the set approximate/exact and its owed recall@k bound (0 < bound <= 1)\&. Exact sets carry bound 1\&.0\&. Returns 0 on success, -1 when the set is NULL or the bound is outside (0,1] (the flag is left unchanged)\&. Joins propagate exactness: intersect/union produce an approximate set when either operand is (bound = min); subtract keeps the left operand's flag and bound (the result is a subset of it)\&. .SS "const cormr_ref_t * cormr_set_at (const cormr_set_t * s)" Get a pointer to the backing array (sealed → sorted, deduped)\&. .SS "float cormr_set_bound (const cormr_set_t * s)" Owed recall@k bound (default 1\&.0 for exact sets)\&. .SS "size_t cormr_set_count (const cormr_set_t * s)" Number of refs currently held (works before and after sealing)\&. .SS "int cormr_set_drain (cormr_set_t * s, uint32_t hd)" Drain a corm handle's iteration into the set (keys must be fixed-length, <= 4 bytes; refs are read from the key bytes)\&. Excludes nothing; call cormr_set_seal afterwards\&. Returns 0 on success, -1 if keys are variable length or wider than a ref\&. .SS "void cormr_set_free (cormr_set_t * s)" Release the set's storage\&. .SS "int cormr_set_intersect (cormr_set_t * dst, const cormr_set_t * a, const cormr_set_t * b)" dst := a ∩ b\&. a and b must be sealed; dst content is discarded\&. .SS "int cormr_set_is_approx (const cormr_set_t * s)" 1 if the set is approximate (CORMR_SET_APPROX), 0 if exact (default)\&. .SS "cormr_set_t * cormr_set_new (void )" Create an empty, unsorted set (arena-backed, grows on demand)\&. .SS "void cormr_set_push (cormr_set_t * s, cormr_ref_t r)" Append a ref\&. Unseals a previously sealed set\&. .SS "void cormr_set_seal (cormr_set_t * s)" Sort + dedup in place\&. Joins require sealed inputs\&. .SS "int cormr_set_subtract (cormr_set_t * dst, const cormr_set_t * a, const cormr_set_t * b)" dst := a − b\&. a and b must be sealed; dst content is discarded\&. .SS "int cormr_set_union (cormr_set_t * dst, const cormr_set_t * a, const cormr_set_t * b)" dst := a ∪ b\&. a and b must be sealed; dst content is discarded\&. .SH "Author" .PP Generated automatically by Doxygen for corm from the source code\&.