/
Utils.h
51 lines (44 loc) · 1.11 KB
/
Utils.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//============================================================================
// Name : Utils.h
// Author : Jordan Frank (jordan.frank@cs.mcgill.ca)
// Copyright : MIT
// Description : Some helpful utility methods.
//============================================================================
#include <stdlib.h>
#include <ANN/ANN.h>
#include <opencv/cxcore.h>
#ifndef ulong
#define ulong unsigned long
#endif
#ifndef uint
#define uint unsigned int
#endif
#ifndef UTILS_H_
#define UTILS_H_
typedef struct {
unsigned long length;
unsigned long exclude;
uint verbosity;
int delay;
uint neighbours;
uint seglength;
uint indim;
uint embdim;
uint pcaembdim;
char *column;
char *infile;
char *outfile;
char dimset;
char embset;
char pcaembset;
char delayset;
char stdo;
uint algorithm;
} Settings;
void get_embedding(Settings* settings, ANNcoord*& data, unsigned long &length);
void get_ann_points(ANNpointArray &dataPts, ANNcoord* series, unsigned long rows, uint cols);
void print_matrix(CvMat* matrix);
#define MAT_TYPE CV_32FC1
#define FLOAT_SCAN "%G"
#define FLOAT_OUT "%.8G"
#endif /* UTILS_H_ */