diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2025-08-15 12:42:40 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2025-08-15 12:42:40 +0200 |
| commit | 30325d24d107dbf133da39f7c96d1510fd1c9449 (patch) | |
| tree | 932baa5b2a4475821f16dccf9e3e05011daa6d92 /mbest.h | |
| parent | 9022d768021bbe15c7815cc6f8b64218b46f0e10 (diff) | |
Bump to codec2 version 1.2.0erdgeist-bump-to-1.2.0
Diffstat (limited to 'mbest.h')
| -rw-r--r-- | mbest.h | 23 |
1 files changed, 10 insertions, 13 deletions
| @@ -33,27 +33,24 @@ | |||
| 33 | #define MBEST_STAGES 4 | 33 | #define MBEST_STAGES 4 |
| 34 | 34 | ||
| 35 | struct MBEST_LIST { | 35 | struct 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 | ||
| 40 | struct MBEST { | 40 | struct 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 | ||
| 45 | struct MBEST *mbest_create(int entries); | 45 | struct MBEST *mbest_create(int entries); |
| 46 | void mbest_destroy(struct MBEST *mbest); | 46 | void mbest_destroy(struct MBEST *mbest); |
| 47 | void mbest_precompute_weight(float cb[], float w[], int k, int m); | ||
| 47 | void mbest_insert(struct MBEST *mbest, int index[], float error); | 48 | void mbest_insert(struct MBEST *mbest, int index[], float error); |
| 48 | void mbest_search(const float *cb, float vec[], float w[], int k, int m, struct MBEST *mbest, int index[]); | 49 | void mbest_search(const float *cb, float vec[], int k, int m, |
| 49 | void 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 | 51 | void 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 | ||
| 54 | void mbest_print(char title[], struct MBEST *mbest); | ||
| 58 | 55 | ||
| 59 | #endif | 56 | #endif |
