Commit Graph

54 Commits (2d80c7c1cda6ef10d8d2600a7315a524d557bb7d)

Author SHA1 Message Date
Kai Ni 2d80c7c1cd optimize push_back function 2010-05-08 20:11:04 +00:00
Kai Ni 0142cc3d3f add nrKeys and set 2010-04-09 23:36:13 +00:00
Kai Ni 41c77ef421 remove column singletons in the factor graph 2010-04-03 03:36:10 +00:00
Kai Ni a647c84c16 added splitMinimumSpanningTree that uses DSF 2010-03-30 07:27:10 +00:00
Frank Dellaert 1cba03a490 Always do BOOST_FOREACH with a reference if you can! In this case, made a noticeable difference in performance by avoiding hundreds of thousands of mallocs. 2010-03-11 21:40:56 +00:00
Richard Roberts 74f8102d29 Fixed warnings 2010-03-08 14:06:07 +00:00
Kai Ni 67b4834bdb someone forgot to return it 2010-02-27 00:04:51 +00:00
Frank Dellaert 38ed1a5cdd more compulsive checking, more efficient removing 2010-02-26 05:29:45 +00:00
Frank Dellaert 51281ea78f in-place colamd 2010-02-24 06:13:11 +00:00
Richard Roberts 4408eaf6f4 Added FactorGraph::checkGraphConsistency() to check for consistency between the variables->factors and factors->variables maps, and a unit test that tests the replace function including checking consistency. 2010-02-13 01:29:19 +00:00
Richard Roberts fbef948254 Bug fix in replace() 2010-02-08 22:22:38 +00:00
Richard Roberts 5367e5a157 All std::map<Symbol,T> are now SymbolMap<T>, which is just a thin wrapper around std::map. at(Key) is used instead of first checking with find when an exception should be thrown for non-existent keys. This does not change any behavior or timing currently. This check-in also includes some functions in BayesTree for gathering clique statistics. 2010-01-22 04:41:40 +00:00
Richard Roberts 2507b6aaca Cleaned up commented line after fix to use the colamd ordering. 2010-01-19 03:16:09 +00:00
Richard Roberts 0311d2a2a2 Very very small change :-) 2010-01-19 02:57:08 +00:00
Kai Ni 05b07d443e add linear system solver as a template class parameter in nonlinear optimizer. 2010-01-18 05:51:19 +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
Chris Beall a956c1a8be svn restored from 1733.
this commit updates gtsam to version 1774, which now appears as 1734.
2010-01-16 01:16:59 +00:00
Frank Dellaert 53a03a0021 Changed signature of tree insert 2010-01-14 16:05:04 +00:00
Kai Ni 1519d029dc use PredecessorMap instead of map<Key,Key> 2010-01-14 05:24:20 +00:00
Kai Ni 68d90772e6 ordering is fixed 2010-01-14 03:21:07 +00:00
Kai Ni 63440f937f almost fixed oredering except one function call 2010-01-14 02:07:14 +00:00
Kai Ni 3c66861790 fix the graph related functions in FactorGraph as well as its unit tests 2010-01-13 23:59:46 +00:00
Frank Dellaert 93465945e9 Large gtsam refactoring
To support faster development *and* better performance Richard and I pushed through a large refactoring of NonlinearFactors.

The following are the biggest changes:

1) NonLinearFactor1 and NonLinearFactor2 are now templated on Config, Key type, and X type, where X is the argument to the measurement function.

2) The measurement itself is no longer kept in the nonlinear factor. Instead, a derived class (see testVSLAMFactor, testNonlinearEquality, testPose3Factor etc...) has to implement a function to compute the errors, "evaluateErrors". Instead of (h(x)-z), it needs to return (z-h(x)), so Ax-b is an approximation of the error. IMPORTANT: evaluateErrors needs - if asked - *combine* the calculation of the function value h(x) and the derivatives dh(x)/dx. This was a major performance issue. To do this, boost::optional<Matrix&> arguments are provided, and tin EvaluateErrors you just  says something like

	if (H) *H = Matrix_(3,6,....);

3) We are no longer using int or strings for nonlinear factors. Instead, the preferred key type is now Symbol, defined in Key.h. This is both fast and cool: you can construct it from an int, and cast it to a strong. It also does type checking: a Symbol<Pose3,'x'> will not match a Symbol<Pose2,'x'>

4) minor: take a look at LieConfig.h: it help you avoid writing a lot of code bu automatically creating configs for a certain type. See e.g. Pose3Config.h. A "double" LieConfig is on the way - Thanks Richard and Manohar !
2010-01-13 22:25:03 +00:00
Kai Ni 4369cd2d92 1) add a compose function that compose all the poses in a factor graph given the spanning tree
2) add a new graph-inl.h which takes care of all the boost graph related functions to prevent the copy and paste across several classes
2010-01-12 16:12:25 +00:00
Kai Ni 6a7987fa91 fix Pose2Prior problem and adding prior factor when splitting factor graph 2010-01-09 23:39:11 +00:00
Kai Ni d4f92c7bb6 pass FactorGraph as reference into split 2010-01-08 20:27:10 +00:00
Kai Ni 06b7f8ee04 add split to FactorGraph 2010-01-08 19:07:46 +00:00
Richard Roberts 19a3e228d7 Large refactoring - made several Lie group functions global, which used to be member functions, to treat Lie groups more uniformly. Also created Lie.h, and a preprocessor flag in numericalDerivative to change the coordinate frame derivatives are reported in. gtsam and easylib build and pass unit tests, but this will probably break other projects, which will require a few small changes to work again. Email coming in a few minutes to describe the changes. 2010-01-08 00:40:17 +00:00
Kai Ni 6298a45050 use prim algorithm instead of kruskal for finding MST, which yields the parent map. 2010-01-07 06:25:54 +00:00
Kai Ni 9845a5ae37 add findMinimumSpanningTree to FactorGraph 2010-01-06 11:15:37 +00:00
Frank Dellaert d0b757da48 remove method to set factor to NULL 2009-12-20 21:21:01 +00:00
Richard Roberts ff817551de Added FactorGraph::replace(index, factor) to replace one factor with another (used in FrameSLAM). 2009-12-18 00:13:38 +00:00
Viorela Ila 8a9f05059c implement getOrdering_ to work in matlab 2009-12-11 22:53:48 +00:00
Frank Dellaert 715dc4474d functional STL magic 2009-11-20 14:18:26 +00:00
Frank Dellaert b2eee54b5a push_back an entire factor graph 2009-11-19 06:34:07 +00:00
Michael Kaess f56bf8c79f added missing include to satisfy stricter compiler; added isam test file 2009-11-17 21:47:42 +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
Richard Roberts e2414561be Merged r895:900 from branch weightedQR - LinearFactorGraph now has sigmas and ConditionalGaussian now has precisions 2009-11-04 20:59:16 +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 94da98411c Fixed NULL problem 2009-10-27 20:22:02 +00:00