Jacobian class has methods to call Jacobian evaluation routines of AMPL. This class is not meant to calculate Jacobian of native Minotaur functions.
More...
#include <AMPLJacobian.h>
|
| | AMPLJacobian (AMPLInterfacePtr iface) |
| | Construct AMPLJacobian using an AMPL(ASL) interface.
|
| |
|
| ~AMPLJacobian () |
| | Destroy.
|
| |
| void | fillColRowIndices (Minotaur::UInt *jcol, Minotaur::UInt *irow) |
| | Fill in column and row indices of nonzeros in Jacobian.
|
| |
| void | fillRowColIndices (Minotaur::UInt *irow, Minotaur::UInt *jcol) |
| | Fill the indices of non-zeros in Jacobian, row-wise (or constraint-wise).
|
| |
| void | fillColRowValues (const double *x, double *values, int *error) |
| | Evaluate Jacobian at a given point x, column-wise. Fill the values of Jacobian at a given point x into array 'values'. The ordering is same as that provided by fillColRowIndices().
|
| |
| void | fillRowColValues (const double *x, double *values, int *error) |
| | Evaluate Jacobian at a given point x, row-wise.
|
| |
| Minotaur::UInt | getNumNz () |
| | Return the number of non-zeros in the Jacobian.
|
| |
|
| Jacobian () |
| | Default constructor.
|
| |
|
| Jacobian (const std::vector< ConstraintPtr > &cons, const UInt n) |
| | Constructor using constraints.
|
| |
|
virtual | ~Jacobian () |
| | Destroy.
|
| |
|
void | write (std::ostream &out) const |
| |
Jacobian class has methods to call Jacobian evaluation routines of AMPL. This class is not meant to calculate Jacobian of native Minotaur functions.
◆ AMPLJacobian()
Construct AMPLJacobian using an AMPL(ASL) interface.
- Parameters
-
| [in] | iface | Pointer to AMPLInterface class from which we read the instance. |
◆ fillColRowIndices()
Fill in column and row indices of nonzeros in Jacobian.
Given arrays irow and jcol, fill in the row and column index of each non-zero in the jacobian. The entries are ordered by columns. This is slightly inefficient because AMPL computes the gradients row-wise and then translates them to column-wise (using goff). e.g. x1x3 + x1^2x4 = 2 x0 + x5 = 0 then, irow = [0 0 0 1 1] jcol = [1 3 4 0 5]
- Parameters
-
| [out] | jcol | Array of size returned by getNumNz(). |
| [out] | irow | Array of size returned by getNumNz(). |
Reimplemented from Minotaur::Jacobian.
◆ fillColRowValues()
| void AMPLJacobian::fillColRowValues |
( |
const double * |
x, |
|
|
double * |
values, |
|
|
int * |
error |
|
) |
| |
|
virtual |
Evaluate Jacobian at a given point x, column-wise. Fill the values of Jacobian at a given point x into array 'values'. The ordering is same as that provided by fillColRowIndices().
- Parameters
-
| [in] | x | The point at which Jacobian is to be evaluated. |
| [out] | values | The array of size returned by getNumNz() into which values are saved. |
| [out] | error | is set to a nonzero value if a problem is encountered, otherwise it is left undisturbed. |
Reimplemented from Minotaur::Jacobian.
◆ fillRowColIndices()
Fill the indices of non-zeros in Jacobian, row-wise (or constraint-wise).
- Parameters
-
| [out] | irow | Array of size returned by getNumNz(). |
| [out] | jcol | Array of size returned by getNumNz(). |
Reimplemented from Minotaur::Jacobian.
◆ fillRowColValues()
| void AMPLJacobian::fillRowColValues |
( |
const double * |
x, |
|
|
double * |
values, |
|
|
int * |
error |
|
) |
| |
|
virtual |
Evaluate Jacobian at a given point x, row-wise.
- Parameters
-
| [in] | x | The point at which Jacobian is to be evaluated. |
| [out] | values | The array of size returned by getNumNz() into which values are saved. |
| [out] | error | is set to a nonzero value if a problem is encountered, otherwise it is left undisturbed. |
Reimplemented from Minotaur::Jacobian.
◆ getNumNz()
The documentation for this class was generated from the following files: