Commit dca250cd authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Updating scons scripts

parent 5c8b342d
......@@ -9,4 +9,5 @@ obtain.obtain('Eigen v3.2.1', 'eigen-eigen-ffa86ffb5570', 'http://bitbucket.org/
rep = 'build' + os.sep + 'include' + os.sep + 'Eigen'
if not os.path.exists(rep):
shutil.copytree('eigen-eigen-ffa86ffb5570' + os.sep + 'Eigen', rep)
shutil.copytree('eigen-eigen-ffa86ffb5570' + os.sep + 'unsupported', rep)
#end
......@@ -5,6 +5,7 @@ SConscript('data_interpolant/SConscript')
# Building fitters
SConscript('nonlinear_fitter_ceres/SConscript')
SConscript('nonlinear_fitter_eigen/SConscript')
SConscript('rational_fitter_eigen/SConscript')
SConscript('rational_fitter_quadprog/SConscript')
......
env = Environment()
env.Append(CPPPATH = ['../../../external/build/include', '../../'])
env.Append(LIBPATH = ['../../build'])
sources = ['fitter.cpp']
libs = ['-lcore']
env.SharedLibrary('../../build/nonlinear_fitter_eigen', sources, LIBS=libs)
......@@ -28,9 +28,14 @@ bool rational_fitter_eigen::fit_data(const data* dat, function* fit, const argum
{
rational_function* r = dynamic_cast<rational_function*>(fit) ;
const vertical_segment* d = dynamic_cast<const vertical_segment*>(dat) ;
if(r == NULL || d == NULL)
if(r == NULL)
{
std::cerr << "<<ERROR>> not passing the correct class to the fitter" << std::endl ;
std::cerr << "<<ERROR>> not passing the correct function object to the fitter" << std::endl ;
return false ;
}
if(d == NULL)
{
std::cerr << "<<ERROR>> not passing the correct data object to the fitter" << std::endl ;
return false ;
}
......
Markdown is supported
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