humoto
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
humoto::constraints::ContainerBase Class Referenceabstract

Detailed Description

Constraints abstract interface class.

Definition at line 117 of file constraints_base.h.

#include <constraints_base.h>

Inheritance diagram for humoto::constraints::ContainerBase:
Inheritance graph

Public Member Functions

Location getCopyLocation (const std::size_t number_of_constraints, const std::size_t constraints_offset, const std::size_t number_of_variables) const
 Computes location of the copied constraints in a container and verifies their consistency. More...
 
virtual std::size_t getNumberOfConstraints () const =0
 Returns number of constraints in the task. More...
 
std::size_t getNumberOfVariables () const
 Returns number of variables in the task. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
 Log data. More...
 

Protected Member Functions

 ContainerBase ()
 
 ~ContainerBase ()
 Protected destructor: prevent destruction of the child classes through a base pointer. More...
 
virtual void logBody (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const =0
 Log body. More...
 
virtual void logBounds (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const =0
 Log bounds. More...
 
void reset (const std::size_t number_of_constraints=0, const std::size_t number_of_variables=0, const bool initialize_matrices=false)
 Initialize constraints. More...
 
virtual void resetBody (const std::size_t number_of_constraints=0, const bool initialize_matrices=false)=0
 Reset body of constraints (matrix A or I) More...
 
virtual void resetBounds (const std::size_t number_of_constraints=0, const bool initialize_matrices=false)=0
 Reset bounds of constraints (b, lb, ub) More...
 
void setNumberOfVariables (const std::size_t number_of_variables)
 Set number of variables. More...
 

Protected Attributes

std::size_t number_of_variables_
 

Constructor & Destructor Documentation

◆ ~ContainerBase()

humoto::constraints::ContainerBase::~ContainerBase ( )
inlineprotected

Protected destructor: prevent destruction of the child classes through a base pointer.

Definition at line 128 of file constraints_base.h.

◆ ContainerBase()

humoto::constraints::ContainerBase::ContainerBase ( )
inlineprotected

Definition at line 131 of file constraints_base.h.

Member Function Documentation

◆ getCopyLocation()

Location humoto::constraints::ContainerBase::getCopyLocation ( const std::size_t  number_of_constraints,
const std::size_t  constraints_offset,
const std::size_t  number_of_variables 
) const
inline

Computes location of the copied constraints in a container and verifies their consistency.

Parameters
[in]number_of_constraintsnumber of added constraints
[in]constraints_offsetoffset in the container
[in]number_of_variablesnumber of variables in the container
Returns
Location

Definition at line 262 of file constraints_base.h.

◆ getNumberOfConstraints()

virtual std::size_t humoto::constraints::ContainerBase::getNumberOfConstraints ( ) const
pure virtual

◆ getNumberOfVariables()

std::size_t humoto::constraints::ContainerBase::getNumberOfVariables ( ) const
inline

Returns number of variables in the task.

Returns
number of variables

Definition at line 215 of file constraints_base.h.

◆ log()

void humoto::constraints::ContainerBase::log ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
inline

Log data.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]namename

Definition at line 238 of file constraints_base.h.

◆ logBody()

virtual void humoto::constraints::ContainerBase::logBody ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
protectedpure virtual

Log body.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]namename

Implemented in humoto::constraints::BodyGIMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsUMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >, humoto::constraints::BodyIMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsUMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsUMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsLMixin< ContainerBase > >, humoto::constraints::BodyAMixin< BoundsLUMixin< ContainerBase > >, humoto::constraints::BodyAMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsUMixin< TaskBase > >, and humoto::constraints::BodyAMixin< BoundsBMixin< ContainerBase > >.

◆ logBounds()

virtual void humoto::constraints::ContainerBase::logBounds ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
protectedpure virtual

◆ reset()

void humoto::constraints::ContainerBase::reset ( const std::size_t  number_of_constraints = 0,
const std::size_t  number_of_variables = 0,
const bool  initialize_matrices = false 
)
inlineprotected

Initialize constraints.

Parameters
[in]number_of_constraintsnumber of constraints
[in]number_of_variablesnumber of variables
[in]initialize_matricesinitialize matrices using defaults

Definition at line 175 of file constraints_base.h.

◆ resetBody()

virtual void humoto::constraints::ContainerBase::resetBody ( const std::size_t  number_of_constraints = 0,
const bool  initialize_matrices = false 
)
protectedpure virtual

Reset body of constraints (matrix A or I)

Parameters
[in]number_of_constraintsnumber of constraints
[in]initialize_matricesinitialize matrices using defaults

Implemented in humoto::constraints::BodyGIMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyGIMixin< BoundsUMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >, humoto::constraints::BodyIMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyIMixin< BoundsUMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyASMixin< BoundsUMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsBMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsB0Mixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsLUMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsLMixin< ContainerBase > >, humoto::constraints::BodyAMixin< BoundsLUMixin< ContainerBase > >, humoto::constraints::BodyAMixin< BoundsLMixin< TaskBase > >, humoto::constraints::BodyAMixin< BoundsUMixin< TaskBase > >, and humoto::constraints::BodyAMixin< BoundsBMixin< ContainerBase > >.

◆ resetBounds()

virtual void humoto::constraints::ContainerBase::resetBounds ( const std::size_t  number_of_constraints = 0,
const bool  initialize_matrices = false 
)
protectedpure virtual

◆ setNumberOfVariables()

void humoto::constraints::ContainerBase::setNumberOfVariables ( const std::size_t  number_of_variables)
inlineprotected

Set number of variables.

Parameters
[in]number_of_variablesnumber of variables

Definition at line 142 of file constraints_base.h.

Member Data Documentation

◆ number_of_variables_

std::size_t humoto::constraints::ContainerBase::number_of_variables_
protected

Definition at line 120 of file constraints_base.h.


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