Go to the documentation of this file.
58 template <
typename R,
typename T>
90 return std::static_pointer_cast<NonlinearFactor>(
103 const std::string &
s =
"",
106 std::cout <<
s << (
s !=
"" ?
" " :
"") <<
"FunctorizedFactor("
107 << keyFormatter(this->
key1()) <<
")" << std::endl;
109 std::cout <<
" noise model sigmas: " <<
noiseModel_->sigmas().transpose()
122 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
124 friend class boost::serialization::access;
125 template <
class ARCHIVE>
126 void serialize(ARCHIVE &ar,
const unsigned int ) {
128 ar &boost::serialization::make_nvp(
129 "NoiseModelFactor1", boost::serialization::base_object<Base>(*
this));
131 ar &BOOST_SERIALIZATION_NVP(
func_);
137 template <
typename R,
typename T>
139 :
public Testable<FunctorizedFactor<R, T>> {};
147 template <
typename T,
typename R,
typename FUNC>
163 template <
typename R,
typename T1,
typename T2>
199 return std::static_pointer_cast<NonlinearFactor>(
204 const T1 ¶ms1,
const T2 ¶ms2,
206 R x =
func_(params1, params2, H1, H2);
214 const std::string &
s =
"",
217 std::cout <<
s << (
s !=
"" ?
" " :
"") <<
"FunctorizedFactor2("
218 << keyFormatter(this->
key1()) <<
", "
219 << keyFormatter(this->
key2()) <<
")" << std::endl;
221 std::cout <<
" noise model sigmas: " <<
noiseModel_->sigmas().transpose()
234 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
236 friend class boost::serialization::access;
237 template <
class ARCHIVE>
238 void serialize(ARCHIVE &ar,
const unsigned int ) {
240 ar &boost::serialization::make_nvp(
241 "NoiseModelFactor2", boost::serialization::base_object<Base>(*
this));
243 ar &BOOST_SERIALIZATION_NVP(
func_);
249 template <
typename R,
typename T1,
typename T2>
251 :
public Testable<FunctorizedFactor2<R, T1, T2>> {};
259 template <
typename T1,
typename T2,
typename R,
typename FUNC>
const Symbol key1('v', 1)
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
std::shared_ptr< This > shared_ptr
Namespace containing all symbols from the Eigen library.
bool equals(const NonlinearFactor &other, double tol=1e-9) const override
Array< double, 1, 3 > e(1./3., 0.5, 2.)
double error(const Values &c) const override
Concept check for values that can be used in unit tests.
FunctorizedFactor2(Key key1, Key key2, const R &z, const SharedNoiseModel &model, const FunctionType func)
std::function< R(T1, T2, OptionalMatrixType, OptionalMatrixType)> FunctionType
virtual Vector evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
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
FunctorizedFactor< R, T > MakeFunctorizedFactor(Key key, const R &z, const SharedNoiseModel &model, const FUNC func)
bool equals(const NonlinearFactor &other, double tol=1e-9) const override
~FunctorizedFactor() override
SharedNoiseModel noiseModel_
noise model
static const SmartProjectionParams params
FunctionType func_
functor instance
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Vector evaluateError(const T ¶ms, OptionalMatrixType H) const override
FunctorizedFactor2< R, T1, T2 > MakeFunctorizedFactor2(Key key1, Key key2, const R &z, const SharedNoiseModel &model, const FUNC func)
~FunctorizedFactor2() override
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print
const Symbol key2('v', 2)
SharedNoiseModel noiseModel_
noise model
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
R measured_
value that is compared with functor return value
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
FunctorizedFactor(Key key, const R &z, const SharedNoiseModel &model, const std::function< R(T, OptionalMatrixType)> func)
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
noiseModel::Base::shared_ptr SharedNoiseModel
std::function< R(T, OptionalMatrixType)> func_
functor instance
noiseModel::Diagonal::shared_ptr model
const gtsam::Symbol key('X', 0)
Non-linear factor base classes.
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
Matrix * OptionalMatrixType
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
NonlinearFactor::shared_ptr clone() const override
std::uint64_t Key
Integer nonlinear key type.
NonlinearFactor::shared_ptr clone() const override
Rot2 R(Rot2::fromAngle(0.1))
R measured_
value that is compared with functor return value
Vector evaluateError(const T1 ¶ms1, const T2 ¶ms2, OptionalMatrixType H1, OptionalMatrixType H2) const override
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:19