47 #ifndef QPOPT_CPP_DECL_H
48 #define QPOPT_CPP_DECL_H
52 namespace QPOPT_CppDecl {
57 using FortranTypes::f_int;
58 using FortranTypes::f_real;
59 using FortranTypes::f_dbl_prec;
60 using FortranTypes::f_logical;
68 typedef FORTRAN_FUNC_PTR_DECL_UL_(
void,QPHESS_FUNC,qphess_func) (
const f_int& N,
const f_int& LDH
69 ,
const f_int& JTHCOL,
const f_dbl_prec* HESS,
const f_dbl_prec* X, f_dbl_prec* HX
70 , f_int* IW,
const f_int& LENIW, f_dbl_prec* W,
const f_int& LENW );
74 const f_int& N,
const f_int& NCLIN
75 ,
const f_int& LDA,
const f_int& LDH,
const f_dbl_prec* A
76 ,
const f_dbl_prec* BL,
const f_dbl_prec* BU,
const f_dbl_prec* CVEC
77 ,
const f_dbl_prec* H, FORTRAN_NAME_UL_(QPHESS_FUNC,qphess_func) QPHESS, f_int* ISTATE, f_dbl_prec* X
78 ,f_int& INFORM, f_int& ITER, f_dbl_prec& OBJ, f_dbl_prec* AX
79 ,f_dbl_prec* CLAMDA, f_int* IW,
const f_int& LENIW, f_dbl_prec* W
87 enum EQPOPT_problem_type {
97 enum EQPOPT_int_option {
100 FEASIBILITY_PHASE_ITER_LIMIT = 3,
101 OPTIMALITY_PHASE_ITER_LIMIT = 4,
104 MAXIMUM_DEGREES_OF_FREEDOM = 7,
113 enum EQPOPT_logical_option {
120 enum EQPOPT_real_option {
122 FEASIBILITY_TOLERANCE = 2,
123 INFINITE_BOUND_SIZE = 3,
124 INFINITE_STEP_SIZE = 4,
125 OPTIMALITY_TOLERANCE = 5,
133 void reset_defaults();
136 void set_int_option(EQPOPT_int_option option,
const f_int&);
139 void set_logical_option(EQPOPT_logical_option option,
const f_logical&);
142 void set_real_option(EQPOPT_real_option option,
const f_dbl_prec&);
150 FORTRAN_FUNC_DECL_UL(
void,QPOPT,qpopt) (
const f_int& N,
const f_int& NCLIN
151 ,
const f_int& LDA,
const f_int& LDH,
const f_dbl_prec* A
152 ,
const f_dbl_prec* BL,
const f_dbl_prec* BU,
const f_dbl_prec* CVEC
153 ,
const f_dbl_prec* H, FORTRAN_NAME_UL_(QPHESS_FUNC,qphess_func) QPHESS, f_int* ISTATE, f_dbl_prec* X
154 , f_int& INFORM, f_int& ITER, f_dbl_prec& OBJ, f_dbl_prec* AX
155 , f_dbl_prec* CLAMDA, f_int* IW, const f_int& LENIW, f_dbl_prec* W
156 , const f_int& LENW );
158 FORTRAN_FUNC_DECL_UL(
void,QPHESS,qphess) ( const f_int& N, const f_int& LDH
159 , const f_int& JTHCOL, const f_dbl_prec* H, const f_dbl_prec* X, f_dbl_prec* HX
160 , f_int* IW, const f_int& LENIW, f_dbl_prec* W, const f_int& LENW );
162 FORTRAN_FUNC_DECL_UL_(
void,QPOPT_SET_DEFAULTS,qpopt_set_defaults) ();
164 FORTRAN_FUNC_DECL_UL_(
void,QPOPT_INT_OPT,qpopt_int_opt) (const f_int& option, const f_int& );
166 FORTRAN_FUNC_DECL_UL_(
void,QPOPT_LOG_OPT,qpopt_log_opt) (const f_int& option, const f_logical& );
168 FORTRAN_FUNC_DECL_UL_(
void,QPOPT_REAL_OPT,qpopt_real_opt) (const f_int& option, const f_dbl_prec& );
177 void qpopt( const f_int& N, const f_int& NCLIN
178 , const f_int& LDA, const f_int& LDH, const f_dbl_prec* A
179 , const f_dbl_prec* BL, const f_dbl_prec* BU, const f_dbl_prec* CVEC
180 , const f_dbl_prec* H, FORTRAN_NAME_UL_(QPHESS_FUNC,qphess_func) QPHESS, f_int* ISTATE, f_dbl_prec* X
181 , f_int& INFORM, f_int& ITER, f_dbl_prec& OBJ, f_dbl_prec* AX
182 , f_dbl_prec* CLAMDA, f_int* IW, const f_int& LENIW, f_dbl_prec* W
183 , const f_int& LENW )
185 Fortran::FORTRAN_FUNC_CALL_UL(QPOPT,qpopt) ( N, NCLIN, LDA, LDH, A, BL, BU, CVEC, H, QPHESS
186 , ISTATE, X, INFORM, ITER, OBJ, AX, CLAMDA, IW, LENIW, W, LENW );
190 void reset_defaults()
191 { Fortran::FORTRAN_FUNC_CALL_UL_(QPOPT_SET_DEFAULTS,qpopt_set_defaults) (); }
194 void set_int_option(EQPOPT_int_option option,
const f_int& val)
195 { Fortran::FORTRAN_FUNC_CALL_UL_(QPOPT_INT_OPT,qpopt_int_opt) ( option, val ); }
198 void set_logical_option(EQPOPT_logical_option option,
const f_logical& val)
199 { Fortran::FORTRAN_FUNC_CALL_UL_(QPOPT_LOG_OPT,qpopt_log_opt) ( option, val ); }
202 void set_real_option(EQPOPT_real_option option,
const f_dbl_prec& val)
203 { Fortran::FORTRAN_FUNC_CALL_UL_(QPOPT_REAL_OPT,qpopt_real_opt) ( option, val ); }
209 #endif // QPOPT_CPP_DECL_H