X-Git-Url: http://sigaev.ru/git/gitweb.cgi?p=smlar.git;a=blobdiff_plain;f=smlar.h;h=6cd5a27c23012ac0d170053f8d92bbec677e42cb;hp=82a1bcb86508c8c97488e4f2d324fa6f01cd0bc8;hb=8d02df18c0bbfd6ccba94a9582499ec8746047e5;hpb=5cb298d7226344342759d54fe32d72665315d372 diff --git a/smlar.h b/smlar.h index 82a1bcb..6cd5a27 100644 --- a/smlar.h +++ b/smlar.h @@ -58,7 +58,7 @@ typedef struct SimpleArray { Datum *elems; double *df; /* frequency in current doc */ uint32 *hash; - int nelems; + int nelems; ProcTypeInfo info; } SimpleArray; @@ -80,19 +80,19 @@ int getSmlType(void); * GiST */ -#define SmlarOverlapStrategy 1 -#define SmlarSimilarityStrategy 2 +#define SmlarOverlapStrategy 1 +#define SmlarSimilarityStrategy 2 struct SmlSign; struct SmlSign* Array2HashedArray(ProcTypeInfo info, ArrayType *a); /* * Cache subsystem */ -void* SearchArrayCache( void *cache, MemoryContext ctx, Datum a, ArrayType **da, SimpleArray **sa, struct SmlSign **ss ); +void* SearchArrayCache( void *cache, MemoryContext ctx, Datum a, ArrayType **da, SimpleArray **sa, struct SmlSign **ss ); typedef struct StatElem { - Datum datum; - double idf; /* log(d/df) */ + Datum datum; + double idf; /* log(d/df) */ } StatElem; typedef struct HashedElem { @@ -107,13 +107,13 @@ typedef struct SignedElem { } SignedElem; typedef struct StatCache { - StatElem *elems; - int nelems; - int64_t ndoc; + StatElem *elems; + int nelems; + int64_t ndoc; HashedElem *helems; - int nhelems; + int nhelems; SignedElem *selems; - ProcTypeInfo info; + ProcTypeInfo info; } StatCache; StatCache *initStatCache(MemoryContext ctx);