Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Indexlist Class Reference

Stores and manages index lists. More...

#include <Indexlist.hpp>

List of all members.

Public Member Functions

returnValue addNumber (int addnumber)
returnValue addNumber (int addnumber)
returnValue addNumber (int addnumber)
int getIndex (int givennumber) const
int getIndex (int givennumber) const
int getIndex (int givennumber) const
int getLastNumber () const
int getLastNumber () const
int getLastNumber () const
int getLength ()
int getLength ()
int getLength () const
int getNumber (int physicalindex) const
int getNumber (int physicalindex) const
int getNumber (int physicalindex) const
returnValue getNumberArray (int *const numberarray) const
returnValue getNumberArray (int *const numberarray) const
returnValue getNumberArray (int **const numberarray) const
int getPhysicalIndex (int givennumber) const
int getPhysicalIndex (int givennumber) const
 Indexlist ()
 Indexlist ()
 Indexlist (const Indexlist &rhs)
 Indexlist (const Indexlist &rhs)
 Indexlist ()
 Indexlist (int n)
 Indexlist (const Indexlist &rhs)
returnValue init ()
returnValue init ()
returnValue init (int n=0)
BooleanType isMember (int _number) const
BooleanType isMember (int _number) const
BooleanType isMember (int _number) const
Indexlistoperator= (const Indexlist &rhs)
Indexlistoperator= (const Indexlist &rhs)
Indexlistoperator= (const Indexlist &rhs)
returnValue removeNumber (int removenumber)
returnValue removeNumber (int removenumber)
returnValue removeNumber (int removenumber)
returnValue swapNumbers (int number1, int number2)
returnValue swapNumbers (int number1, int number2)
returnValue swapNumbers (int number1, int number2)
 ~Indexlist ()
 ~Indexlist ()
 ~Indexlist ()

Protected Member Functions

returnValue clear ()
returnValue copy (const Indexlist &rhs)
int findInsert (int i) const

Protected Attributes

int first
int * iSort
int last
int lastusedindex
int length
int next [INDEXLISTFACTOR *(NVMAX+NCMAX)]
int number [INDEXLISTFACTOR *(NVMAX+NCMAX)]
int * number
int physicallength
int previous [INDEXLISTFACTOR *(NVMAX+NCMAX)]

Friends

class DenseMatrix
class SparseMatrix
class SymDenseMat
class SymSparseMat

Detailed Description

Stores and manages index lists.

This class manages index lists.

Author:
Hans Joachim Ferreau
Version:
1.3embedded
Date:
2007-2008

This class manages index lists of active/inactive bounds/constraints.

Author:
Hans Joachim Ferreau
Version:
3.0beta
Date:
2007-2011

Definition at line 48 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.


Constructor & Destructor Documentation

Indexlist::Indexlist ( const Indexlist rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Definition at line 66 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

Default constructor.

Indexlist::Indexlist ( const Indexlist rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Destructor.

Default constructor.

Constructor which takes the desired physical length of the index list.

Parameters:
nPhysical length of index list.

Definition at line 62 of file external_packages/qpOASES-3.0beta/src/Indexlist.cpp.

Indexlist::Indexlist ( const Indexlist rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Destructor.


Member Function Documentation

returnValue Indexlist::addNumber ( int  addnumber)

Adds number to index list.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_MUST_BE_REORDERD
RET_INDEXLIST_EXCEEDS_MAX_LENGTH
Parameters:
addnumberNumber to be added.

Definition at line 218 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

returnValue Indexlist::addNumber ( int  addnumber)

Adds number to index list.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_MUST_BE_REORDERD
RET_INDEXLIST_EXCEEDS_MAX_LENGTH
Parameters:
addnumberNumber to be added.
returnValue Indexlist::addNumber ( int  addnumber)

Adds number to index list.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_MUST_BE_REORDERD
RET_INDEXLIST_EXCEEDS_MAX_LENGTH
Parameters:
addnumberNumber to be added.
returnValue Indexlist::clear ( ) [protected]

Frees all allocated memory.

Returns:
SUCCESSFUL_RETURN

Definition at line 237 of file external_packages/qpOASES-3.0beta/src/Indexlist.cpp.

returnValue Indexlist::copy ( const Indexlist rhs) [protected]

Copies all members from given rhs object.

Returns:
SUCCESSFUL_RETURN
Parameters:
rhsRhs object.

Definition at line 258 of file external_packages/qpOASES-3.0beta/src/Indexlist.cpp.

int Indexlist::findInsert ( int  i) const [protected]

Find first index j between -1 and length in sorted list of indices iSort such that numbers[iSort[j]] <= i < numbers[iSort[j+1]]. Uses bisection.

Returns:
j.

Definition at line 284 of file external_packages/qpOASES-3.0beta/src/Indexlist.cpp.

int Indexlist::getIndex ( int  givennumber) const

Determines the index within the index list at with a given number is stored.

Returns:
>= 0: Index of given number.
-1: Number not found.
Parameters:
givennumberNumber whose index shall be determined.
int Indexlist::getIndex ( int  givennumber) const

Determines the index within the index list at with a given number is stored.

Returns:
>= 0: Index of given number.
-1: Number not found.
Parameters:
givennumberNumber whose index shall be determined.

Definition at line 168 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

int Indexlist::getIndex ( int  givennumber) const

Determines the index within the index list at with a given number is stored.

Returns:
>= 0: Index of given number.
-1: Number not found.
Parameters:
givennumberNumber whose index shall be determined.
int Indexlist::getLastNumber ( ) const [inline]

Returns last number within the index list.

Returns:
Last number within the index list.
int Indexlist::getLastNumber ( ) const [inline]

Returns last number within the index list.

Returns:
Last number within the index list.
int Indexlist::getLastNumber ( ) const [inline]

Returns last number within the index list.

Returns:
Last number within the index list.
int Indexlist::getLength ( ) [inline]

Returns the current length of the index list.

Returns:
Current length of the index list.
int Indexlist::getLength ( ) [inline]

Returns the current length of the index list.

Returns:
Current length of the index list.
int Indexlist::getLength ( ) const [inline]

Returns the current length of the index list.

Returns:
Current length of the index list.
int Indexlist::getNumber ( int  physicalindex) const

Returns the number stored at a given physical index.

Returns:
>= 0: Number stored at given physical index.
-RET_INDEXLIST_OUTOFBOUNDS
Parameters:
physicalindexPhysical index of the number to be returned.
int Indexlist::getNumber ( int  physicalindex) const

Returns the number stored at a given physical index.

Returns:
>= 0: Number stored at given physical index.
-RET_INDEXLIST_OUTOFBOUNDS
Parameters:
physicalindexPhysical index of the number to be returned.
int Indexlist::getNumber ( int  physicalindex) const

Returns the number stored at a given physical index.

Returns:
>= 0: Number stored at given physical index.
-RET_INDEXLIST_OUTOFBOUNDS
Parameters:
physicalindexPhysical index of the number to be returned.
returnValue Indexlist::getNumberArray ( int *const  numberarray) const

Creates an array of all numbers within the index set in correct order.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED
Parameters:
numberarrayOutput: Array of numbers (NULL on error).

Definition at line 145 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

returnValue Indexlist::getNumberArray ( int *const  numberarray) const

Creates an array of all numbers within the index set in correct order.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED
Parameters:
numberarrayOutput: Array of numbers (NULL on error).
returnValue Indexlist::getNumberArray ( int **const  numberarray) const

Creates an array of all numbers within the index set in correct order.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED
Parameters:
numberarrayOutput: Array of numbers (NULL on error).

Definition at line 132 of file external_packages/qpOASES-3.0beta/src/Indexlist.cpp.

int Indexlist::getPhysicalIndex ( int  givennumber) const

Determines the physical index within the index list at with a given number is stored.

Returns:
>= 0: Index of given number.
-1: Number not found.
Parameters:
givennumberNumber whose physical index shall be determined.
int Indexlist::getPhysicalIndex ( int  givennumber) const

Determines the physical index within the index list at with a given number is stored.

Returns:
>= 0: Index of given number.
-1: Number not found.
Parameters:
givennumberNumber whose physical index shall be determined.

Definition at line 193 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

Pseudo-constructor.

Returns:
SUCCESSFUL_RETURN

Definition at line 121 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

Pseudo-constructor.

Returns:
SUCCESSFUL_RETURN
returnValue Indexlist::init ( int  n = 0)

Initialises index list of desired physical length.

Returns:
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters:
nPhysical length of index list.

Definition at line 108 of file external_packages/qpOASES-3.0beta/src/Indexlist.cpp.

BooleanType Indexlist::isMember ( int  _number) const [inline]

Determines if a given number is contained in the index set.

Returns:
BT_TRUE iff number is contain in the index set
Parameters:
_numberNumber to be tested for membership.
BooleanType Indexlist::isMember ( int  _number) const [inline]

Determines if a given number is contained in the index set.

Returns:
BT_TRUE iff number is contain in the index set
Parameters:
_numberNumber to be tested for membership.
BooleanType Indexlist::isMember ( int  _number) const [inline]

Determines if a given number is contained in the index set.

Returns:
BT_TRUE iff number is contain in the index set
Parameters:
_numberNumber to be tested for membership.
Indexlist & Indexlist::operator= ( const Indexlist rhs)

Assingment operator (deep copy).

Parameters:
rhsRhs object.

Definition at line 94 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

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

Assingment operator (deep copy).

Parameters:
rhsRhs object.
Indexlist& Indexlist::operator= ( const Indexlist rhs)

Assingment operator (deep copy).

Parameters:
rhsRhs object.
returnValue Indexlist::removeNumber ( int  removenumber)

Removes number from index list.

Returns:
SUCCESSFUL_RETURN
Parameters:
removenumberNumber to be removed.
returnValue Indexlist::removeNumber ( int  removenumber)

Removes number from index list.

Returns:
SUCCESSFUL_RETURN
Parameters:
removenumberNumber to be removed.

Definition at line 290 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

returnValue Indexlist::removeNumber ( int  removenumber)

Removes number from index list.

Returns:
SUCCESSFUL_RETURN
Parameters:
removenumberNumber to be removed.
returnValue Indexlist::swapNumbers ( int  number1,
int  number2 
)

Swaps two numbers within index list.

Returns:
SUCCESSFUL_RETURN
Parameters:
number1First number for swapping.
number2Second number for swapping.
returnValue Indexlist::swapNumbers ( int  number1,
int  number2 
)

Swaps two numbers within index list.

Returns:
SUCCESSFUL_RETURN
Parameters:
number1First number for swapping.
number2Second number for swapping.

Definition at line 323 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Indexlist.cpp.

returnValue Indexlist::swapNumbers ( int  number1,
int  number2 
)

Swaps two numbers within index list.

Returns:
SUCCESSFUL_RETURN
Parameters:
number1First number for swapping.
number2Second number for swapping.

Friends And Related Function Documentation

friend class DenseMatrix [friend]
friend class SparseMatrix [friend]
friend class SymDenseMat [friend]
friend class SymSparseMat [friend]

Member Data Documentation

int Indexlist::first [protected]

Physical index of first element.

Definition at line 140 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.

int* Indexlist::iSort [protected]

Index list to sort vector number

Definition at line 174 of file external_packages/qpOASES-3.0beta/include/qpOASES/Indexlist.hpp.

int Indexlist::last [protected]

Physical index of last element.

Definition at line 141 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.

int Indexlist::lastusedindex [protected]

Physical index of last entry in index list.

Definition at line 142 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.

int Indexlist::length [protected]
int Indexlist::next [protected]

Array to store physical index of successor.

Definition at line 137 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.

int Indexlist::number [protected]

Array to store numbers of constraints or bounds.

Definition at line 136 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.

int* Indexlist::number [protected]

Array to store numbers of constraints or bounds.

Definition at line 173 of file external_packages/qpOASES-3.0beta/include/qpOASES/Indexlist.hpp.

int Indexlist::physicallength [protected]

Physical length of index list.

Definition at line 143 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.

int Indexlist::previous [protected]

Array to store physical index of predecossor.

Definition at line 138 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Indexlist.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:39