/ani/mrses

To get this branch, use:
bzr branch http://suren.me/webbzr/ani/mrses
1 by Suren A. Chilingaryan
Initial import
1
#ifndef _MRSES_H
2
#define _MRSES_H
3
4
#include <stdint.h>
5
6
#define MRSESDataType float
7
#define MRSESIntType uint16_t
8
9
enum MRSESDistanceT {
10
    BHATTACHARYYA,
11
    MAHALANOBIS,
12
    CORCOR,
13
    MRSES_DISTANCE_LAST
14
};
15
typedef enum MRSESDistanceT MRSESDistance;
16
typedef struct MRSESContextT *MRSESContext;
17
18
MRSESContext mrses_create_context();
19
int mrses_init_context(MRSESContext ctx, int properties, int nA, const MRSESDataType *A, int nB, const MRSESDataType *B);
20
int mrses_init_context_from_double(MRSESContext ctx, int properties, int nA, const double *A, int nB, const double *B);
21
int mrses_set_distance_mode(MRSESContext ctx, MRSESDistance dist);
22
void mrses_free_context(MRSESContext ctx);
23
void mrses_destroy_context(MRSESContext ctx);
24
25
int mrses_prepare(MRSESContext ctx, int width, int block_size);
26
27
    /* indexes are from 1, to be compatible with Matlab/Octave */
28
int mrses_compute(MRSESContext ctx, int block_size, MRSESIntType *index, MRSESDataType *res);
29
30
int mrses_iterate(MRSESContext ctx, int iterations, int block_size, MRSESIntType *ires);
31
int mrses_get_results(MRSESContext ctx, uint32_t *hist);
32
33
#endif /* _MRSES_H */