fitter.h 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#pragma once

// Include STL
#include <vector>
#include <string>

// Interface
#include <core/function.h>
#include <core/data.h>
#include <core/fitter.h>
#include <core/args.h>

/*! \brief A non-linear fitter using the COIN-OR IpOpt solver
 *  \ingroup plugins
 *
 *  \details
 *  <h3>Third party requirements</h3>
 *  
 *  You will need three external libraries to compile this plugin:
 *  <ul>
 *		<li><a href="http://www.coin-or.org/Ipopt/">IpOpt</a> library, 
 *		version 3.11.3 and all its dependancies</li>
 *  </ul>
 *
 *  You need to provide your own ipopt.prf file for qmake to generate the correct
 *  Makefile or Visual Studio solution. In particular this configuration file
 *  should provide:
 *
 *  <pre>
 *  INCLUDEPATH += [path-to-ipopt-include]
31 32
 *  LIBS += -L[path-to-ipopt-lib] -lipopt -lipoptamplinterface 
 *  -lcoinmumps -lcoinmetis -lcoinlapack -lcoinblas -lcoinasl 
33 34 35 36
 *  </pre>
 *
 *
 *  <h3>Plugin parameters</h3>
37 38 39 40 41 42 43 44 45
 *  <ul>
 *		<li><b>--ipopt-max-iter</b> <em>[int]</em> to control the number
 *		of iterations the non linear solver will take before returning a 
 *		solution. <em>Note that this solution might incorrect.</em></li>
 *		<li><b>--ceres-solverr</b> <em>[string]</em> to control the type 
 *		linear solver that will be used during matrix operations. See
 *		<a href="http://www.coin-or.org/Ipopt/documentation/node50.html">
 *		here</a> for the list of possible choices.</li>
 *  </ul>
46 47 48 49 50 51 52 53 54 55 56
 *
 */
class nonlinear_fitter_ipopt: public fitter
{
	public: // methods

		nonlinear_fitter_ipopt() ;
		virtual ~nonlinear_fitter_ipopt() ;

		// Fitting a data object
		//
57
		virtual bool fit_data(const ptr<data>& d, ptr<function>& fit, const arguments& args) ;
58 59 60 61 62 63 64 65 66 67 68

		// Provide user parameters to the fitter
		//
		virtual void set_parameters(const arguments& args) ;

	protected: // function


	protected: // data
} ;