| 499 | bool piecewise_function::is_empty() const { return spans_.empty(); } |
| 500 | double piecewise_function::start() const { return start_; } |
| 501 | double piecewise_function::end() const { return start_ + length(); } |
| 502 | double piecewise_function::length() const { |
| 503 | return std::accumulate(spans_.begin(), spans_.end(), 0.0, [](const auto& v, const auto& s) { return v + s->length(); }); |
| 504 |