diff --git a/gtsam_unstable/nonlinear/Expression.h b/gtsam_unstable/nonlinear/Expression.h index 0d326dffe..eb270ae1b 100644 --- a/gtsam_unstable/nonlinear/Expression.h +++ b/gtsam_unstable/nonlinear/Expression.h @@ -20,6 +20,7 @@ #pragma once #include "Expression-inl.h" +#include #include namespace gtsam { @@ -36,11 +37,21 @@ public: root_(new ConstantExpression(value)) { } - // Construct a leaf expression + // Construct a leaf expression, with Key Expression(const Key& key) : root_(new LeafExpression(key)) { } + // Construct a leaf expression, with Symbol + Expression(const Symbol& symbol) : + root_(new LeafExpression(symbol)) { + } + + // Construct a leaf expression, creating Symbol + Expression(unsigned char c, size_t j) : + root_(new LeafExpression(Symbol(c, j))) { + } + /// Construct a unary expression template Expression(typename UnaryExpression::function f,