Closed LiJiangnanBit closed 5 years ago
On 4 Jan 2019, at 03:30, Li Jiangnan notifications@github.com wrote:
If I uncomment the line
define SPLINES_DO_NOT_USE_GENERIC_CONTAINER 1
There will be a runtime_error when running the codes on README
terminate called after throwing an instance of 'std::runtime_error' what(): In spline: CubicSpline line: 506 file: src/Splines.hh search(1.1) empty spline Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
Compiled with clang++ and g++ (version 8) I have no problem.
I suppose that you have compiled the library with
commented and then linked with your code compiled with
commented. This cannoet be done. In the new version I added a file SplineConfig.hh to be more clear. If you change SplineConfig.hh you must recompile the library.
regards,
Here's my code
include
# include "Splines.hh" using namespace SplinesLoad ; using namespace std; int main () { CubicSpline spline ;
spline .
pushBack( 1, 3 ) ; spline . pushBack( 2, 1 ) ; spline . pushBack( 3, 1 ) ; spline . pushBack( 4, 3 ) ; spline . build () ;
cout <<
spline(1.1) << '\n'; // spline at x = 1.1
cout << spline.
D(1.1) << '\n'; // spline first derivative at x = 1.1
cout << spline.
DD(1.1) << '\n'; // spline second derivative at x = 1.1
cout << spline.
DDD(1.1) << '\n'; // spline third derivative at x = 1.1
return 0 ; }
It works fine if the line is kept commented.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Enrico Bertolazzi
Dipartimento di Ingegneria Industriale
Università degli Studi di Trento
http://www.ing.unitn.it/~bertolaz
If I uncomment the line
There will be a runtime_error when running the codes on README
Here's my code
It works fine if the line is kept commented.