Commit a23766d9 authored by Timo Koch's avatar Timo Koch
Browse files

[common][spline] Move assert checking requirements to updatePoints

parent 2de0b751
......@@ -64,11 +64,6 @@ public:
*/
MonotoneCubicSpline(const std::vector<Scalar>& x, const std::vector<Scalar>& y)
{
// check some requirements
assert (x.size() == y.size());
assert (x.size() >=2);
assert (std::is_sorted(x.begin(), x.end()));
updatePoints(x, y);
}
......@@ -79,6 +74,11 @@ public:
*/
void updatePoints(const std::vector<Scalar>& x, const std::vector<Scalar>& y)
{
// check some requirements
assert (x.size() == y.size());
assert (x.size() >=2);
assert (std::is_sorted(x.begin(), x.end()));
// save a copy of the control points
x_ = x;
y_ = y;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment