inmost_nonlinear.h 981 Bytes
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1 2 3 4
#ifndef INMOST_NONLINEAR_INCLUDED
#define INMOST_NONLINEAR_INCLUDED

#include "inmost_common.h"
5
#include "inmost_autodiff.h"
Kirill Terekhov's avatar
Kirill Terekhov committed
6 7 8 9

#if defined(USE_NONLINEAR)
namespace INMOST
{
10 11 12 13 14 15 16 17 18 19
	
	typedef INMOST_DATA_BULK_TYPE RequestedAction;
	
	static const RequestedAction COMPUTE_FUNCTION = 0x01;
	static const RequestedAction COMPUTE_JACOBIAN = 0x02;
	static const RequestedAction COMPUTE_HESSIAN  = 0x04;
	static const RequestedAction FINISHED         = 0x08;
	
	class NonlinearSolver
	{
20
		//Automatizator & aut;
21
	public:
22 23 24 25
		//NonlinearSolver(Automatizator & aut) : aut(aut) {}
		NonlinearSolver() {}
		NonlinearSolver(const NonlinearSolver & b) /*: aut(b.aut)*/ {}
		NonlinearSolver & operator =(NonlinearSolver const & b) {/*aut = b.aut;*/ return *this;}
26 27 28 29 30 31 32 33
		~NonlinearSolver() {}
		
		RequestedAction GetAction() const;
		INMOST_DATA_REAL_TYPE GetResidual() const;
		INMOST_DATA_ENUM_TYPE GetIterations() const;
		std::string GetReason() const;
	};
	
Kirill Terekhov's avatar
Kirill Terekhov committed
34 35 36
};
#endif

37
#endif //INMOST_NONLINEAR_INCLUDED