OBOE 0.1
|
#include <Oracle.h>
Public Member Functions | |
Oracle (OracleFunction *f1, OracleFunction *f2=NULL) | |
virtual | ~Oracle () |
virtual bool | hasSmoothOracle () const |
virtual bool | computesBound () const |
virtual double | getObjectiveFunctionBound () const |
OracleFunction * | getF1 () const |
OracleFunction * | getF2 () const |
Protected Attributes | |
OracleFunction * | _f1 |
OracleFunction * | _f2 |
Oracle class is the container for the non-smooth, f1(.) and smooth function f2(.), both of which are implemented via the interface OracleFunction.
Accpm::Oracle::Oracle | ( | OracleFunction * | f1, |
OracleFunction * | f2 = NULL |
||
) |
Constructor for Oracle takes in the non-smooth OracleFunction f1 and the smooth OracleFunction f2 if it is present. The user needs to create their implementation of OracleFunction and pass it to Oracle object. If the application does not demand overriding the other virtual functions of class Oracle, the user can use this class. For cases when the user specifies a lower bound (for a minimization problem) they need to create their implementation of Oracle class (in addition to OracleFunction which always needs to be implemented by the user) and implement the computesLowerBound() and double getLowerBound() functions.
f1 | pointer to the implementation of user-defined OracleFunction for the non-smooth part of the objective function |
f2 | pointer to the smooth part of the objective function. |
Accpm::Oracle::~Oracle | ( | ) | [virtual] |
virtual bool Accpm::Oracle::computesBound | ( | ) | const [inline, virtual] |
Re-implement this function to return true give a user-defined lower bound (upper bound) for minimization(maximization) problems.
Referenced by Accpm::QpGenerator::run().
OracleFunction* Accpm::Oracle::getF1 | ( | ) | const [inline] |
OracleFunction* Accpm::Oracle::getF2 | ( | ) | const [inline] |
References _f2.
Referenced by Accpm::Manager::callSmoothOracle(), and Accpm::QpGenerator::run().
virtual double Accpm::Oracle::getObjectiveFunctionBound | ( | ) | const [inline, virtual] |
Re-implement this function to give a user-defined lower bound upper bound for minimization(maximization) problems.
Note: The function values returned in the OracleFunction::eval() are used to determine the upper bound(lower bound) for minimization(maximization) problems.
References ACCPM_MINUS_INF.
Referenced by Accpm::QpGenerator::run().
virtual bool Accpm::Oracle::hasSmoothOracle | ( | ) | const [inline, virtual] |
References _f2.
Referenced by Accpm::Manager::Manager().
OracleFunction* Accpm::Oracle::_f1 [protected] |
OracleFunction* Accpm::Oracle::_f2 [protected] |
Referenced by getF2(), hasSmoothOracle(), and Oracle().