-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCell.h
58 lines (43 loc) · 965 Bytes
/
Cell.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
//---------------------------------------------------------------------------
#ifndef CellH
#define CellH
#include <list>
//---------------------------------------------------------------------------
const double Pi = 3.14159265358979323846;
class CTree;
class CCell
{
public:
int X;
int Y;
//int nTreesOverlap; //number of trees overlapping the cell
//double ProbRecruit;
std::list<CTree*> TreeList; //list of trees with STEM in the cell
CCell(){
X = 0;
Y = 0;
//nTreesOverlap = 0;
//ProbRecruit = 0;
};
~CCell() {TreeList.clear();};
void InitCell(int x, int y)
{
X=x;
Y=y;
//nTreesOverlap = 0;
//ProbRecruit = 0;
TreeList.clear();
};
/*
double GetProbRecruit(double a)
{
if (nTreesOverlap == 0)
return(1.0);
else
return (1.0 - nTreesOverlap/(a + nTreesOverlap));
};
*/
};
typedef std::list<CCell*>::iterator CellIterL;
//---------------------------------------------------------------------------
#endif