Commit b8806fd3 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Improved signature of IPOPTSolver::solve.


git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@118 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 199168ef
......@@ -54,7 +54,7 @@ IPOPTSolver()
int
IPOPTSolver::
solve(NProblemInterface* _problem, std::vector<NConstraintInterface*>& _constraints)
solve(NProblemInterface* _problem, const std::vector<NConstraintInterface*>& _constraints)
{
//----------------------------------------------------------------------------
// 1. Create an instance of IPOPT NLP
......@@ -148,7 +148,7 @@ solve(NProblemGmmInterface* _problem, std::vector<NConstraintInterface*>& _const
void
NProblemIPOPT::
split_constraints(std::vector<NConstraintInterface*>& _constraints)
split_constraints(const std::vector<NConstraintInterface*>& _constraints)
{
// split user-provided constraints into general-constraints and bound-constraints
constraints_ .clear(); constraints_.reserve(_constraints.size());
......
......@@ -82,7 +82,7 @@ public:
// };
//------------------------------------------------------
int solve(NProblemInterface* _problem, std::vector<NConstraintInterface*>& _constraints);
int solve(NProblemInterface* _problem, const std::vector<NConstraintInterface*>& _constraints);
// deprecated interface for backwards compatibility
int solve(NProblemGmmInterface* _problem, std::vector<NConstraintInterface*>& _constraints);
......@@ -129,7 +129,7 @@ public:
typedef NProblemInterface::SMatrixNP SMatrixNP;
/** default constructor */
NProblemIPOPT(NProblemInterface* _problem, std::vector<NConstraintInterface*>& _constraints)
NProblemIPOPT(NProblemInterface* _problem, const std::vector<NConstraintInterface*>& _constraints)
: problem_(_problem) { split_constraints(_constraints);}
/** default destructor */
......@@ -208,7 +208,7 @@ private:
//@}
// split user-provided constraints into general-constraints and bound-constraints
void split_constraints(std::vector<NConstraintInterface*>& _constraints);
void split_constraints(const std::vector<NConstraintInterface*>& _constraints);
protected:
double* P(std::vector<double>& _v)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment