-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariableOrder.h
More file actions
51 lines (39 loc) · 1.31 KB
/
variableOrder.h
File metadata and controls
51 lines (39 loc) · 1.31 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
46
47
48
49
50
51
#ifndef VARIABLEORDER_H
#define VARIABLEORDER_H
#include <pqxx/pqxx>
#include <vector>
#include <string>
typedef std::string variable;
typedef struct {
double avg;
double max;
} scaleFactors;
class ExtendedVariableOrder {
private:
variable m_name;
std::vector<variable> m_key;
std::vector<ExtendedVariableOrder> m_children;
const bool m_categorical;
public:
const variable& getName() const;
const std::vector<variable>& getKey() const;
const std::vector<ExtendedVariableOrder>& getChildren() const;
void findLeaves(std::vector<ExtendedVariableOrder*>& leaves);
bool isLeaf() const;
bool isCategorical() const;
void addChild(const ExtendedVariableOrder& child);
// void addKey(const variable& var)
// restrict access of convertName without allowing access to all members
class nameKey {
private:
nameKey(){};
friend std::vector<scaleFactors> scaleFeatures(const std::vector<std::string>& relevantColumns,
std::vector<ExtendedVariableOrder*>& leaves,
const std::string& con);
};
void convertName(nameKey);
~ExtendedVariableOrder();
ExtendedVariableOrder(const variable& name, const std::vector<variable>& key = {},
const bool categorical = false);
};
#endif