summaryrefslogtreecommitdiff
path: root/mbest.h
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2025-08-15 12:42:40 +0200
committererdgeist <erdgeist@erdgeist.org>2025-08-15 12:42:40 +0200
commit30325d24d107dbf133da39f7c96d1510fd1c9449 (patch)
tree932baa5b2a4475821f16dccf9e3e05011daa6d92 /mbest.h
parent9022d768021bbe15c7815cc6f8b64218b46f0e10 (diff)
Bump to codec2 version 1.2.0erdgeist-bump-to-1.2.0
Diffstat (limited to 'mbest.h')
-rw-r--r--mbest.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/mbest.h b/mbest.h
index fb7664f..2851fb9 100644
--- a/mbest.h
+++ b/mbest.h
@@ -33,27 +33,24 @@
33#define MBEST_STAGES 4 33#define MBEST_STAGES 4
34 34
35struct MBEST_LIST { 35struct MBEST_LIST {
36 int index[MBEST_STAGES]; /* index of each stage that lead us to this error */ 36 int index[MBEST_STAGES]; /* index of each stage that lead us to this error */
37 float error; 37 float error;
38}; 38};
39 39
40struct MBEST { 40struct MBEST {
41 int entries; /* number of entries in mbest list */ 41 int entries; /* number of entries in mbest list */
42 struct MBEST_LIST *list; 42 struct MBEST_LIST *list;
43}; 43};
44 44
45struct MBEST *mbest_create(int entries); 45struct MBEST *mbest_create(int entries);
46void mbest_destroy(struct MBEST *mbest); 46void mbest_destroy(struct MBEST *mbest);
47void mbest_precompute_weight(float cb[], float w[], int k, int m);
47void mbest_insert(struct MBEST *mbest, int index[], float error); 48void mbest_insert(struct MBEST *mbest, int index[], float error);
48void mbest_search(const float *cb, float vec[], float w[], int k, int m, struct MBEST *mbest, int index[]); 49void mbest_search(const float *cb, float vec[], int k, int m,
49void mbest_search450(const float *cb, float vec[], float w[], int k,int shorterK, int m, struct MBEST *mbest, int index[]); 50 struct MBEST *mbest, int index[]);
50 51void mbest_search450(const float *cb, float vec[], float w[], int k,
51// #define MBEST_PRINT_OUT 52 int shorterK, int m, struct MBEST *mbest, int index[]);
52#ifdef MBEST_PRINT_OUT
53 #define MBEST_PRINT(a,b) mbest_print((a),(b))
54#else
55 #define MBEST_PRINT(a,b)
56#endif
57 53
54void mbest_print(char title[], struct MBEST *mbest);
58 55
59#endif 56#endif