Minotaur 0.4.1
Docs for developers
Public Member Functions | List of all members
Minotaur::UnoSolution Class Reference
Inheritance diagram for Minotaur::UnoSolution:
Inheritance graph
[legend]
Collaboration diagram for Minotaur::UnoSolution:
Collaboration graph
[legend]

Public Member Functions

 UnoSolution ()
 Default constructor.
 
 UnoSolution (const double *x, ProblemPtr problem)
 Construct a solution for a problem from an array of doubles.
 
 UnoSolution (const double *x, double objval, ProblemPtr problem)
 
 UnoSolution (ConstUnoSolPtr)
 Copy constructor.
 
 ~UnoSolution ()
 Destroy.
 
const double * getLowerDualOfVars () const
 
const double * getUpperDualOfVars () const
 
void setDualOfVars (const double *)
 Copy values of dual variables of variables. More...
 
void setDualOfVars (const double *lower, const double *upper)
 Set duals of variable-bounds: both the lower and upper.
 
void write (std::ostream &out) const
 Write to an output. More...
 
- Public Member Functions inherited from Minotaur::Solution
 Solution ()
 Default constructor.
 
 Solution (double objval, const double *x, ProblemPtr problem)
 Construct a solution for a problem from an array of doubles.
 
 Solution (double objvalue, const DoubleVector &newx, ProblemPtr problem)
 Construct a solution for a problem from a vector of doubles.
 
 Solution (ConstSolutionPtr sol)
 Copy.
 
virtual ~Solution ()
 Destroy.
 
virtual void setPrimal (const double *x)
 Copy values of variables.
 
virtual void setDualOfCons (const double *vals)
 Copy values of dual variables of constraints.
 
virtual void setDualOfVars (const double *vals)
 Copy values of dual variables of variables. More...
 
virtual void setObjValue (double new_val)
 Set a new solution value.
 
virtual double getObjValue () const
 Return solution value.
 
virtual double getConstraintViolation ()
 Return the 2nd norm of constraint violations.
 
virtual const double * getPrimal () const
 Return a pointer to the solution.
 
virtual const double * getDualOfCons () const
 Return a pointer to the solution.
 
virtual const double * getDualOfVars () const
 Return a pointer to the solution.
 
virtual void write (std::ostream &out) const
 Write to a stream. More...
 
virtual void writePrimal (std::ostream &out, const VarVector *v=0) const
 Write primal values to a stream.
 
virtual void writeDual (std::ostream &out) const
 Write dual values to a stream.
 

Additional Inherited Members

- Protected Attributes inherited from Minotaur::Solution
UInt n_
 Number of variables.
 
UInt m_
 Number of constraints.
 
ProblemPtr problem_
 Original problem (For accessing variable names).
 
double * x_
 Store values of the variables in an array.
 
double * dualCons_
 
double * dualX_
 
double consViol_
 Violation.
 
double objValue_
 The objective value of this solution.
 
double comple_
 Complementarity.
 

Constructor & Destructor Documentation

◆ UnoSolution()

Minotaur::UnoSolution::UnoSolution ( const double *  x,
double  objval,
ProblemPtr  problem 
)

Construct a solution for a problem from an array of doubles and objective value.

Member Function Documentation

◆ getLowerDualOfVars()

const double * Minotaur::UnoSolution::getLowerDualOfVars ( ) const
inline

Return a pointer to the dual associated with the lower bound on variables.

◆ getUpperDualOfVars()

const double * Minotaur::UnoSolution::getUpperDualOfVars ( ) const
inline

Return a pointer to the dual associated with the upper bound on variables.

◆ setDualOfVars()

void Minotaur::UnoSolution::setDualOfVars ( const double *  vals)
inlinevirtual

Copy values of dual variables of variables.

Reimplemented from Minotaur::Solution.

◆ write()

void Minotaur::UnoSolution::write ( std::ostream &  out) const
virtual

Write to an output.

Reimplemented from Minotaur::Solution.


The documentation for this class was generated from the following files:

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025