qpOASES  3.2.1
An Implementation of the Online Active Set Strategy
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Flipper Class Reference

Auxiliary class for storing a copy of the current matrix factorisations. More...

#include <Flipper.hpp>

Public Member Functions

 Flipper ()
 
 Flipper (uint_t _nV, uint_t _nC=0)
 
 Flipper (const Flipper &rhs)
 
 ~Flipper ()
 
Flipperoperator= (const Flipper &rhs)
 
returnValue init (uint_t _nV=0, uint_t _nC=0)
 
returnValue get (Bounds *const _bounds, real_t *const R, Constraints *const _constraints=0, real_t *const _Q=0, real_t *const _T=0) const
 
returnValue set (const Bounds *const _bounds, const real_t *const _R, const Constraints *const _constraints=0, const real_t *const _Q=0, const real_t *const _T=0)
 

Protected Member Functions

returnValue clear ()
 
returnValue copy (const Flipper &rhs)
 
uint_t getDimT () const
 

Protected Attributes

uint_t nV
 
uint_t nC
 
Bounds bounds
 
Constraints constraints
 
real_tR
 
real_tQ
 
real_tT
 

Friends

class QProblemB
 
class QProblem
 

Detailed Description

This auxiliary class stores a copy of the current matrix factorisations. It is used by the classe QProblemB and QProblem in case flipping bounds are enabled.

Author
Hans Joachim Ferreau, Andreas Potschka, Christian Kirches
Version
3.2
Date
2007-2017

Constructor & Destructor Documentation

◆ Flipper() [1/3]

BEGIN_NAMESPACE_QPOASES Flipper::Flipper ( )

Default constructor.

References init(), Q, R, and T.

◆ Flipper() [2/3]

Flipper::Flipper ( uint_t  _nV,
uint_t  _nC = 0 
)

Constructor which takes the number of bounds and constraints.

Parameters
_nVNumber of bounds.
_nCNumber of constraints.

References init(), Q, R, and T.

◆ Flipper() [3/3]

Flipper::Flipper ( const Flipper rhs)

Copy constructor (deep copy).

Parameters
rhsRhs object.

References copy(), Q, R, and T.

◆ ~Flipper()

Flipper::~Flipper ( )

Destructor.

References clear().

Member Function Documentation

◆ clear()

returnValue Flipper::clear ( )
protected

Frees all allocated memory.

Returns
SUCCESSFUL_RETURN

References Q, R, SUCCESSFUL_RETURN, and T.

Referenced by init(), operator=(), and ~Flipper().

◆ copy()

returnValue Flipper::copy ( const Flipper rhs)
protected

Copies all members from given rhs object.

Returns
SUCCESSFUL_RETURN
Parameters
rhsRhs object.

References bounds, constraints, Q, R, and T.

Referenced by Flipper(), and operator=().

◆ get()

returnValue Flipper::get ( Bounds *const  _bounds,
real_t *const  R,
Constraints *const  _constraints = 0,
real_t *const  _Q = 0,
real_t *const  _T = 0 
) const

Copies current values to non-null arguments (assumed to be allocated with consistent size).

Returns
SUCCESSFUL_RETURN
Parameters
_boundsPointer to new bounds.
RNew matrix R.
_constraintsPointer to new constraints.
_QNew matrix Q.
_TNew matrix T.

References bounds, constraints, getDimT(), nV, Q, R, real_t, SUCCESSFUL_RETURN, and T.

Referenced by QProblem::removeBound(), QProblemB::removeBound(), and QProblem::removeConstraint().

◆ getDimT()

uint_t Flipper::getDimT ( ) const
protected

Returns dimension of matrix T.

Returns
Dimension of matrix T.

References END_NAMESPACE_QPOASES, nC, and nV.

Referenced by get(), and set().

◆ init()

returnValue Flipper::init ( uint_t  _nV = 0,
uint_t  _nC = 0 
)

Initialises object with given number of bounds and constraints.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
_nVNumber of bounds.
_nCNumber of constraints.

References clear(), nC, nV, and SUCCESSFUL_RETURN.

Referenced by Flipper(), QProblem::QProblem(), QProblemB::QProblemB(), QProblem::reset(), and QProblemB::reset().

◆ operator=()

Flipper & Flipper::operator= ( const Flipper rhs)

Assignment operator (deep copy).

Parameters
rhsRhs object.

References clear(), and copy().

◆ set()

returnValue Flipper::set ( const Bounds *const  _bounds,
const real_t *const  _R,
const Constraints *const  _constraints = 0,
const real_t *const  _Q = 0,
const real_t *const  _T = 0 
)

Assigns new values to non-null arguments.

Returns
SUCCESSFUL_RETURN
Parameters
_boundsPointer to new bounds.
_RNew matrix R.
_constraintsPointer to new constraints.
_QNew matrix Q.
_TNew matrix T.

References bounds, constraints, getDimT(), nV, Q, R, real_t, SUCCESSFUL_RETURN, and T.

Referenced by QProblem::removeBound(), QProblemB::removeBound(), and QProblem::removeConstraint().

Member Data Documentation

◆ bounds

Bounds Flipper::bounds
protected

Data structure for problem's bounds.

Referenced by copy(), get(), and set().

◆ constraints

Constraints Flipper::constraints
protected

Data structure for problem's constraints.

Referenced by copy(), get(), and set().

◆ nC

uint_t Flipper::nC
protected

Number of constraints.

Referenced by getDimT(), and init().

◆ nV

uint_t Flipper::nV
protected

Number of variables.

Referenced by get(), getDimT(), init(), and set().

◆ Q

real_t* Flipper::Q
protected

Orthonormal quadratic matrix, A = [0 T]*Q'.

Referenced by clear(), copy(), Flipper(), get(), and set().

◆ R

real_t* Flipper::R
protected

Cholesky factor of H (i.e. H = R^T*R).

Referenced by clear(), copy(), Flipper(), get(), and set().

◆ T

real_t* Flipper::T
protected

Reverse triangular matrix, A = [0 T]*Q'.

Referenced by clear(), copy(), Flipper(), get(), and set().


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