humoto
Public Member Functions | Private Attributes | List of all members
humoto::Violations Class Reference

Detailed Description

Violations corresponding to a hierarchy of Constraints.

Definition at line 235 of file violations.h.

#include <violations.h>

Public Member Functions

void initialize (const std::size_t number_of_levels, const std::vector< std::size_t > &number_of_constraints)
 Initialize violations. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="violations") const
 Log violations. More...
 
const ViolationsConstraintsoperator[] (const std::size_t level_index) const
 Access violations of a given level (const) More...
 
ViolationsConstraintsoperator[] (const std::size_t level_index)
 Access violations of a given level. More...
 
void reset ()
 Reset. More...
 
void setZero (const std::size_t level_index)
 Set violations of all constraints on the given level. More...
 
std::size_t size () const
 Size. More...
 

Private Attributes

std::vector< ViolationsConstraintsdata_
 

Member Function Documentation

◆ initialize()

void humoto::Violations::initialize ( const std::size_t  number_of_levels,
const std::vector< std::size_t > &  number_of_constraints 
)
inline

Initialize violations.

Parameters
[in]number_of_levelsnumber of levels
[in]number_of_constraintsnumber of constraints for each level

Definition at line 308 of file violations.h.

◆ log()

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

Log violations.

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

Definition at line 328 of file violations.h.

◆ operator[]() [1/2]

const ViolationsConstraints& humoto::Violations::operator[] ( const std::size_t  level_index) const
inline

Access violations of a given level (const)

Parameters
[in]level_indexindex of the level
Returns
reference to violations.

Definition at line 249 of file violations.h.

◆ operator[]() [2/2]

ViolationsConstraints& humoto::Violations::operator[] ( const std::size_t  level_index)
inline

Access violations of a given level.

Parameters
[in]level_indexindex of the level
Returns
reference to violations.

Definition at line 263 of file violations.h.

◆ reset()

void humoto::Violations::reset ( )
inline

Reset.

Definition at line 296 of file violations.h.

◆ setZero()

void humoto::Violations::setZero ( const std::size_t  level_index)
inline

Set violations of all constraints on the given level.

Parameters
[in]level_indexindex of the level

Definition at line 275 of file violations.h.

◆ size()

std::size_t humoto::Violations::size ( ) const
inline

Size.

Returns
Size

Definition at line 287 of file violations.h.

Member Data Documentation

◆ data_

std::vector< ViolationsConstraints > humoto::Violations::data_
private

Definition at line 238 of file violations.h.


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