Skip to content

Can not use different number of nodes for BicubicSplines #3

@Jean1995

Description

@Jean1995

It looks like the program crashes if I use different nodes for different dimensions.

For example, this code works:

auto def = cubic_splines::BicubicSplines<double>::Definition(); def.f = func; def.axis[0] = std::make_unique<cubic_splines::ExpAxis<double>>(1., 1e7, (size_t)10); def.axis[1] = std::make_unique<cubic_splines::LinAxis<double>>(0., 1, (size_t)10);

while this one crashes
auto def = cubic_splines::BicubicSplines<double>::Definition(); def.f = func; def.axis[0] = std::make_unique<cubic_splines::ExpAxis<double>>(1., 1e7, (size_t)10); def.axis[1] = std::make_unique<cubic_splines::LinAxis<double>>(0., 1, (size_t)20);

with the error message

Assertion failed: (row >= 0 && row < rows() && col >= 0 && col < cols()), function operator(), file /usr/local/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h, line 367.

I've been building CubicInterpolation in DEBUG mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions