Class sdm::Variations

template <typename TFunction typename TFunction>

Class List > sdm > Variations

Iterator ofVariations .More...

  • #include <variations.hpp>

Public Functions

Type Name
Variations ()
constructor
Variations (const std::vector< std::vector< TItem >> & possible_values)
Variations (const std::vector< TKey > & possible_keys, const std::vector< std::vector< TItem >> & possible_values)
This constructor builds a default with the number of actions per agent. Notice that @key implements size_t size();.
std::shared_ptr< TFunction > begin ()
Pointer on the initial variation.
std::shared_ptr< TFunction > end ()
Pointer on the final variation.
std::shared_ptr< TFunction > make_output ()
destructor
std::shared_ptr< TFunction > next ()
Returns the next variation.
void setVariation (const std::vector< TKey > & possible_keys, const std::vector< std::vector< TItem >> & possible_values)
Sets attributes of the variation.

Protected Types

Type Name
typedef typename TFunction::output_type TItem
typedef typename TFunction::input_type TKey
typedef typename std::vector< TItem >::iterator iterator_t
typedef std::vector< iterator_t > super_iterator

Protected Attributes

Type Name
super_iterator current
int dimension
std::vector< TKey > p_keys_
std::vector< std::vector< TItem > > p_values_
std::shared_ptr< TFunction > vin
std::shared_ptr< TFunction > vout

Detailed Description

Template parameters:

  • TFunction type of the output function.

The public interface of output suggests that it possesses a construtor @output(arg1, arg3). In which, arg1 is the history keys and arg3 the actual decisions taken.

Public Functions Documentation

function Variations [1/3]

sdm::Variations::Variations () 

The default constructor.

function Variations [2/3]

sdm::Variations::Variations (
    const std::vector< std::vector< TItem >> & possible_values
) 

function Variations [3/3]

sdm::Variations::Variations (
    const std::vector< TKey > & possible_keys,
    const std::vector< std::vector< TItem >> & possible_values
) 

Parameters:

  • const key& information, i.e., the set of keys to prescribe actions
  • const std::vector<action>& is the number of actions per agent

function begin

std::shared_ptr< TFunction > sdm::Variations::begin () 

Returns:

generated variation.

function end

std::shared_ptr< TFunction > sdm::Variations::end () 

Returns:

generated variation.

function make_output

std::shared_ptr< TFunction > sdm::Variations::make_output () 

function next

std::shared_ptr< TFunction > sdm::Variations::next () 

Returns:

generated variation.

function setVariation

void sdm::Variations::setVariation (
    const std::vector< TKey > & possible_keys,
    const std::vector< std::vector< TItem >> & possible_values
) 

Parameters:

  • const key& information, i.e., the set of keys to prescribe actions
  • const std::vector<action>& is the number of actions per agent

Protected Types Documentation

typedef TItem

using sdm::Variations< TFunction >::TItem =  typename TFunction::output_type;

typedef TKey

using sdm::Variations< TFunction >::TKey =  typename TFunction::input_type;

typedef iterator_t

using sdm::Variations< TFunction >::iterator_t =  typename std::vector<TItem>::iterator;

typedef super_iterator

using sdm::Variations< TFunction >::super_iterator =  std::vector<iterator_t>;

Protected Attributes Documentation

variable current

super_iterator sdm::Variations< TFunction >::current;

variable dimension

int sdm::Variations< TFunction >::dimension;

variable p_keys_

std::vector<TKey> sdm::Variations< TFunction >::p_keys_;

variable p_values_

std::vector<std::vector<TItem> > sdm::Variations< TFunction >::p_values_;

variable vin

std::shared_ptr<TFunction> sdm::Variations< TFunction >::vin;

variable vout

std::shared_ptr<TFunction> sdm::Variations< TFunction >::vout;

The documentation for this class was generated from the following file src/sdm/core/variations.hpp