/ani/mrses

To get this branch, use:
bzr branch http://de.suren.me/webbzr/ani/mrses
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef _MRSES_H
#define _MRSES_H

#include <stdint.h>

#define MRSESDataType float
#define MRSESIntType uint16_t

enum MRSESDistanceT {
    BHATTACHARYYA,
    MAHALANOBIS,
    CORCOR,
    MRSES_DISTANCE_LAST
};
typedef enum MRSESDistanceT MRSESDistance;
typedef struct MRSESContextT *MRSESContext;

MRSESContext mrses_create_context();
int mrses_init_context(MRSESContext ctx, int properties, int nA, const MRSESDataType *A, int nB, const MRSESDataType *B);
int mrses_init_context_from_double(MRSESContext ctx, int properties, int nA, const double *A, int nB, const double *B);
int mrses_set_distance_mode(MRSESContext ctx, MRSESDistance dist);
void mrses_free_context(MRSESContext ctx);
void mrses_destroy_context(MRSESContext ctx);

int mrses_prepare(MRSESContext ctx, int width, int block_size);

    /* indexes are from 1, to be compatible with Matlab/Octave */
int mrses_compute(MRSESContext ctx, int block_size, MRSESIntType *index, MRSESDataType *res);

int mrses_iterate(MRSESContext ctx, int iterations, int block_size, MRSESIntType *ires);
int mrses_get_results(MRSESContext ctx, uint32_t *hist);

#endif /* _MRSES_H */