forked from MichaelStromberg-KTH/Forage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDualCodebook.h
More file actions
45 lines (44 loc) · 1.61 KB
/
Copy pathDualCodebook.h
File metadata and controls
45 lines (44 loc) · 1.61 KB
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
#include <fstream>
#include <limits.h>
#include <float.h>
#include <cstring>
#include "RuntimeParameters.h"
using namespace std;
class CDualCodebook {
public:
static void LoadCodebooks(void);
static void Dispose(void);
// checks the classification of the specified point and returns true if quorum is reached
static bool IsSNP(double* points);
private:
// OBD codebook data points
static double** m_obd_points;
// LVQ3 codebook data points
static double** m_lvq3_points;
// OBD vector classifications
static unsigned char* m_obd_classifications;
// LVQ3 vector classifications
static unsigned char* m_lvq3_classifications;
// number of entries in the OBD codebook
static unsigned int m_obd_numEntries;
// number of entries in the LVQ3 codebook
static unsigned int m_lvq3_numEntries;
// descriptors for each class present in the codebooks
static const char* m_classDescriptors;
// identification strings for each OBD vector
static char** m_obd_names;
// identification strings for each LVQ3 vector
static char** m_lvq3_names;
// the number of dimensions present in each codebook vector
static unsigned char m_numDimensions;
// loads the OBD codebook from file
static void LoadObdCodebook(const char* filename);
// loads the LVQ3 codebook from file
static void LoadLvq3Codebook(const char* filename);
// converts a character array to a little-endian double
static double GetDouble(char* buffer);
// converts a character array to a little-endian unsigned integer
static unsigned int GetUnsignedInt(char* buffer);
// converts a UTF string to an ANSI string
static void GetAnsiString(char* buffer, char* c, int len);
};