1 #ifndef tstfcn_h
2 #define tstfcn_h
3 
4 /*
5  *
6  * Declarations for TWAFER
7  */
8 
9 /* Initializer for TWAFER */
10 
11 void init_twaf(int n, NEWMAT::ColumnVector& x);
12 
13 /* TWAFER with no analytic derivative */
14 
15 void twaf(int n, const NEWMAT::ColumnVector& x, double& fx, int& result);
16 
17 /*
18  *
19  * Declarations for rosenbrock's functions
20  */
21 
22 /* Initializer for Rosenbrock */
23 
24 void init_rosen(int n, NEWMAT::ColumnVector& x);
25 
26 /* Rosenbrock with no analytic derivative */
27 
28 void rosen0(int n, const NEWMAT::ColumnVector& x, double& fx, int& result);
29 
30 /* Rosenbrock with analytic derivative */
31 void rosen(int mode, int n, const NEWMAT::ColumnVector& x, double& fx, NEWMAT::ColumnVector& g,
32 	   int& result);
33 
34 /* Rosenbrock with analytic derivative and Hessian*/
35 
36 void rosen2(int mode, int n, const NEWMAT::ColumnVector& x, double& fx,
37 	    NEWMAT::ColumnVector& g, NEWMAT::SymmetricMatrix& H, int& result);
38 
39 /* Scaled version of Rosenbrock with analytic derivative */
40 void srosen(int mode, int n, const NEWMAT::ColumnVector& x, double& fx,
41 	    NEWMAT::ColumnVector& g, int& result);
42 
43 /* Scaled version of Rosenbrock with analytic derivative and Hessian*/
44 
45 void srosen2(int mode, int n, const NEWMAT::ColumnVector& x, double& fx,
46 	     NEWMAT::ColumnVector& g, NEWMAT::SymmetricMatrix& H, int& result);
47 
48 void   init_illum(int n, NEWMAT::ColumnVector& x);
49 
50 void   illum(int, int, const NEWMAT::ColumnVector&, double&, NEWMAT::ColumnVector&, int&);
51 
52 void   illum2(int mode, int n, const NEWMAT::ColumnVector& x, double& fx,
53 	      NEWMAT::ColumnVector& g, NEWMAT::SymmetricMatrix& H, int& result);
54 
55 void init_erosen (int ndim, NEWMAT::ColumnVector& x);
56 void erosen(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
57 void erosen1(int mode, int ndim, const NEWMAT::ColumnVector& x, double& fx,
58 	     NEWMAT::ColumnVector&, int& result);
59 
60 void init_penalty1 (int ndim, NEWMAT::ColumnVector& x);
61 void penalty1(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
62 
63 void init_penalty2 (int ndim, NEWMAT::ColumnVector& x);
64 void penalty2(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
65 
66 void init_epowell (int ndim, NEWMAT::ColumnVector& x);
67 void epowell(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
68 
69 void init_trig (int ndim, NEWMAT::ColumnVector& x);
70 void trig(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
71 void trig_as_a_constraint(int ndim, const NEWMAT::ColumnVector& x,
72 		NEWMAT::ColumnVector& fx, int& result);
73 
74 void init_gen_brown (int ndim, NEWMAT::ColumnVector& x);
75 void gen_brown(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
76 
77 void init_vardim (int ndim, NEWMAT::ColumnVector& x);
78 void vardim(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
79 
80 void init_chain_singular (int ndim, NEWMAT::ColumnVector& x);
81 void chain_singular(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
82 
83 void init_gen_wood (int ndim, NEWMAT::ColumnVector& x);
84 void gen_wood(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
85 
86 void init_chain_wood (int ndim, NEWMAT::ColumnVector& x);
87 void chain_wood(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
88 
89 void init_broyden (int ndim, NEWMAT::ColumnVector& x);
90 void broyden_tridiag(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
91 void broyden1a(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
92 void broyden1b(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
93 void broyden2a(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
94 void broyden2b(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
95 void tointbroy(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
96 
97 void init_gen_cragg_levy (int ndim, NEWMAT::ColumnVector& x);
98 void gen_cragg_levy(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
99 
100 void init_toint_trig (int ndim, NEWMAT::ColumnVector& x);
101 void toint_trig(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
102 
103 void init_chebyquad (int ndim, NEWMAT::ColumnVector& x);
104 void chebyquad(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
105 
106 void init_nelder (int ndim, NEWMAT::ColumnVector& x);
107 void nelder(int ndim, const NEWMAT::ColumnVector& x, double& fx, int& result);
108 
109 
110 #endif
111