gtsam
linear
Scatter.h
Go to the documentation of this file.
1
/* ----------------------------------------------------------------------------
2
3
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
4
* Atlanta, Georgia 30332-0415
5
* All Rights Reserved
6
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8
* See LICENSE for the license information
9
10
* -------------------------------------------------------------------------- */
11
20
#pragma once
21
22
#include <
gtsam/inference/Key.h
>
23
#include <
gtsam/base/FastMap.h
>
24
#include <gtsam/dllexport.h>
25
26
namespace
gtsam
{
27
28
class
GaussianFactorGraph;
29
class
Ordering;
30
32
struct
GTSAM_EXPORT
SlotEntry
{
33
Key
key
;
34
size_t
dimension
;
35
SlotEntry
(
Key
_key,
size_t
_dimension) :
key
(_key), dimension(_dimension) {}
36
std::string toString()
const
;
37
friend
bool
operator<
(
const
SlotEntry
&
p
,
const
SlotEntry
&
q
) {
38
return
p
.key <
q
.key;
39
}
40
static
bool
Zero
(
const
SlotEntry
&
p
) {
return
p
.dimension==0;}
41
};
42
49
class
Scatter
:
public
FastVector
<SlotEntry> {
50
public
:
52
GTSAM_EXPORT
Scatter
() {}
53
55
GTSAM_EXPORT
explicit
Scatter
(
const
GaussianFactorGraph
& gfg);
56
58
GTSAM_EXPORT
explicit
Scatter
(
const
GaussianFactorGraph
& gfg,
const
Ordering
&
ordering
);
59
61
GTSAM_EXPORT
void
add
(
Key
key
,
size_t
dim);
62
63
private
:
65
iterator
find
(
Key
key
);
66
};
67
68
}
// \ namespace gtsam
gtsam::SlotEntry::operator<
friend bool operator<(const SlotEntry &p, const SlotEntry &q)
Definition:
Scatter.h:37
gtsam::FastVector
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
Definition:
FastVector.h:34
gtsam::Scatter::find
iterator find(Key key)
Find the SlotEntry with the right key (linear time worst case)
Definition:
Scatter.cpp:81
iterator
Definition:
pytypes.h:1460
gtsam::SlotEntry::key
Key key
Definition:
Scatter.h:33
Key.h
gtsam::GaussianFactorGraph
Definition:
GaussianFactorGraph.h:73
gtsam::SlotEntry::SlotEntry
SlotEntry(Key _key, size_t _dimension)
Definition:
Scatter.h:35
Eigen::numext::q
EIGEN_DEVICE_FUNC const Scalar & q
Definition:
SpecialFunctionsImpl.h:1984
gtsam::Scatter
Definition:
Scatter.h:49
ordering
static enum @1096 ordering
key
const gtsam::Symbol key('X', 0)
gtsam
traits
Definition:
SFMdata.h:40
gtsam::SlotEntry::dimension
size_t dimension
Definition:
Scatter.h:34
p
float * p
Definition:
Tutorial_Map_using.cpp:9
gtsam::SlotEntry::Zero
static bool Zero(const SlotEntry &p)
Definition:
Scatter.h:40
gtsam::Scatter::add
GTSAM_EXPORT void add(Key key, size_t dim)
Add a key/dim pair.
Definition:
Scatter.cpp:76
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition:
types.h:97
gtsam::SlotEntry
One SlotEntry stores the slot index for a variable, as well its dim.
Definition:
Scatter.h:32
gtsam::Ordering
Definition:
inference/Ordering.h:33
gtsam::Scatter::Scatter
GTSAM_EXPORT Scatter()
Default Constructor.
Definition:
Scatter.h:52
FastMap.h
A thin wrapper around std::map that uses boost's fast_pool_allocator.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:02