amplCon Class Reference
Class for an AMPL-constraints-function.
More...
#include <ampl.h>
List of all members.
Public Member Functions |
| amplCon (int connr_, int dim_=0, Pointer< SparsityInfo > sparsity_=NULL, Pointer< ostream > out_func_p_=out_out_p, Pointer< ostream > out_func_log_p_=out_log_p) |
| Constructor for the number of the constraint and the dimension of the function.
|
double | eval (const UserVector< double > &x) const |
| Evaluates a constraint for a UserVector<double>.
|
void | grad (dvector &g, const dvector &x) const |
| Computes the gradient of a constraint for a dvector.
|
void | grad (UserVector< double > &g, const UserVector< double > &x) const |
| Computes the (sub)gradient for a UserVector<double>.
|
void | HessMult (dvector &y, const dvector &x, const dvector &z) const |
| Computes the product of a Hessian and a dvector.
|
void | HessMult (UserVector< double > &y, const UserVector< double > &x, const UserVector< double > &z) const |
| Evaluates the product of the Hessian and a UserVector<double>.
|
void | set_curvature (CurvatureType ct) |
CurvatureType | get_curvature () const |
void | print (ostream &out) const |
| Prints some information about this function.
|
Private Attributes |
fint | connr |
| The number of the constraint, this function represents.
|
Pointer< real > | con_select |
| Array for Hessain-Multiplication, to select the constraint, which Hessian should be computed.
|
Func::CurvatureType | curv_type |
Detailed Description
Class for an AMPL-constraints-function.
Definition at line 169 of file ampl.h.
Constructor & Destructor Documentation
Constructor for the number of the constraint and the dimension of the function.
- Parameters:
-
| connr_ | The number of the constraint, this function represents. |
| dim_ | The dimension. |
| conv_ | Indicates, whether the function is convex, default is false. |
| out_func_p_ | An ostream to print function-related output to, default is out_out_p. |
| out_func_log_p_ | An ostream to print function-related logging-output to, default is out_func_p. |
- See also:
- amplCon(int)
Definition at line 189 of file ampl.h.
Member Function Documentation
double amplCon::eval |
( |
const UserVector< double > & |
x |
) |
const [inline, virtual] |
Evaluates a constraint for a UserVector<double>.
Calls conival(connr, ...) from the AMPL/Solver Interface Library (ASL).
- Parameters:
-
- Returns:
- The value of the connr-th constraint.
Implements Func.
Definition at line 201 of file ampl.h.
Computes the gradient of a constraint for a dvector.
Calls congrd(connr, ...) from the AMPL/Solver Interface Library (ASL).
- Parameters:
-
| g | The dvector to store the connr-th gradient in. |
| x | The dvector to compute the gradient for. |
Definition at line 220 of file ampl.h.
void amplCon::grad |
( |
UserVector< double > & |
g, |
|
|
const UserVector< double > & |
x | |
|
) |
| | const [inline, virtual] |
Computes the (sub)gradient for a UserVector<double>.
Abstract.
- Parameters:
-
- See also:
- grad(const dvector&)
-
valgrad(double&, UserVector<double>&, const UserVector<double>&)
-
add_grad(UserVector<double>&, UserVector<double>&)
-
add_valgrad(double&, UserVector<double>&, UserVector<double>&)
Implements Func.
Definition at line 234 of file ampl.h.
Computes the product of a Hessian and a dvector.
- Parameters:
-
| y | The dvector to store the result in. |
| x | The dvector to compute the Hessian for. |
| z | The dvector to multiply with the Hessian. |
Definition at line 258 of file ampl.h.
Evaluates the product of the Hessian and a UserVector<double>.
Abstract.
- Parameters:
-
- See also:
- HessMult(const UserVector<double>&, const UserVector<double>&)
Implements Func.
Definition at line 263 of file ampl.h.
void amplCon::set_curvature |
( |
CurvatureType |
ct |
) |
[inline, virtual] |
void amplCon::print |
( |
ostream & |
out |
) |
const [inline, virtual] |
Prints some information about this function.
Prints the dimension and constraint-number.
- Parameters:
-
| out | The ostream to print to. |
Reimplemented from Func.
Definition at line 280 of file ampl.h.
Member Data Documentation
The number of the constraint, this function represents.
Definition at line 173 of file ampl.h.
Array for Hessain-Multiplication, to select the constraint, which Hessian should be computed.
Definition at line 177 of file ampl.h.
The documentation for this class was generated from the following file: