-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwheat_data.cpp
More file actions
42 lines (36 loc) · 972 Bytes
/
wheat_data.cpp
File metadata and controls
42 lines (36 loc) · 972 Bytes
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
#include "plant_data.h"
#include <string>
#include <sstream>
#include "wheat_data.h"
wheat_data::wheat_data() {
this->plant_height = 0;
this->pot_width = 0;
this->p_h = 0.0;
this->p_h_t = 0.0;
this->pixelcount = 0.0;
this->leafArea = 0.0;
this->yellowcount = 0;
this->t20 = 0;
this->t20y = 0;
this->t40 = 0;
this->t40 = 0;
this->t60y = 0;
this->t60y = 0;
}
std::string wheat_data::to_string(std::string const separator) const {
std::stringstream ss;
ss << this->plant_height << separator <<
this->pot_width << separator <<
this->p_h << separator <<
this->p_h_t << separator <<
this->pixelcount << separator <<
this->leafArea << separator <<
this->yellowcount << separator <<
this->t20 << separator <<
this->t20y << separator <<
this->t40 << separator <<
this->t40y << separator <<
this->t60 << separator <<
this->t60y;
return ss.str();
}