17 #ifndef CARTOGRAPHER_MAPPING_ID_H_ 18 #define CARTOGRAPHER_MAPPING_ID_H_ 35 return std::forward_as_tuple(trajectory_id, node_index) <
51 return std::forward_as_tuple(trajectory_id, submap_index) ==
58 return std::forward_as_tuple(trajectory_id, submap_index) <
67 template <
typename ValueType,
typename IdType>
72 data_.resize(std::max<size_t>(data_.size(), trajectory_id + 1));
79 const ValueType&
at(
const IdType&
id)
const {
82 ValueType&
at(
const IdType&
id) {
88 return static_cast<int>(data_.at(trajectory_id).size());
92 const std::vector<std::vector<ValueType>>
data()
const {
return data_; }
98 std::vector<std::vector<ValueType>>
data_;
104 #endif // CARTOGRAPHER_MAPPING_ID_H_
ValueType & at(const IdType &id)
static int GetIndex(const SubmapId &id)
int num_indices(int trajectory_id) const
bool operator<(const SubmapId &other) const
const ValueType & at(const IdType &id) const
bool operator!=(const SubmapId &other) const
static int GetIndex(const NodeId &id)
IdType Append(int trajectory_id, const ValueType &value)
int num_trajectories() const
bool operator==(const SubmapId &other) const
bool operator<(const NodeId &other) const
std::vector< std::vector< ValueType > > data_
std::ostream & operator<<(std::ostream &os, const NodeId &v)
const std::vector< std::vector< ValueType > > data() const