#include <dai/emalg.h>
Iterator interface | |
typedef std::vector < SharedParameters >::iterator | iterator |
Iterator over the parameter estimation tasks. | |
typedef std::vector < SharedParameters > ::const_iterator | const_iterator |
Constant iterator over the parameter estimation tasks. | |
iterator | begin () |
Returns iterator that points to the first parameter estimation task. | |
const_iterator | begin () const |
Returns constant iterator that points to the first parameter estimation task. | |
iterator | end () |
Returns iterator that points beyond the last parameter estimation task. | |
const_iterator | end () const |
Returns constant iterator that points beyond the last parameter estimation task. | |
Public Member Functions | |
MaximizationStep () | |
Default constructor. | |
MaximizationStep (std::vector< SharedParameters > &maximizations) | |
Construct MaximizationStep from a vector of parameter estimation tasks. | |
MaximizationStep (std::istream &is, const FactorGraph &fg_varlookup) | |
Constructor from an input stream and a corresponding factor graph. | |
void | addExpectations (InfAlg &alg) |
Collect the beliefs from this InfAlg as expectations for the next Maximization step. | |
void | maximize (FactorGraph &fg) |
Using all of the currently added expectations, make new factors with maximized parameters and set them in the FactorGraph. | |
Private Attributes | |
std::vector< SharedParameters > | _params |
Vector of parameter estimation tasks of which this maximization step consists. |
typedef std::vector<SharedParameters>::iterator dai::MaximizationStep::iterator |
Iterator over the parameter estimation tasks.
typedef std::vector<SharedParameters>::const_iterator dai::MaximizationStep::const_iterator |
Constant iterator over the parameter estimation tasks.
dai::MaximizationStep::MaximizationStep | ( | ) | [inline] |
Default constructor.
dai::MaximizationStep::MaximizationStep | ( | std::vector< SharedParameters > & | maximizations | ) | [inline] |
Construct MaximizationStep from a vector of parameter estimation tasks.
dai::MaximizationStep::MaximizationStep | ( | std::istream & | is, | |
const FactorGraph & | fg_varlookup | |||
) |
Constructor from an input stream and a corresponding factor graph.
void dai::MaximizationStep::addExpectations | ( | InfAlg & | alg | ) |
Collect the beliefs from this InfAlg as expectations for the next Maximization step.
void dai::MaximizationStep::maximize | ( | FactorGraph & | fg | ) |
Using all of the currently added expectations, make new factors with maximized parameters and set them in the FactorGraph.
iterator dai::MaximizationStep::begin | ( | ) | [inline] |
Returns iterator that points to the first parameter estimation task.
const_iterator dai::MaximizationStep::begin | ( | ) | const [inline] |
Returns constant iterator that points to the first parameter estimation task.
iterator dai::MaximizationStep::end | ( | ) | [inline] |
Returns iterator that points beyond the last parameter estimation task.
const_iterator dai::MaximizationStep::end | ( | ) | const [inline] |
Returns constant iterator that points beyond the last parameter estimation task.
std::vector<SharedParameters> dai::MaximizationStep::_params [private] |
Vector of parameter estimation tasks of which this maximization step consists.