COPASI API  4.16.103
CTruncatedNewton.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/optimization/CTruncatedNewton.h,v $
3 // $Revision: 1.5 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2008/03/11 23:32:54 $
7 // End CVS Header
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 #ifndef COPASI_CTruncatedNewton
19 #define COPASI_CTruncatedNewton
20 
21 #include <limits>
22 
24  {
25  public:
26  virtual ~FTruncatedNewton(){};
27 
28  virtual C_INT operator()(C_INT * C_UNUSED(n), C_FLOAT64 * C_UNUSED(value),
29  C_FLOAT64 * C_UNUSED(value1), C_FLOAT64 * C_UNUSED(value2))
30  {return std::numeric_limits<C_INT>::quiet_NaN();}
31  };
32 
33 template <class CType> class FTruncatedNewtonTemplate : public FTruncatedNewton
34  {
35  private:
36  C_INT (CType::*mMethod)(C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *); // pointer to member function
37  CType * mpType; // pointer to object
38 
39  public:
40 
41  // constructor - takes pointer to an object and pointer to a member and stores
42  // them in two private variables
43  FTruncatedNewtonTemplate(CType * pType,
44  C_INT (CType::*method)(C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *))
45  {
46  mpType = pType;
47  mMethod = method;
48  };
49 
51 
52  // override operator "()"
53  virtual C_INT operator()(C_INT * n, C_FLOAT64 * value, C_FLOAT64 * value1, C_FLOAT64 * value2)
54  {return (*mpType.*mMethod)(n, value, value1, value2);} ; // execute member function
55  };
56 
57 union subscr_ {
58  struct
59  {
61  lhyk, lpk, lemat, lwtest;
62  }
63  _1;
64  struct
65  {
67  lhyk, lpk, lemat, lwtest;
68  }
69  _2;
70  struct
71  {
73  }
74  _3;
75  };
76 
78  {
79 
80  public:
81 
84 
85  int tnbc_(C_INT *,
86  C_INT *,
87  C_FLOAT64 *,
88  C_FLOAT64 *,
89  C_FLOAT64 *,
90  C_FLOAT64 *,
91  C_INT *,
92  FTruncatedNewton *, // Functor for function under investigation
93  C_FLOAT64 *,
94  C_FLOAT64 *,
95  C_INT *);
96 
97  int tn_(C_INT *,
98  C_INT *,
99  C_FLOAT64 *,
100  C_FLOAT64 *,
101  C_FLOAT64 *,
102  C_FLOAT64 *,
103  C_INT *,
104  FTruncatedNewton *);
105 
106  int getptc_(C_FLOAT64 *, C_FLOAT64 *,
114  C_INT *, C_INT *);
115 
120  C_FLOAT64 *, C_INT *, C_INT *, C_FLOAT64 *, C_INT *);
121 
122  int gtims_(C_FLOAT64 *v, C_FLOAT64 *gv, C_INT *n,
123  C_FLOAT64 *x, C_FLOAT64 *g, C_FLOAT64 *w, C_INT * /* lw */, FTruncatedNewton *sfun,
124  C_INT *first, C_FLOAT64 *delta, C_FLOAT64 *accrcy, C_FLOAT64 *
125  xnorm);
126 
127  int msolve_(C_FLOAT64 *,
128  C_FLOAT64 *, C_INT *, C_FLOAT64 *, C_INT *, C_INT *,
129  C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_INT *);
130 
131  int initpc_(C_FLOAT64 *, C_FLOAT64 *, C_INT *,
132  C_FLOAT64 *, C_INT *, C_INT *, C_INT *, C_FLOAT64 *,
133  C_FLOAT64 *, C_FLOAT64 *, C_INT *);
134 
135  int setucr_(C_FLOAT64 *, C_INT *, C_INT *,
138 
139  int setpar_(C_INT *);
140 
141  int modlnp_(C_INT *, C_FLOAT64 *, C_FLOAT64 *,
144  C_INT *, C_INT *, C_INT *, C_INT *, C_INT *, C_INT *,
145  C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *,
147  C_FLOAT64 *, C_FLOAT64 *);
148 
149  int lmqnbc_(C_INT *, C_INT *, C_FLOAT64 *,
151  C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_INT *, C_INT *,
153 
154  int lmqn_(C_INT *, C_INT *, C_FLOAT64 *,
156  C_INT *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *,
157  C_FLOAT64 *, C_FLOAT64 *);
158 
159  private:
161  };
162 
163 #endif // COAPSI_CTruncatedNewton
#define C_INT
Definition: copasi.h:115
int linder_(C_INT *, FTruncatedNewton *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_INT *, C_FLOAT64 *, C_INT *)
int getptc_(C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_INT *)
int initpc_(C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_FLOAT64 *, C_INT *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *)
#define C_UNUSED(p)
Definition: copasi.h:220
FTruncatedNewtonTemplate(CType *pType, C_INT(CType::*method)(C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *))
int modlnp_(C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_FLOAT64 *, C_INT *, C_INT *, C_INT *, C_INT *, C_INT *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, FTruncatedNewton *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *)
virtual ~FTruncatedNewton()
int tn_(C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, FTruncatedNewton *)
int setucr_(C_FLOAT64 *, C_INT *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, FTruncatedNewton *, C_FLOAT64 *, C_FLOAT64 *)
int lmqnbc_(C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, FTruncatedNewton *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_INT *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *)
int gtims_(C_FLOAT64 *v, C_FLOAT64 *gv, C_INT *n, C_FLOAT64 *x, C_FLOAT64 *g, C_FLOAT64 *w, C_INT *, FTruncatedNewton *sfun, C_INT *first, C_FLOAT64 *delta, C_FLOAT64 *accrcy, C_FLOAT64 *xnorm)
struct subscr_::@14 _3
C_INT lwtest
#define C_FLOAT64
Definition: copasi.h:92
C_INT ldiagb
C_INT(CType::* mMethod)(C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *)
virtual C_INT operator()(C_INT *n, C_FLOAT64 *value, C_FLOAT64 *value1, C_FLOAT64 *value2)
int lmqn_(C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, FTruncatedNewton *, C_INT *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *)
struct subscr_::@13 _2
virtual C_INT operator()(C_INT *C_UNUSED(n), C_FLOAT64 *C_UNUSED(value), C_FLOAT64 *C_UNUSED(value1), C_FLOAT64 *C_UNUSED(value2))
C_INT lsub[14]
struct subscr_::@12 _1
int msolve_(C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_FLOAT64 *, C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, C_INT *)
int tnbc_(C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_FLOAT64 *, C_INT *, FTruncatedNewton *, C_FLOAT64 *, C_FLOAT64 *, C_INT *)