Go to the documentation of this file.
81 std::map<Key, Vector> sorted()
const;
89 typedef std::map<Key, size_t>
Dims;
106 template<
class CONTAINER>
113 template<
typename ITERATOR>
130 size_t size()
const {
return values_.size(); }
145 throw std::out_of_range(
158 throw std::out_of_range(
187 template<
class... Args>
189 #if ! defined(GTSAM_USE_TBB) || defined (TBB_GREATER_EQUAL_2020)
190 return values_.emplace(std::piecewise_construct, std::forward_as_tuple(
j), std::forward_as_tuple(
args...));
192 return values_.insert({
j,
Vector(std::forward<Args>(
args)...)});
213 #ifdef TBB_GREATER_EQUAL_2020
214 return values_.emplace(
j,
value);
216 return values_.insert({
j,
value});
223 if (!tryInsert(
j,
value).second) {
231 throw std::invalid_argument(
"Requested variable '" +
233 "', is not in this VectorValues.");
239 iterator begin() {
return values_.begin(); }
240 const_iterator begin()
const {
return values_.begin(); }
242 const_iterator
end()
const {
return values_.end(); }
260 void print(
const std::string&
str =
"VectorValues",
274 template <
typename CONTAINER>
278 items.reserve(
keys.end() -
keys.begin());
281 totalDim +=
v->size();
287 for (
const Vector*
v : items) {
317 double squaredNorm()
const;
374 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
376 friend class boost::serialization::access;
377 template<
class ARCHIVE>
378 void serialize(ARCHIVE & ar,
const unsigned int ) {
379 ar & BOOST_SERIALIZATION_NVP(values_);
std::map< Key, size_t > Dims
Keyed vector dimensions.
static Y add(const Y &y1, const Y &y2)
typedef and functions to augment Eigen's VectorXd
A thin wrapper around std::vector that uses a custom allocator.
Included from all GTSAM files.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
Errors operator-(const Errors &a, const Errors &b)
Subtraction.
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
Values::iterator iterator
Iterator over vector values.
const Vector & at(Key j) const
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
Values values_
Vectors making up this VectorValues.
const KeyFormatter & formatter
Variable ordering for the elimination algorithm.
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator*=(bfloat16 &a, const bfloat16 &b)
static const symbolic::SymbolExpr< internal::symbolic_last_tag > last
VectorValues()
Default constructor creates an empty VectorValues.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Point2 operator*(double s, const Point2 &p)
multiply with scalar
Values::const_iterator const_iterator
Const iterator over vector values.
VectorValues(const CONTAINER &c)
void print(const Matrix &A, const string &s, ostream &stream)
VectorValues(ITERATOR first, ITERATOR last)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
double dot(const V1 &a, const V2 &b)
VectorValues(const VectorValues &c)
std::pair< iterator, bool > tryInsert(Key j, const Vector &value)
void unsafe_erase(typename Base::iterator position)
std::shared_ptr< This > shared_ptr
shared_ptr to this class
HybridGaussianProductFactor operator+(const HybridGaussianProductFactor &a, const HybridGaussianProductFactor &b)
const gtsam::Symbol key('X', 0)
Vector & operator[](Key j)
ConcurrentMap< Key, Vector > Values
Collection of Vectors making up a VectorValues.
void insert_or_assign(Key j, const Vector &value)
ptrdiff_t DenseIndex
The index type for Eigen objects.
Array< int, Dynamic, 1 > v
static double scale(double x, double a, double b, double t1, double t2)
Scale x from [a, b] to [t1, t2].
const_iterator find(Key j) const
string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of html.
static const EIGEN_DEPRECATED end_t end
value_type KeyValuePair
Typedef to pair<Key, Vector>
std::uint64_t Key
Integer nonlinear key type.
Vector vector(const CONTAINER &keys) const
std::pair< VectorValues::iterator, bool > emplace(Key j, Args &&... args)
int EIGEN_BLAS_FUNC() swap(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator+=(bfloat16 &a, const bfloat16 &b)
Maps global variable indices to slot indices.
VectorValues(std::initializer_list< std::pair< Key, Vector >> init)
Construct from initializer list.
iterator insert(Key j, const Vector &value)
Values::value_type value_type
Typedef to pair<Key, Vector>
const Vector & operator[](Key j) const
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:43:08