Commit Graph

128 Commits (8846324b34e09392aaa2e25b9882251e423b0fad)

Author SHA1 Message Date
Varun Agrawal cf0c8d2fee fix VectorValues include 2021-11-11 15:45:27 -05:00
Varun Agrawal b82acc133b properly deprecate additional methods to fully finish deprecation 2021-11-11 14:24:15 -05:00
Varun Agrawal 5051f19f30 properly deprecate eliminate functions 2021-11-09 18:25:42 -05:00
Varun Agrawal 2307fc7fa2 add printErrors method to GaussianFactorGraph 2021-11-04 17:50:12 -04:00
Gerry Chen 53261a5e16 auto and reserve fewer 2021-01-27 16:58:05 -05:00
Gerry Chen 2590b3b980 replace sparseJacobian with "fast" version 2021-01-27 15:25:01 -05:00
Gerry Chen 8063b9ae95 disambiguate double template >> 2021-01-27 10:58:26 -05:00
Gerry Chen a17bd5c6d5 remove InPlace jacobian from .h file 2021-01-27 10:44:31 -05:00
Gerry Chen dcf8a52b8b remove unnecessary function overloads and typedefs 2021-01-27 10:27:32 -05:00
Gerry Chen fd2d8a236a remove templating while maintaining efficiency
Templating still used in cpp file for generic-ness, but not exposed
anymore

std::tuple has the same performance as Eigen::Triplet, but boost::tuple
is slower.  Sparse matrix indices are int instead of size_t for
efficiency (e.g. A(i, j) = s  ->  i/j are int's instead of size_t's)
2021-01-20 17:01:15 -05:00
Gerry Chen 286898a847 move SparseMatrixBoostTriplets typedef to gfg 2021-01-20 12:25:20 -05:00
Gerry Chen e3dd22925a more generic sparseJacobianInPlace function 2021-01-19 20:25:57 -05:00
Gerry Chen 7a6f632f4c add generic optional parameters to sparseJacobian
Also, the unit test changed due to a 0 entry that was previously wrongly
included in the b-column of the sparse representation.
2021-01-19 16:59:12 -05:00
Gerry Chen ada83d92dc minor efficiency modifications 2021-01-19 14:38:10 -05:00
Fan Jiang f73429133a Switched to in-place update of the diagonal Hessian 2020-06-02 12:44:57 -04:00
Gerry Chen 8e62a1405e deprecated functions for backwards compatibility
also removed some edits that were tangential to the PR.
2019-10-28 17:41:16 -04:00
Gerry Chen 1733f3ac98 convert all optional Ordering to function overloads
compiles and passes tests, but some potentially code-breaking changes in:
Marginals.h - order of arguments had to change since `factorization` has a default value
EliminatableFactorGraph.h - marginalMultifrontalBayesNet and marginalMultifrontalBayesTree no longer accept `boost::none` as a placeholder to specify later arguments
Notes:
EliminateableFactorGraph.h - `orderingType` is no longer needed in function overloads that specify ordering, but I left it for the time being to avoid potential code breaking
2019-10-20 01:15:20 -04:00
Gerry Chen 5a358489dc Some low hanging fruit changing `func(..., boost::optional<const Class &>)` to overloaded
`func(...)` and
`func(..., const Class &)`
not all done
Also, although it currently passes all tests, I think some more tests may be needed...
2019-10-13 23:59:50 -04:00
Frank Dellaert 35d8ebca22 use emplace where possible 2019-04-10 22:34:01 -04:00
Abe fbe9aac41c squash local changes on top of gtsam upstream pull from 6/14/2016 2016-06-18 23:13:59 -07:00
yao a0661b3813 Almost done. Still need to figure out how to remove the remaining 3 occurrences. 2016-05-21 12:44:46 -04:00
Frank 0372a959ee Many small improvements, bug-fixes, and tests 2016-02-24 11:01:19 -08:00
dellaert 128bac616c Globally replaced FastSet<Key> with KeySet. 2015-06-20 18:38:25 -07:00
Mike Bosse 0550932235 fixed sparseJacobian() to use a std::map such that it works with symbol keys 2015-03-04 11:12:16 +01:00
Sungtae An e13243b140 Merge branch 'develop' into feature/RegularFactors
Conflicts:
	gtsam/linear/GaussianFactorGraph.cpp
	gtsam/linear/JacobianFactor.cpp
	gtsam/linear/JacobianFactor.h
	tests/testPreconditioner.cpp
2015-01-01 17:50:27 -05:00
thduynguyen 0576aac69b remove support for special EliminatePreferCholesky to deal with Indeterminant exception arising from multiplied Hessian terms of nonlinear equality constraints. 2014-12-12 22:08:09 -05:00
krunalchande da318184ae sync with develop branch commit c1f048d 2014-12-12 18:46:54 -05:00
krunalchande e539738fd0 Remove support for dual keys. Added finished() after all matrices and vectors. Remove buildDualGraph from GaussianFactorGraph. Remove support for multipliedHessians for non-linear equality constraints. 2014-12-12 17:23:31 -05:00
Sungtae An 0a1e844ae5 Clean up 2014-12-08 00:44:36 -05:00
dellaert a9e3545a29 Merge remote-tracking branch 'origin/release/3.2.0' into feature/quadratic_programming
This should make merging in develop easier, and it also helps me understand what changed.
I mostly avoided conflicts by keeping Duy's versions of:

Conflicts:
	gtsam/3rdparty/metis-5.1.0/CMakeLists.txt
	gtsam/linear/JacobianFactor-inl.h
	gtsam/linear/NoiseModel.cpp
	gtsam/nonlinear/NonlinearFactor.h

and a number of other files. In particular, I did not upgrade Eigen or remove metis.

The following unit tests fail in this branch:

The following tests FAILED:
	  2 - testWrap (Failed)
	 85 - testGeneralSFMFactor (SEGFAULT)
	142 - testIMUSystem (Failed)
	178 - testTSAMFactors (Failed)
2014-11-22 15:18:09 +01:00
Sungtae An a143815e79 Comment out raw memory access parts 2014-11-12 04:18:49 -05:00
cbeall3 699153ece9 Coding convention: convert tabs to two spaces 2014-10-30 12:44:46 -04:00
thduynguyen 78d9a8cab8 fix empty factors bug 2014-09-25 11:18:51 -04:00
thduynguyen 11969b32f6 fix gradient and gradientAtZero for linear constrained Jacobian, optionally scaled by the dual variables 2014-09-24 22:19:47 -04:00
thduynguyen 20fb8ab77d Build a dual graph to compute dual values for equality constrained factors 2014-09-13 01:36:04 -04:00
thduynguyen 6d697f2c92 heuristic in EliminationPreferCholesky to work around the Indeterminant exception while solving linear constrained systems.
Instead of turning Hessian factors into Jacobian factors -- so that they can be eliminated with constrained Jacobian factors using the special QR in Constrained's noise model -- we combine all Hessian factors, eliminate the variable first to have a conditional and a new factor 1, then combine the constrained Jacobians with this conditional (also a Jacobian) to eliminate again, producing the final conditional, and a new factor 2. The two new factors are then combined into a new Hessian factor to be returned.
2014-09-11 14:51:35 -04:00
thduynguyen 2895b0515c Support non positive definite Hessian factors while doing EliminatePreferCholesky with some constrained factors.
Currently, when eliminating a constrained variable, EliminatePreferCholesky converts every other factors to JacobianFactor before doing the special QR factorization for constrained variables. Unfortunately, after a constrained nonlinear graph is linearized, new hessian factors from constraints, multiplied with the dual variable  (-lambda*\hessian{c} terms in the Lagrangian objective function), might become negative definite, thus cannot be converted to JacobianFactors.

Following EliminateCholesky, this version of EliminatePreferCholesky for constrained var gathers all unconstrained factors into a big joint HessianFactor before converting it into a JacobianFactor to be eliminiated by QR together with the other constrained factors.

Of course, this might not solve the non-positive-definite problem entirely, because (1) the original hessian factors might be non-positive definite and (2) large strange value of lambdas might cause the joint factor non-positive definite [is this true?]. But at least, this will help in typical cases.
2014-08-06 11:09:25 -04:00
cbeall3 de63d1981c Windows: Fix for discarding const qualifiers 2014-06-20 11:57:48 -04:00
Yong-Dian Jian e8d3809917 add new generic pcgsolver and preconditioner classes
add a unit test for the PCGSolver class
2014-06-08 00:34:23 -04:00
cbeall3 7f32fe3ea0 fix warning 2014-05-30 16:30:46 -04:00
Zsolt Kira a95126599f Fix LM behavior when GaussianFactorGraph is subclassed. Use clone method instead of assignment to local GaussianFactorGraph when creating damped system. 2014-04-24 09:47:48 -04:00
hchiu b464b808ef First cut on raw MultiplyHessianAdd for HessianFactor and JacobianFactor. Unit test is passed in testGaussianFactorGraphUnordered (multiplyHessianAdd3). Note the interface currently needs the accumulated diminsions of key variables. See GaussianFactorGraph::multiplyHessianAdd(double alpha,const double* x, double* y). 2014-03-04 01:58:34 -05:00
Luca e789553261 bug fix: hessianDiagonal seg-faulted with NULL factors 2014-02-15 16:48:15 -05:00
dellaert 2865aab027 Working and tested implementation of hessianBlockDiagonal 2014-02-14 13:47:47 -05:00
dellaert 76959d4d18 Added hessianDiagonal; works for Gaussian factor graphs with JacobianFactors 2014-02-14 01:14:32 -05:00
dellaert 4b7de1abb8 Formatting only 2014-02-13 20:28:37 -05:00
Alex Cunningham e3208a1f8e Added negate() and clone() to GaussianFactorGraph 2013-11-07 15:29:38 +00:00
Frank Dellaert 4591835223 gradientAtZero is now implemented in the fcators (Richard says, need to work on efficiency) 2013-10-29 03:42:33 +00:00
Frank Dellaert 7c3131b533 Made multiplyHessian into multiplyHessianAdd 2013-10-27 14:58:51 +00:00
Pablo Fernandez Alcantarilla 6a383799d7 Skeleton code for GaussianFactorGraph::multiplyHessian 2013-10-24 15:52:32 +00:00