Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LoopyBelief Class Reference

Classes

struct  StarGraph
 

Public Member Functions

DiscreteFactorGraph::shared_ptr iterate (const std::map< Key, DiscreteKey > &allDiscreteKeys)
 One step of belief propagation. More...
 
 LoopyBelief (const DiscreteFactorGraph &graph, const std::map< Key, DiscreteKey > &allDiscreteKeys)
 
void print (const std::string &s="") const
 print More...
 

Private Types

typedef std::map< Key, size_tCorrectedBeliefIndices
 
typedef std::map< Key, StarGraphStarGraphs
 

Private Member Functions

StarGraphs buildStarGraphs (const DiscreteFactorGraph &graph, const std::map< Key, DiscreteKey > &allDiscreteKeys) const
 

Private Attributes

StarGraphs starGraphs_
 star graph at each variable More...
 

Detailed Description

Loopy belief solver for graphs with only binary and unary factors

Definition at line 25 of file testLoopyBelief.cpp.

Member Typedef Documentation

typedef std::map<Key, size_t> LoopyBelief::CorrectedBeliefIndices
private

Star graph struct for each node, containing

  • the star graph itself
  • the product of original unary factors so we don't have to recompute it later, and
  • the factor indices of the corrected belief factors of the neighboring nodes

Definition at line 32 of file testLoopyBelief.cpp.

typedef std::map<Key, StarGraph> LoopyBelief::StarGraphs
private

Definition at line 57 of file testLoopyBelief.cpp.

Constructor & Destructor Documentation

LoopyBelief::LoopyBelief ( const DiscreteFactorGraph graph,
const std::map< Key, DiscreteKey > &  allDiscreteKeys 
)
inline

Constructor Need all discrete keys to access node's cardinality for creating belief factors TODO: so troublesome!!

Definition at line 65 of file testLoopyBelief.cpp.

Member Function Documentation

StarGraphs LoopyBelief::buildStarGraphs ( const DiscreteFactorGraph graph,
const std::map< Key, DiscreteKey > &  allDiscreteKeys 
) const
inlineprivate

Build star graphs for each node.

< access to all factors of each node

Definition at line 168 of file testLoopyBelief.cpp.

DiscreteFactorGraph::shared_ptr LoopyBelief::iterate ( const std::map< Key, DiscreteKey > &  allDiscreteKeys)
inline

One step of belief propagation.

Definition at line 79 of file testLoopyBelief.cpp.

void LoopyBelief::print ( const std::string &  s = "") const
inline

print

Definition at line 71 of file testLoopyBelief.cpp.

Member Data Documentation

StarGraphs LoopyBelief::starGraphs_
private

star graph at each variable

Definition at line 58 of file testLoopyBelief.cpp.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:48