AIToolbox
A library that offers tools for AI problem solving.
MaxPlus.hpp
Go to the documentation of this file.
1 #ifndef AI_TOOLBOX_FACTORED_BANDIT_MAX_PLUS_HEADER_FILE
2 #define AI_TOOLBOX_FACTORED_BANDIT_MAX_PLUS_HEADER_FILE
3 
7 
45  class MaxPlus {
46  public:
47  using Result = std::tuple<Action, double>;
48 
49  // Values of factor (in theory N dimensional matrix)
51 
57  MaxPlus(unsigned iterations = 10);
58 
85  Result operator()(const Action & A, const Graph & graph);
86 
90  unsigned getIterations() const;
91 
95  void setIterations(unsigned iterations);
96 
97  private:
98  unsigned iterations_;
99  };
100 }
101 
102 #endif
AIToolbox::Factored::Bandit::MaxPlus::setIterations
void setIterations(unsigned iterations)
This function sets the number of message passes to perform.
AIToolbox::Factored::Bandit::MaxPlus
This class represents the Max-Plus optimization algorithm for loopy FactorGraphs.
Definition: MaxPlus.hpp:45
Types.hpp
AIToolbox::Factored::Bandit::MaxPlus::Result
std::tuple< Action, double > Result
Definition: MaxPlus.hpp:47
AIToolbox::Factored::FactorGraph
This class offers a minimal interface to manager a factor graph.
Definition: FactorGraph.hpp:31
Core.hpp
AIToolbox::Factored::Bandit::MaxPlus::getIterations
unsigned getIterations() const
This function returns the currently set number of message passes to perform.
AIToolbox::Factored::Bandit::MaxPlus::operator()
Result operator()(const Action &A, const Graph &graph)
This function performs the actual MaxPlus algorithm.
FactorGraph.hpp
AIToolbox::Factored::Action
Factors Action
Definition: Types.hpp:69
AIToolbox::Factored::Bandit::MaxPlus::MaxPlus
MaxPlus(unsigned iterations=10)
Basic constructor.
AIToolbox::Factored::Bandit
Definition: GraphUtils.hpp:12