NProblemInterface.hh 1.96 KB
Newer Older
David Bommes's avatar
David Bommes committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//=============================================================================
//
//  CLASS NProblemGmmInterface
//
//=============================================================================


#ifndef COMISO_NPROBLEMINTERFACE_HH
#define COMISO_NPROBLEMINTERFACE_HH


//== INCLUDES =================================================================

#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
#include <Eigen/Sparse>

David Bommes's avatar
David Bommes committed
17
18
#include <CoMISo/Config/CoMISoDefines.hh>

David Bommes's avatar
David Bommes committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//== FORWARDDECLARATIONS ======================================================

//== NAMESPACES ===============================================================

namespace COMISO {

//== CLASS DEFINITION =========================================================

	      

/** \class NProblemGmmInterface NProblemGmmInterface.hh <ACG/.../NPRoblemGmmInterface.hh>

    Brief Description.
  
    A more elaborate description follows.
*/
David Bommes's avatar
David Bommes committed
35
class COMISODLLEXPORT NProblemInterface
David Bommes's avatar
David Bommes committed
36
37
38
39
{
public:
  
  // Sparse Matrix Type
David Bommes's avatar
David Bommes committed
40
  typedef Eigen::DynamicSparseMatrix<double,Eigen::ColMajor> SMatrixNP;
David Bommes's avatar
David Bommes committed
41
42

  /// Default constructor
43
  NProblemInterface();
David Bommes's avatar
David Bommes committed
44
45
 
  /// Destructor
46
  virtual ~NProblemInterface();
David Bommes's avatar
David Bommes committed
47

David Bommes's avatar
David Bommes committed
48
  // problem definition
David Bommes's avatar
David Bommes committed
49
50
51
52
53
54
  virtual int    n_unknowns   (                                ) = 0;
  virtual void   initial_x    (       double* _x               ) = 0;
  virtual double eval_f       ( const double* _x               ) = 0;
  virtual void   eval_gradient( const double* _x, double*    _g) = 0;
  virtual void   eval_hessian ( const double* _x, SMatrixNP& _H) = 0;
  virtual void   store_result ( const double* _x               ) = 0;
David Bommes's avatar
David Bommes committed
55
56
57
58

  // advanced properties
  virtual bool   constant_hessian() { return false; }

David Bommes's avatar
David Bommes committed
59
60
61
62
63
64
65
66
67
};


//=============================================================================
} // namespace COMISO
//=============================================================================
#endif // COMISO_NPROBLEMGMMINTERFACE_HH defined
//=============================================================================