This C++ namespace contains everything related to MANGO. More...
Classes | |
class | Algorithm |
struct | algorithm_properties |
Some properties of each algorithm that MANGO is aware of. More... | |
class | Imfil |
class | Least_squares_problem |
class | Least_squares_solver |
class | LeastSquaresAlgorithm |
class | Levenberg_marquardt |
class | MPI_Partition |
A class for dividing the set of MPI processes into worker groups. More... | |
class | Package |
class | Package_gsl |
class | Package_hopspack |
class | Package_mango |
class | Package_nlopt |
class | Package_petsc |
class | Problem |
class | Recorder |
class | Recorder_least_squares |
class | Recorder_standard |
class | Solver |
Typedefs | |
typedef void(* | objective_function_type) (int *N_parameters, const double *state_vector, double *objective_value, int *failed, mango::Problem *problem, void *user_data) |
Format for the user-supplied subroutine that computes the objective function for a general (non least-squares) optimization problem. More... | |
typedef void(* | vector_function_type) (int *N_parameters, const double *state_vector, int *N_terms, double *residuals, int *failed, mango::Problem *problem, void *user_data) |
Format for the user-supplied subroutine that computes the residuals for a least-squares optimization problem. More... | |
Enumerations | |
enum | package_type { PACKAGE_HOPSPACK, PACKAGE_MANGO, PACKAGE_NLOPT, PACKAGE_GSL, PACKAGE_PETSC, NUM_PACKAGES } |
The list of packages, i.e. libraries that MANGO can call to perform optimization. More... | |
enum | algorithm_type { MANGO_LEVENBERG_MARQUARDT, MANGO_IMFIL, PETSC_NM, PETSC_POUNDERS, PETSC_BRGN, NLOPT_GN_DIRECT, NLOPT_GN_DIRECT_L, NLOPT_GN_DIRECT_L_RAND, NLOPT_GN_DIRECT_NOSCAL, NLOPT_GN_DIRECT_L_NOSCAL, NLOPT_GN_DIRECT_L_RAND_NOSCAL, NLOPT_GN_ORIG_DIRECT, NLOPT_GN_ORIG_DIRECT_L, NLOPT_GN_CRS2_LM, NLOPT_LN_COBYLA, NLOPT_LN_BOBYQA, NLOPT_LN_PRAXIS, NLOPT_LN_NELDERMEAD, NLOPT_LN_SBPLX, NLOPT_LD_MMA, NLOPT_LD_CCSAQ, NLOPT_LD_SLSQP, NLOPT_LD_LBFGS, NLOPT_LD_TNEWTON_PRECOND_RESTART, NLOPT_LD_TNEWTON_PRECOND, NLOPT_LD_TNEWTON_RESTART, NLOPT_LD_TNEWTON, NLOPT_LD_VAR1, NLOPT_LD_VAR2, HOPSPACK, GSL_LM, GSL_DOGLEG, GSL_DDOGLEG, GSL_SUBSPACE2D, GSL_CONJUGATE_FR, GSL_CONJUGATE_PR, GSL_BFGS, GSL_NM, NUM_ALGORITHMS } |
A list of the algorithms that MANGO can potentially use. More... | |
Functions | |
bool | does_algorithm_exist (std::string algorithm_name) |
Checks whether or not a string corresponds to the name of one of the optimization algorithms known by MANGO. More... | |
bool | get_algorithm (std::string name, algorithm_type *algorithm_int) |
Returns the integer (enum) for an optimization algorithm associated with its string name. More... | |
Variables | |
const double | NUMBER_FOR_FAILED = 1.0e+12 |
A large finite number. More... | |
const algorithm_properties | algorithms [NUM_ALGORITHMS] |
A database of the algorithms that MANGO is aware of, including various properties of each algorithm. More... | |
This C++ namespace contains everything related to MANGO.
typedef void(* mango::objective_function_type) (int *N_parameters, const double *state_vector, double *objective_value, int *failed, mango::Problem *problem, void *user_data) |
Format for the user-supplied subroutine that computes the objective function for a general (non least-squares) optimization problem.
[in] | N_parameters | The number of independent variables, i.e. the dimension of the search space. |
[in] | state_vector | An array of size N_parameters containing the values of the indpendent variables. |
[out] | objective_value | The subroutine must set this variable to the value of the objective function. |
[out] | failed | Set the value pointed to by this variable to 1 if the calculation of the objective function fails for some reason. Otherwise the value should be 0. |
[in] | problem | A pointer to the class representing this optimization problem. This pointer can be useful for getting information about the MPI communicators. |
[in] | user_data | Pointer to user-supplied data, which can be set by mango::Problem::set_user_data(). |
typedef void(* mango::vector_function_type) (int *N_parameters, const double *state_vector, int *N_terms, double *residuals, int *failed, mango::Problem *problem, void *user_data) |
Format for the user-supplied subroutine that computes the residuals for a least-squares optimization problem.
[in] | N_parameters | The number of independent variables, i.e. the dimension of the search space. |
[in] | state_vector | An array of size N_parameters containing the values of the indpendent variables. |
[in] | N_terms | The number of least-squares terms that are summed in the total objective function, i.e. the number of residuals. |
[in] | residuals | An array of size N_terms which must be set to the residuals, denoted \( R_j \) on Core Concepts. |
[out] | failed | Set the value pointed to by this variable to 1 if the calculation of the residuals fails for some reason. Otherwise the value should be 0. |
[in] | problem | A pointer to the class representing this optimization problem. This pointer can be useful for getting information about the MPI communicators. |
[in] | user_data | Pointer to user-supplied data, which can be set by mango::Problem::set_user_data(). |
A list of the algorithms that MANGO can potentially use.
Each algorithm in this list is only actually available if MANGO is built with the corresponding package. This list of packages is generated by the update_algorithms script from the master table of algorithms in algorithms.dat.
enum mango::package_type |
The list of packages, i.e. libraries that MANGO can call to perform optimization.
Note that all packages are enumerated here even if MANGO is built without support for all of them. This list of packages is generated by the update_algorithms script from the master table of algorithms in algorithms.dat.
Enumerator | |
---|---|
PACKAGE_HOPSPACK | |
PACKAGE_MANGO | |
PACKAGE_NLOPT | |
PACKAGE_GSL | |
PACKAGE_PETSC | |
NUM_PACKAGES | Not an actual package, just counting. |
bool mango::does_algorithm_exist | ( | std::string | algorithm_name | ) |
Checks whether or not a string corresponds to the name of one of the optimization algorithms known by MANGO.
[in] | algorithm_name | A candidate name for an optimization algorithm. These names correspond to the name field of the algorithm_properties type. |
Definition at line 72 of file algorithms.cpp.
bool mango::get_algorithm | ( | std::string | name, |
algorithm_type * | algorithm_int | ||
) |
Returns the integer (enum) for an optimization algorithm associated with its string name.
[in] | name | A name of an optimization algorithm, e.g. "petsc_pounders" or "nlopt_ln_neldermead" |
[out] | algorithm_int | The integer code for the algorithm with name specified by name. If no matching algorithm is found, the value pointed to by algorithm_int will not be changed from its input value. |
Definition at line 49 of file algorithms.cpp.
const algorithm_properties mango::algorithms[NUM_ALGORITHMS] |
A database of the algorithms that MANGO is aware of, including various properties of each algorithm.
This databse is automatically generated from the master database algorithms.dat by the update_algorithms script.