Friday, March 25, 2005

Factor Graphs, and message passing

* learned about template specialization (explicit). Seems useful, but not ideal. Note that this serves a different purpose than polymorphism, since it is done at compile-time vs. run-time.

* this template specialization can even be done with traits, and template arguments can have a default argument. (this is how nice things can be done)

* learned that virtual templated functions don't exist (CAN'T exist). However member templated functions are fine. Virtual functions inside templated class are also fine

* heard of the book "Modern C++ design"

* began work towards an implementation of message passing for Factor Graphs. The goal is to create an algorithm that will work independently of wether the is a Factor Graph or a MRF. For that I derived the base class Message Node; I use a virtual send_message. However due to problems much of the implementation is somehow ugly hacked into the visitor, which checks for the type of the node and then does the message passing accordingly.

* created new files "GraphAlgorithms.h" and "GraphAlgorithms.cc"

* some thinking about the implementation of Loopy Belief Propagation; seems not that easy with our current way of doing things

-> finish the implementation of Message passing for Factor graphs (compile; lots of work still)

-> run it, test

-> begin implementing Gibbs sampler for factor graphs.

No comments: