MAiNGO
maingo::ModelFunction Struct Reference

Struct for making work with the EvaluationContainer easier for the user and also to ensure backward compatibility. More...

#include <evaluationContainer.h>

Public Member Functions

 ModelFunction ()=default
 
 ~ModelFunction ()=default
 
 ModelFunction (const ModelFunction &)=default
 
 ModelFunction (ModelFunction &&)=default
 
ModelFunctionoperator= (const ModelFunction &)=default
 
ModelFunctionoperator= (ModelFunction &&)=default
 
 ModelFunction (const mc::FFVar var)
 Constructor with FFVar value only. More...
 
 ModelFunction (const mc::FFVar var, const std::string &str)
 Constructor with FFVar value and a name. More...
 
 ModelFunction (const std::vector< mc::FFVar > &vars)
 Constructor with vector of FFVar. More...
 
void clear ()
 Function deleting everything in the model function. More...
 
void push_back (const mc::FFVar var)
 Function for inserting a FFVar value at the end of the value vector. More...
 
void push_back (const mc::FFVar var, const std::string &str)
 Function for inserting a FFVar and a name at the end of the vectors. More...
 
void push_back (const std::vector< mc::FFVar > &vars)
 Function for inserting a vector of FFVar at the end of the value vector. More...
 
void push_back (const std::vector< mc::FFVar > &vars, const std::string &baseName)
 Function for inserting a vector of FFVar at the end of the value vector with names. More...
 
size_t size () const
 Function returning the size of the value vector. Note that value and name vectors have the same size at any time. More...
 
void resize (const size_t size)
 Function for resizing of the underlying vectors. More...
 
void set_value (const mc::FFVar var, const unsigned i)
 Function for seting FFVar value at a given index. More...
 
void set_name (const std::string str, const unsigned i)
 Function for seting name value at a given index. More...
 
ModelFunctionoperator= (const mc::FFVar var)
 = operator for backward compatibility More...
 
mc::FFVar & operator[] (const unsigned int i)
 [] operator for easier access to value vector More...
 
mc::FFVar & at (const unsigned int i)
 Function for accessing elements. More...
 
bool operator== (const ModelFunction &other) const
 Equality comparison operator. More...
 

Public Attributes

std::vector< std::string > name
 
std::vector< mc::FFVar > value
 

Detailed Description

Struct for making work with the EvaluationContainer easier for the user and also to ensure backward compatibility.

Constructor & Destructor Documentation

◆ ModelFunction() [1/6]

maingo::ModelFunction::ModelFunction ( )
default

◆ ~ModelFunction()

maingo::ModelFunction::~ModelFunction ( )
default

◆ ModelFunction() [2/6]

maingo::ModelFunction::ModelFunction ( const ModelFunction )
default

◆ ModelFunction() [3/6]

maingo::ModelFunction::ModelFunction ( ModelFunction &&  )
default

◆ ModelFunction() [4/6]

maingo::ModelFunction::ModelFunction ( const mc::FFVar  var)
inline

Constructor with FFVar value only.

◆ ModelFunction() [5/6]

maingo::ModelFunction::ModelFunction ( const mc::FFVar  var,
const std::string &  str 
)
inline

Constructor with FFVar value and a name.

◆ ModelFunction() [6/6]

maingo::ModelFunction::ModelFunction ( const std::vector< mc::FFVar > &  vars)
inline

Constructor with vector of FFVar.

Member Function Documentation

◆ at()

mc::FFVar& maingo::ModelFunction::at ( const unsigned int  i)
inline

Function for accessing elements.

◆ clear()

void maingo::ModelFunction::clear ( )
inline

Function deleting everything in the model function.

◆ operator=() [1/3]

ModelFunction& maingo::ModelFunction::operator= ( const ModelFunction )
default

◆ operator=() [2/3]

ModelFunction& maingo::ModelFunction::operator= ( ModelFunction &&  )
default

◆ operator=() [3/3]

ModelFunction& maingo::ModelFunction::operator= ( const mc::FFVar  var)
inline

= operator for backward compatibility

◆ operator==()

bool maingo::ModelFunction::operator== ( const ModelFunction other) const
inline

Equality comparison operator.

◆ operator[]()

mc::FFVar& maingo::ModelFunction::operator[] ( const unsigned int  i)
inline

[] operator for easier access to value vector

◆ push_back() [1/4]

void maingo::ModelFunction::push_back ( const mc::FFVar  var)
inline

Function for inserting a FFVar value at the end of the value vector.

◆ push_back() [2/4]

void maingo::ModelFunction::push_back ( const mc::FFVar  var,
const std::string &  str 
)
inline

Function for inserting a FFVar and a name at the end of the vectors.

◆ push_back() [3/4]

void maingo::ModelFunction::push_back ( const std::vector< mc::FFVar > &  vars)
inline

Function for inserting a vector of FFVar at the end of the value vector.

◆ push_back() [4/4]

void maingo::ModelFunction::push_back ( const std::vector< mc::FFVar > &  vars,
const std::string &  baseName 
)
inline

Function for inserting a vector of FFVar at the end of the value vector with names.

◆ resize()

void maingo::ModelFunction::resize ( const size_t  size)
inline

Function for resizing of the underlying vectors.

◆ set_name()

void maingo::ModelFunction::set_name ( const std::string  str,
const unsigned  i 
)
inline

Function for seting name value at a given index.

◆ set_value()

void maingo::ModelFunction::set_value ( const mc::FFVar  var,
const unsigned  i 
)
inline

Function for seting FFVar value at a given index.

◆ size()

size_t maingo::ModelFunction::size ( ) const
inline

Function returning the size of the value vector. Note that value and name vectors have the same size at any time.

Member Data Documentation

◆ name

std::vector<std::string> maingo::ModelFunction::name

vector holding possible function names

◆ value

std::vector<mc::FFVar> maingo::ModelFunction::value

vector holding the actual propagated FFVar values


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