return vresult;
}
- Result total() const {
- Op op;
- return op(l->total());
+ Result total() const
+ {
+ const VResult &vec = this->result();
+ Result total = 0;
+ for (int i = 0; i < size(); i++)
+ total += vec[i];
+ return total;
}
virtual size_t size() const { return l->size(); }
return vresult;
}
- Result total() const {
- Op op;
- return op(l->total(), r->total());
+ Result total() const
+ {
+ const VResult &vec = this->result();
+ Result total = 0;
+ for (int i = 0; i < size(); i++)
+ total += vec[i];
+ return total;
}
virtual size_t size() const {