Commit Graph

30 Commits (4200271cf4bd381b62012bb4c33e483a3f8a767d)

Author SHA1 Message Date
Richard Roberts 53af03368f Fixed indentation 2009-12-07 22:51:49 +00:00
Frank Dellaert 9bac438dbe Play nice with BOOST_FOREACH: non-const begin/end. Also removed buggy clear(). 2009-11-23 05:27:19 +00:00
Frank Dellaert d234365d53 involves is const 2009-11-20 14:17:52 +00:00
Frank Dellaert 55e85fd8a5 [involves] checks whether variable with that key is involved in any factor 2009-11-20 05:14:34 +00:00
Frank Dellaert b2eee54b5a push_back an entire factor graph 2009-11-19 06:34:07 +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 8d2d48d252 made removeAndCombineFactors a function, not a method 2009-11-11 05:12:45 +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 532be063f9 new templated function combine 2009-11-08 02:50:19 +00:00
Frank Dellaert cc5a2c3183 Renamed double-templated functions to _eliminate and _eliminateOne, and created FactorGraph-specific eliminateOne methods to make life easier 2009-11-07 21:03:30 +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 7f516394df Added dummy argument to work around compile conundrum 2009-11-05 06:30:10 +00:00
Frank Dellaert 3d334401f5 Constructor from BayesNet now in FactorGraph base class
FactorGraph::eliminate
Removed eliminate_partially
2009-11-05 04:56:59 +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 80b162a412 LinearFactorGraph::eliminate_one is now FactorGraph::eliminateOne<ConditionalGaussian>
Symbolic version FactorGraph::eliminateOne<SymbolicConditional> also implemented and tested
2009-10-29 14:34:34 +00:00
Frank Dellaert a513ae0287 Changed names and moved two LinearFactorGraph functions to FactorGraph
Added SymbolicFactorGraph compiulation unit and unit tests
Added symbolic combine constructor
2009-10-29 05:39:13 +00:00
Frank Dellaert f0c23a2828 Moved [factors] to FactorGraph 2009-10-29 04:49:13 +00:00
Frank Dellaert b6cee73571 Significant change: Made FactorGraph templated on Factor only, and moved error and probPrime to derived classes
Moved find_and_remove_factors to base class
Added and tested symbolic factor graph constructor and conversion from any factor graph type
2009-10-29 04:11:23 +00:00
Frank Dellaert 3b30fe50b0 Moved print and equals to -inl.h 2009-10-25 22:27:18 +00:00
Frank Dellaert 57bc102548 Equals now checks for NULLs 2009-10-25 14:25:17 +00:00
Frank Dellaert f54ba387fe FactorGraph, ChordalBayesNet, and ConditionalGaussian now Testable 2009-10-24 23:14:14 +00:00
Chris Beall baef89ccf0 updated find_factors_and_remove to use map of factor indices to gather factors connected to a variable. factors are set to null instead of being erased. also updated size() to count non-NULL factors, and print() to only print non-NULL factors. added new unit test which tries to remove the same variable twice. 2009-10-23 00:56:40 +00:00
Chris Beall 52bedcad3a order 1 factors by using map 2009-10-22 21:33:00 +00:00
Alex Cunningham 7d0a30c20f Renamed FGConfig to VectorConfig in gtsam, easylib, EasySLAM, and mast. 2009-10-14 20:39:59 +00:00
Frank Dellaert 989f290c99 '''BIG CHANGE''': avoid converting back and to FGConfigs by templating on configuration type. Details:
* Factors are now templated on the configuration type. Factor Graphs are now templated on the factor type and configuration type.
 * LinearFactor is a factor on an FGConfig.
 * LinearFactorGraph uses LinearFactor and FGConfig.
 * NonLinearFactor is still templated on Config.
 * NonLinearFactorGraph uses NonLinearFactors, but is still templated on Config.
 * Tests and VSLAMFactor have been updated to reflect those changes.
2009-10-06 18:25:04 +00:00
Frank Dellaert 68e20eec2c 2 BIG changes:
(1) FactorGraph and NonlinearOptimizer now no longer have a .cpp file, but a -inl.h file as in [http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml Google's C++ Style Guide]. This means if you expect to instantiate one of the functions in a cpp file, you have to include the -inl.h file.
(1) getOrdering is now in FactorGraph, and the non-linear version does *not* take a config anymore. 
Long version: I made this change because colamd works on the graph structure alone, and should not depend on the type of graph. Instead, because getOrdering happened to implemented in LinearFactorGraph first, the non-linear version converted to a linear factor graph (at the cost of an unnecessary linearization), and then threw all that away to call colamd. To implement this in a key-neutral way (a hidden agenda), i had to modify the keys_ type to a list, so a lot of changes resulted from that.
2009-09-13 04:13:03 +00:00
Frank Dellaert 92dbc8910e correct serialization of base classes
moved all serialize functions to bottom of class declaration
2009-08-31 04:13:57 +00:00
Frank Dellaert c69d8d9b36 Factor Graph serialization, and renaming of factors -> factors_ 2009-08-31 02:40:26 +00:00
Manohar Paluri 0b1b5eca67 Added const verifiers for member functions of the class which are compatible 2009-08-26 15:25:47 +00:00
Richard Roberts d80fa24a9f Fixing directory structure 2009-08-21 22:23:24 +00:00