-
Notifications
You must be signed in to change notification settings - Fork 2
/
Parameter.h
98 lines (67 loc) · 1.93 KB
/
Parameter.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef PARA_H
#define PARA_H
#include <fstream>
#include <string.h>
#include "Random.h"
#define METHOD "METHOD"
#define SOMA_DIAMETER "SOMADIAM"
#define MAX_TYPE "MAX_TYPE"
#define NUM_TREE "NUM_TREE"
#define CONSLENGTH "CONSLENGTH"
#define TREE_AZY "TREEAZIM"
#define TREE_ELEV "TREEELEV"
#define INIT_DIAM "INITDIAM"
#define CONSLENGTH "CONSLENGTH"
#define TAPER "TAPER"
#define THRESHOLD "THRESHOLD"
#define BIFRATIO "BIFRATIO"
#define BIFORIENT "BIFORIENT"
#define BIFPOWER "BIFPOWER"
#define BIFAMPLI "BIFAMPLI"
#define TERMLENGTH "TERMLENGTH"
#define PK "PK"
#define FRAGMENTATION "FRAGMENTATION"
#define CONTRACTION "CONTRACTION"
using namespace std;
//BURKE
#define LENGTH "LENGTH"
#define K1_OVERLAP "K1_OVERLAP"
#define K2_OVERLAP "K2_OVERLAP"
#define K1_NONOVERLAP "K1_NONOVERLAP"
#define K2_NONOVERLAP "K2_NONOVERLAP"
#define K1_TERMINATE "K1_TERMINATE"
#define K2_TERMINATE "K2_TERMINATE"
#define GAUSS_BRANCH "GAUSS_BRANCH"
#define LINEAR_BRANCH "LINEAR_BRANCH"
#define EXTEND_AZIMUTH "EXE_AZI"
#define EXTEND_ELE "EXE_ELE"
char *strlwr( char *string);
//add always a parameter called BOOLEAN return random between 0 and 1;
class Parameter{
int type;
Random * rnd;
char name[20],distr[20];
double val[20];
int nextValue;
double percent;
Parameter * nextPar;
public:
Parameter(){rnd=new Random();nextValue=0;nextPar=NULL;percent=0;};
void setName(char *parName){
strcpy(name,parName);
strlwr(name);
};
char * getName(){return name;};
void setNext(Parameter * p){ nextPar=p;};
Parameter * getNext(){return nextPar;};
void setType(int i){type=i;}
int getType(){return type;}
void setPercent(double p){percent=p;}
double getPercent(){return percent;}
void addValue(double value);
double getValue();
void setDist(char *dist){strcpy(distr, dist); };
char * getDist(){return distr;};
}
;
#endif