69 |
|
}; |
70 |
|
|
71 |
|
Stats(); |
72 |
< |
const double& operator [](StatsIndex index) const { |
73 |
< |
return data_[static_cast<int>(index)]; |
72 |
> |
const double& operator [](int index) const { |
73 |
> |
assert(index >=0 && index < ENDINDEX); |
74 |
> |
return data_[index]; |
75 |
|
} |
76 |
|
|
77 |
< |
double& operator [](StatsIndex index){ |
78 |
< |
return data_[static_cast<int>(index)]; |
77 |
> |
double& operator [](int index){ |
78 |
> |
assert(index >=0 && index < ENDINDEX); |
79 |
> |
return data_[index]; |
80 |
|
} |
81 |
|
|
82 |
< |
static std::string getTitle(StatsIndex index) { |
83 |
< |
return title_[static_cast<int>(index)]; |
82 |
> |
static std::string getTitle(int index) { |
83 |
> |
assert(index >=0 && index < ENDINDEX); |
84 |
> |
return title_[index]; |
85 |
|
} |
86 |
|
|
87 |
< |
static std::string getUnits(StatsIndex index) { |
88 |
< |
return units_[static_cast<int>(index)]; |
87 |
> |
static std::string getUnits(int index) { |
88 |
> |
assert(index >=0 && index < ENDINDEX); |
89 |
> |
return units_[index]; |
90 |
|
} |
91 |
|
|
92 |
|
Mat3x3d getTau() { |