Commit Graph

13 Commits (760f61ce4bfcc9730a62dacdde9d0c75b23787eb)

Author SHA1 Message Date
Kai Ni 31999ecb1f added 4-way symbolic factor
fixed a bug in the bayes tree to graphviz routine
2010-02-09 22:59:18 +00:00
Richard Roberts 19dc8bf4b1 Fixed size() crash when BayesTree empty, added clear() function to BayesTree, added and removed #includes to fix link errors 2010-01-20 04:23:35 +00:00
Richard Roberts aef0b42562 Refactoring to use a new Symbol key instead of strings in Bayes*, Gaussian*, Ordering, Symbolic*, VectorConfig. Renamed existing type-checking key Symbol<C,T> to TypedSymbol<C,T> 2010-01-17 19:34:57 +00:00
Frank Dellaert d362fa13d8 print is more intuitive using reverse order 2009-12-20 11:56:33 +00:00
Richard Roberts e43548d03a A couple more "missing" .hpp files for newer gcc :-) 2009-12-08 22:49:57 +00:00
Frank Dellaert f677341108 Moved inference methods to new compilation unit. Added [factor], and [marginalize] now returns a factor graph. 2009-11-12 04:56:30 +00:00
Frank Dellaert a3de1964d7 BIG CHANGE:
1) eliminate methods no longer return a shared pointer. Shared pointers are good for Factors and Conditionals (which are also non-copyable), because these are often passed around under the hood. However, a BayesNet is simple a list of shared pointers and hence does not cost a lot to return as an object (which is compiler-optimized anyway: there is no copy). So, the signature of all eliminate methods changed to simply return a BayesNet<> object (not a shared pointer).

2) GaussianBayesNet::optimize is now replaced by optimize(GaussianBayesNet) and returns a VectorConfig and not a shared pointer

3) GaussianBayesNet and SymbolicBayesNet are now simply typedefs, not derived classes. This is desirable because the BayesTree class uses templated methods that return BayesNet<Conditional>, not a specific BayesNet derived class.
2009-11-09 07:04:26 +00:00
Frank Dellaert 10e618f360 New function marginals. Also: combine entire Bayes nets with push_back and push_front. And finally: some convenience constructors in GaussianBayesNet. 2009-11-08 22:50:26 +00:00
Frank Dellaert df3e5f2416 BIG: eliminate and eliminateOne now doubly templated functions, not methods.
Minor: Standardized on new shared_ptr naming convention:
shared_factor -> sharedFactor
conditional_ptr -> sharedConditional
node_ptr -> sharedClique
2009-11-07 19:31:39 +00:00
Frank Dellaert e9d942f81e BayesNet is now list-based for fast bi-directional access
SLOW O(n) random access operator[key] provided 
(should maybe be called [at] as it does bounds checking)
I also fixed a bug in equals.
2009-11-03 06:29:56 +00:00
Frank Dellaert eab038651e Renamed BayesNet::insert -> push_back. BayesTree now uses Bayes nets as nodes. 2009-11-02 05:17:44 +00:00
Frank Dellaert a8d267c4ca Small change necessitating lots of edits: Conditionals now include key of random variable
This simplifies Bayes nets quite a bit. Also created a Conditional base class, derived classes ConditionalGaussian and SymbolicConditional
Finally, some changes were needed because I moved some headers to .cpp
2009-11-02 03:50:30 +00:00
Frank Dellaert 943b692a6b BIG CHANGE: I got rid of the BayesChain/ChordalBayesNet classes and we now simply have a BayesNet class. It will just happen to be chordal when it is the result of an elimination. This will simplify a lot of things.
The main renaming that happened is

BayesChain -> BayesNet
ChordalBayesNet -> GaussianBayesNet == BayesNet<ConditionalGaussian>
SymbolicBayesChain -> SymbolicBayesNet == BayesNet<SymbolicConditional>
2009-10-31 19:53:20 +00:00