Go to the documentation of this file.
64 template<
typename A1,
typename A2>
74 template<
typename A1,
typename A2,
typename A3>
80 expression2, expression3)) {
90 std::placeholders::_1,
std::placeholders::_2),
96 template<
typename A1,
typename A2>
103 std::bind(method,
std::placeholders::_1,
104 std::placeholders::_2,
std::placeholders::_3,
105 std::placeholders::_4),
106 expression1, expression2)) {
111 template<
typename A1,
typename A2,
typename A3>
113 T (
A1::*method)(
const A2&,
const A3&,
120 std::bind(method,
std::placeholders::_1,
121 std::placeholders::_2,
std::placeholders::_3,
122 std::placeholders::_4,
std::placeholders::_5,
123 std::placeholders::_6),
124 expression1, expression2, expression3)) {
129 return root_->keys();
144 std::vector<Matrix>*
H)
const {
147 const auto [
keys, dims] = keysAndDims();
148 return valueAndDerivatives(
values,
keys, dims, *
H);
151 return root_->value(
values);
170 std::vector<Matrix>&
H)
const {
178 Ab.matrix().setZero();
200 return std::unique_ptr<internal::ExecutionTraceStorage[]>(
209 const size_t size = traceSize();
216 T value(this->traceExecution(
values, trace,
reinterpret_cast<char *
>(traceStorage.get())));
221 }
catch (
const std::bad_alloc &
e) {
222 std::cerr <<
"valueAndJacobianMap exception: " <<
e.what() <<
'\n';
230 std::map<Key, int> map;
232 size_t n = map.size();
235 auto key_it = pair.first.begin();
236 auto dim_it = pair.second.begin();
237 for (
const auto& [
key,
value] : map) {
252 return x.compose(
y, H1, H2);
261 if (H1) H1->setConstant(
y);
262 if (H2) H2->setConstant(
x);
277 std::placeholders::_2, std::placeholders::_3,
278 std::placeholders::_4),
279 expression1, expression2);
285 std::vector<Expression<T> > unknowns;
287 for (
size_t i = start;
i < start +
n;
i++)
292 template <
typename T>
297 template <
typename T>
301 template <
typename T>
303 root_ = std::make_shared<internal::BinarySumNode<T>>(*
this,
e);
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
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
BinarySumExpression(const Expression< T > &e1, const Expression< T > &e2)
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
static const unsigned TraceAlignment
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
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
void startReverseAD1(JacobianMap &jacobians) const
std::pair< KeyVector, FastVector< int > > KeysAndDims
Keys and dimensions in same order.
std::unique_ptr< internal::ExecutionTraceStorage[]> allocAligned(size_t size)
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
std::aligned_storage< 1, TraceAlignment >::type ExecutionTraceStorage
Key symbol(unsigned char c, std::uint64_t j)
std::vector< Expression< T > > createUnknowns(size_t n, char c, size_t start)
Construct an array of leaves.
Expression()
Default constructor, for serialization.
double operator()(const double &x, const double &y, OptionalJacobian< 1, 1 > H1={}, OptionalJacobian< 1, 1 > H2={}) const
T operator()(const T &x, const T &y, OptionalJacobian< Dim, Dim > H1={}, OptionalJacobian< Dim, Dim > H2={}) const
void dims(std::map< Key, int > &map) const
Return dimensions for each argument, as a map.
const gtsam::Symbol key('X', 0)
size_t traceSize() const
Return size needed for memory buffer in traceExecution.
ptrdiff_t DenseIndex
The index type for Eigen objects.
T traceExecution(const Values &values, internal::ExecutionTrace< T > &trace, char *traceStorage) const
trace execution, very unsafe
unsigned __int64 uint64_t
std::uint64_t Key
Integer nonlinear key type.
Expression< T > & operator+=(const Expression< T > &e)
Add another expression to this expression.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:31