Go to the documentation of this file.
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>
GenericValue retract(const Vector &delta) const
Non-virtual version of retract.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Typedefs for easier changing of types.
std::shared_ptr< Value > clone() const override
T value_
The wrapped value.
Eigen::Triplet< double > T
GenericValue< T > genericValue(const T &v)
void print(const std::string &str) const override
Virtual print function, uses traits.
bool equals_(const Value &p, double tol=1e-9) const override
equals implementing generic Value interface
Vector localCoordinates_(const Value &value2) const override
Generic Value interface version of localCoordinates.
GenericValue(const T &value)
Construct from value.
STL compatible allocator to use with types requiring a non standrad alignment.
Value & operator=(const Value &rhs) override
Assignment operator.
const T & value() const
Return a constant value.
GenericValue< T > & operator=(const GenericValue< T > &rhs)
T & value()
Return the value.
Base class and basic functions for Manifold types.
Value * retract_(const Vector &delta) const override
Generic Value interface version of retract.
std::string demangle(const char *name)
Pretty print Value type name.
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
Array< int, Dynamic, 1 > v
bool equals(const GenericValue &other, double tol=1e-9) const
non virtual equals function, uses traits
Value * clone_() const override
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
size_t dim() const override
Return run-time dimensionality.
~GenericValue() override
Destructor.
virtual Value & operator=(const Value &)
The base class for any variable that can be optimized or used in a factor.
void deallocate_() const override
const ValueType & cast() const
Vector localCoordinates(const GenericValue &value2) const
Non-virtual version of localCoordinates.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:21