* use
* @return true for success
*/
- virtual bool check() const;
+ virtual bool check() const = 0;
+ bool baseCheck() const;
/**
* Checks if the first stat's name is alphabetically less than the second.
ScalarData(T &stat) : s(stat) {}
virtual bool binned() const { return s.binned(); }
+ virtual bool check() const { return s.check(); }
virtual result_t val() const { return s.val(); }
virtual result_t total() const { return s.total(); }
virtual void reset() { s.reset(); }
VectorData(T &stat) : s(stat) {}
virtual bool binned() const { return s.binned(); }
+ virtual bool check() const { return s.check(); }
virtual bool zero() const { return s.zero(); }
virtual void reset() { s.reset(); }
DistData(T &stat) : s(stat) {}
virtual bool binned() const { return s.binned(); }
+ virtual bool check() const { return s.check(); }
virtual void reset() { s.reset(); }
virtual bool zero() const { return s.zero(); }
virtual void update() { return s.update(this); }
VectorDistData(T &stat) : s(stat) {}
virtual bool binned() const { return T::bin_t::binned; }
+ virtual bool check() const { return s.check(); }
virtual void reset() { s.reset(); }
virtual size_t size() const { return s.size(); }
virtual bool zero() const { return s.zero(); }
Vector2dData(T &stat) : s(stat) {}
virtual bool binned() const { return T::bin_t::binned; }
+ virtual bool check() const { return s.check(); }
virtual void reset() { s.reset(); }
virtual bool zero() const { return s.zero(); }
virtual void update()
{
Vector2dDataBase::update();
- return s.update(this);
+ s.update(this);
}
};
*/
bool binned() const { return bin_t::binned; }
+ bool check() const { return bin.initialized(); }
+
/**
* Reset stat value to default
*/
return false;
}
- bool check() const { return true; }
+ bool check() const { return bin.initialized(); }
void reset() { bin.reset(); }
public:
void update(Vector2dDataBase *data)
{
- data->x = x;
- data->y = y;
int size = this->size();
data->vec.resize(size);
for (int i = 0; i < size; ++i)
*/
void reset() { bin.reset(); }
- bool check() { return true; }
+ bool check() { return bin.initialized(); }
};
template <typename T, template <typename T> class Storage, class Bin>
bin.reset();
}
- bool check() { return true; }
+ bool check() { return bin.initialized(); }
};
template <typename T, template <typename T> class Storage, class Bin>
*/
void reset() { bin.reset(); }
- bool check() { return true; }
+ bool check() { return bin.initialized(); }
void update(VectorDistDataBase *base)
{
int size = this->size();
{
public:
Vector2d &init(size_t _x, size_t _y) {
- x = _x;
- y = _y;
+ statData()->x = x = _x;
+ statData()->y = y = _y;
bin.init(x * y, params);
setInit();
*/
bool binned() const;
+ bool check() const { return true; }
+
/**
* Formulas don't need to be reset
*/