|
Interior-point-optimisation
1.0-1
Interior-pointoptimisationlibrary
|
Abstract base class for Objective and Constraint. More...
#include <ModelFunction.hpp>


Public Member Functions | |
| ModelFunction (SharedFunctionPtr function) | |
| Use this constructor to construct from a SharedFunctionPtr object. More... | |
| ModelFunction (ipo_function::Function *function) | |
| Use this constructor to construct from a pointer to a ipo_function::Function object. More... | |
| ModelFunction (ipo_function::Function &function) | |
| Use this constructor to construct from a ipo_function::Function object by reference. More... | |
| virtual ipo::Array & | getVariables ()=0 |
| Get variables used by Objective or Constraint function. More... | |
| virtual void | addVariable (ipo::Variable &variable) |
| Add a Variable to the end of the Array of variables. More... | |
| bool | checkSize () const |
| Check size of vector for function arguments matches number of variables supplied. More... | |
| std::tuple< size_t, size_t > | getSizes () const |
| Get size of vector for function arguments and number of variables supplied. More... | |
| virtual ::ipo_function::Function * | getFunction () |
| Get function. More... | |
Protected Attributes | |
| SharedFunctionPtr | function |
| The objective or constraint function. More... | |
Abstract base class for Objective and Constraint.
Definition at line 32 of file ModelFunction.hpp.
| ModelFunction::ModelFunction | ( | SharedFunctionPtr | function | ) |
Use this constructor to construct from a SharedFunctionPtr object.
| function | A SharedFunctionPtr object |
Definition at line 28 of file ModelFunction.cc.
| ModelFunction::ModelFunction | ( | ipo_function::Function * | function | ) |
Use this constructor to construct from a pointer to a ipo_function::Function object.
The Function object should be constructed using new and should not be deleted explicitly.
| function | A pointer to an object of a subclass of ipo_function::Function |
Definition at line 31 of file ModelFunction.cc.
| ModelFunction::ModelFunction | ( | ipo_function::Function & | function | ) |
Use this constructor to construct from a ipo_function::Function object by reference.
The Function object must remain in scope for the Objective object to be useable.
| function | An object of a subclass of ipo_function::Function |
Definition at line 34 of file ModelFunction.cc.
|
virtual |
Add a Variable to the end of the Array of variables.
| variable | The Variable to add |
| IPOException | if Model objects do not match |
Reimplemented in ipo::Objective.
Definition at line 45 of file ModelFunction.cc.
References getVariables(), ipo::Array::push_back(), and RETHROW.
| bool ModelFunction::checkSize | ( | ) | const |
Check size of vector for function arguments matches number of variables supplied.
If the function vector size is not specified, return true.
Definition at line 38 of file ModelFunction.cc.
References getVariables(), and ipo::Array::size().
Referenced by ipo::Model::checkSize().
|
inline |
Get function.
Definition at line 81 of file ModelFunction.hpp.
Referenced by ipo::detail::BarrierFunction::initialiseGradientFromObjective(), ipo::detail::BarrierFunction::initialiseHessianFromObjective(), ipo::detail::BarrierFunction::initialiseResultFromObjective(), and ipo::detail::PhaseIModel::setIndices().
| std::tuple< size_t, size_t > ModelFunction::getSizes | ( | ) | const |
Get size of vector for function arguments and number of variables supplied.
Definition at line 54 of file ModelFunction.cc.
References getVariables(), and ipo::Array::size().
Referenced by ipo::Model::testSizes().
|
pure virtual |
Get variables used by Objective or Constraint function.
Implemented in ipo::Objective.
Referenced by addVariable(), checkSize(), and getSizes().
|
protected |
The objective or constraint function.
Definition at line 86 of file ModelFunction.hpp.
Referenced by ipo::Objective::operator=(), and ipo::Constraint::operator=().