27 #include <boost/bind.hpp> 28 #include <boost/make_shared.hpp> 32 class ExpressionFactorShallowTest;
59 boost::shared_ptr<internal::ExpressionNode<T> >
root_;
72 typedef boost::function<
76 template<
class A1,
class A2>
78 typedef boost::function<
83 template<
class A1,
class A2,
class A3>
85 typedef boost::function<
86 T(
const A1&,
const A2&,
const A3&,
110 template<
typename A1,
typename A2>
115 template<
typename A1,
typename A2,
typename A3>
126 template<
typename A1,
typename A2>
133 template<
typename A1,
typename A2,
typename A3>
135 T (A1::*method)(
const A2&,
const A3&,
146 std::set<Key>
keys()
const;
149 void dims(std::map<Key, int>& map)
const;
152 void print(
const std::string&
s)
const;
167 virtual boost::shared_ptr<Expression>
clone()
const {
168 return boost::make_shared<Expression>(*this);
172 const boost::shared_ptr<internal::ExpressionNode<T> >&
root()
const;
175 size_t traceSize()
const;
187 KeysAndDims keysAndDims()
const;
195 void* traceStorage)
const;
198 T valueAndJacobianMap(
const Values& values,
206 friend class ::ExpressionFactorShallowTest;
213 template <
typename T>
226 template <
typename T>
241 template <
typename T,
typename A>
261 template <
typename T>
272 template <
typename T>
278 template <
typename T>
281 return e1 + (-1.0) * e2;
298 std::vector<Expression<T> >
createUnknowns(
size_t n,
char c,
size_t start = 0);
void print(const Matrix &A, const string &s, ostream &stream)
std::pair< KeyVector, FastVector< int > > KeysAndDims
Keys and dimensions in same order.
boost::function< T(const A1 &, typename MakeOptionalJacobian< T, A1 >::type)> type
virtual boost::shared_ptr< Expression > clone() const
BOOST_CONCEPT_ASSERT((boost::RandomAccessRangeConcept< ListOfOneContainer< int > >))
JacobianMap for returning derivatives from expressions.
std::vector< Expression< T > > createUnknowns(size_t n, char c, size_t start)
Construct an array of leaves.
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
const mpreal root(const mpreal &x, unsigned long int k, mp_rnd_t r=mpreal::get_default_rnd())
Point2 operator*(double s, const Point2 &p)
multiply with scalar
Expression< T > type
Define type so we can apply it as a meta-function.
void g(const string &key, int i)
virtual ~Expression()
Destructor.
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
boost::shared_ptr< internal::ExpressionNode< T > > root_
unsigned __int64 uint64_t
Eigen::Triplet< double > T
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Expression(const boost::shared_ptr< internal::ExpressionNode< T > > &root)
Construct with a custom root.
BinarySumExpression< T > operator-(const Expression< T > &e1, const Expression< T > &e2)
Construct an expression that subtracts one expression from another.
Key symbol(unsigned char c, std::uint64_t j)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half & operator+=(half &a, const half &b)
Internals for Expression.h, not for general consumption.
std::vector< float > Values
boost::function< T(const A1 &, const A2 &, const A3 &, typename MakeOptionalJacobian< T, A1 >::type, typename MakeOptionalJacobian< T, A2 >::type, typename MakeOptionalJacobian< T, A3 >::type)> type
BinarySumExpression< T > operator+(const Expression< T > &e1, const Expression< T > &e2)
Expression()
Default constructor, for serialization.
boost::function< T(const A1 &, const A2 &, typename MakeOptionalJacobian< T, A1 >::type, typename MakeOptionalJacobian< T, A2 >::type)> type
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
Special class for optional Jacobian arguments.
The matrix class, also used for vectors and row-vectors.
Expression< T > linearExpression(const boost::function< T(A)> &f, const Expression< A > &expression, const Eigen::Matrix< double, traits< T >::dimension, traits< A >::dimension > &dTdA)
std::uint64_t Key
Integer nonlinear key type.