dai::greedyVariableElimination Class Reference

Helper object for dai::ClusterGraph::VarElim(). More...

#include <dai/clustergraph.h>

List of all members.

Public Types

typedef size_t(* eliminationCostFunction )(const ClusterGraph &, size_t)
 Type of cost functions to be used for greedy variable elimination.

Public Member Functions

 greedyVariableElimination (eliminationCostFunction h)
 Construct from cost function.
size_t operator() (const ClusterGraph &cl, const std::set< size_t > &remainingVars)
 Returns the best variable from remainingVars to eliminate in the cluster graph cl by greedily minimizing the cost function.

Private Attributes

eliminationCostFunction heuristic
 Pointer to the cost function used.


Detailed Description

Helper object for dai::ClusterGraph::VarElim().

Chooses the next variable to eliminate greedily by taking the one that minimizes a given heuristic cost function.


Member Typedef Documentation

Type of cost functions to be used for greedy variable elimination.


Constructor & Destructor Documentation

dai::greedyVariableElimination::greedyVariableElimination ( eliminationCostFunction  h  )  [inline]

Construct from cost function.

Note:
Examples of cost functions are eliminationCost_MinFill() and eliminationCost_WeightedMinFill().


Member Function Documentation

size_t dai::greedyVariableElimination::operator() ( const ClusterGraph cl,
const std::set< size_t > &  remainingVars 
)

Returns the best variable from remainingVars to eliminate in the cluster graph cl by greedily minimizing the cost function.

This function calculates the cost for eliminating each variable in remaingVars and returns the variable which has lowest cost.


Member Data Documentation

Pointer to the cost function used.


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

Generated on Thu Aug 5 19:04:04 2010 for libDAI by  doxygen 1.5.5