-
Notifications
You must be signed in to change notification settings - Fork 1
/
FungusStatistic.java
29 lines (26 loc) · 1.05 KB
/
FungusStatistic.java
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
public class FungusStatistic {
public int fungusId;
//Basic value is the attributes of the fungi at 22deg, no humidity change.
public double basicV;// Basic value of horizontal spreading speed
public double basicX;// Basic value of Hyphal extention rate
public double basicB;// Basic value of decomponent mass per unit area
public double mTradeOff;// Moisture trade-off of this species
public int totalCells = 0;
public double totalDecom = 0;
private boolean basic = false;
public void record(Fungus f){
if(this.basic == false){
this.fungusId = f.fungusId;
this.basicV = f.basicV;
this.basicX = f.basicX;
this.basicB = f.basicB;
this.mTradeOff = f.mTradeOff;
}
this.totalCells++;
this.totalDecom += f.decomp;
}
public String toString(){
return String.format("%d,%e,%e,%e,%e,%d,%e", this.fungusId, this.basicV, this.basicX, this.basicB, this.mTradeOff,
this.totalCells, this.totalDecom);
}
}