31 #define GENERICVALUE_VISIBILITY 35 #define GENERICVALUE_VISIBILITY GTSAM_EXPORT 91 void print(
const std::string&
str)
const override {
114 std::shared_ptr<Value>
clone()
const override {
126 return resultAsValue;
150 size_t dim()
const override {
176 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 178 friend class boost::serialization::access;
179 template<
class ARCHIVE>
180 void serialize(ARCHIVE & ar,
const unsigned int ) {
181 ar & boost::serialization::make_nvp(
"GenericValue",
182 boost::serialization::base_object<Value>(*
this));
183 ar & boost::serialization::make_nvp(
"value", value_);
195 #define GTSAM_VALUE_EXPORT(Type) BOOST_CLASS_EXPORT(gtsam::GenericValue<Type>) 198 template <
typename ValueType>
200 :
public Testable<GenericValue<ValueType> > {};
203 template<
typename ValueType>
Vector localCoordinates(const GenericValue &value2) const
Non-virtual version of localCoordinates.
Typedefs for easier changing of types.
GenericValue retract(const Vector &delta) const
Non-virtual version of retract.
std::shared_ptr< Value > clone() const override
std::string serialize(const T &input)
serializes to a string
T value_
The wrapped value.
void print(const std::string &str) const override
Virtual print function, uses traits.
~GenericValue() override
Destructor.
Value * clone_() const override
GenericValue(const T &value)
Construct from value.
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
void deallocate_() const override
STL compatible allocator to use with types requiring a non standrad alignment.
Value & operator=(const Value &rhs) override
Assignment operator.
Base class and basic functions for Manifold types.
Value * retract_(const Vector &delta) const override
Generic Value interface version of retract.
Array< int, Dynamic, 1 > v
Eigen::Triplet< double > T
virtual Value & operator=(const Value &)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const ValueType & cast() const
GenericValue< T > genericValue(const T &v)
std::string demangle(const char *name)
Pretty print Value type name.
bool equals_(const Value &p, double tol=1e-9) const override
equals implementing generic Value interface
bool equals(const GenericValue &other, double tol=1e-9) const
non virtual equals function, uses traits
Vector localCoordinates_(const Value &value2) const override
Generic Value interface version of localCoordinates.
The base class for any variable that can be optimized or used in a factor.
T & value()
Return the value.
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
size_t dim() const override
Return run-time dimensionality.
const T & value() const
Return a constant value.
GenericValue< T > & operator=(const GenericValue< T > &rhs)