NonlinearEqualityConstraint-inl.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
18 #pragma once
19 
21 
22 namespace gtsam {
23 
24 /* ********************************************************************************************* */
25 template <typename T>
27  const T& rhs,
28  const Vector& sigmas)
29  : Base(constrainedNoise(sigmas), expression.keysAndDims().first),
30  expression_(expression),
31  rhs_(rhs),
32  dims_(expression.keysAndDims().second) {}
33 
34 /* ********************************************************************************************* */
35 template <typename T>
37  OptionalMatrixVecType H) const {
38  // Copy-paste from ExpressionFactor.
39  if (H) {
40  const T value = expression_.valueAndDerivatives(x, keys_, dims_, *H);
41  return -traits<T>::Local(value, rhs_);
42  } else {
43  const T value = expression_.value(x);
44  return -traits<T>::Local(value, rhs_);
45  }
46 }
47 
48 /* ********************************************************************************************* */
49 template <typename T>
51  return std::make_shared<ExpressionFactor<T>>(penaltyNoise(mu), rhs_, expression_);
52 }
53 
54 } // namespace gtsam
H
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
Definition: gnuplot_common_settings.hh:74
test_constructor::sigmas
Vector1 sigmas
Definition: testHybridNonlinearFactor.cpp:52
mu
double mu
Definition: testBoundingConstraint.cpp:37
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
NonlinearEqualityConstraint.h
Nonlinear equality constraints in constrained optimization.
gtsam::NoiseModelFactor::shared_ptr
std::shared_ptr< This > shared_ptr
Definition: NonlinearFactor.h:210
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:39
gtsam::Expression
Definition: Expression.h:49
gtsam::ExpressionEqualityConstraint::unwhitenedError
virtual Vector unwhitenedError(const Values &x, OptionalMatrixVecType H=nullptr) const override
Definition: NonlinearEqualityConstraint-inl.h:36
Eigen::Triplet< double >
gtsam::OptionalMatrixVecType
std::vector< Matrix > * OptionalMatrixVecType
Definition: NonlinearFactor.h:62
gtsam
traits
Definition: SFMdata.h:40
gtsam::traits
Definition: Group.h:36
gtsam::NoiseModelFactor
Definition: NonlinearFactor.h:198
gtsam::Values
Definition: Values.h:65
gtsam::ExpressionEqualityConstraint::ExpressionEqualityConstraint
ExpressionEqualityConstraint(const Expression< T > &expression, const T &rhs, const Vector &sigmas)
Constructor.
Definition: NonlinearEqualityConstraint-inl.h:26
gtsam::ExpressionEqualityConstraint::penaltyFactor
virtual NoiseModelFactor::shared_ptr penaltyFactor(const double mu=1.0) const override
Definition: NonlinearEqualityConstraint-inl.h:50
test_callbacks.value
value
Definition: test_callbacks.py:162


gtsam
Author(s):
autogenerated on Wed Mar 19 2025 03:02:33