23 namespace perception {
34 inline void Set(
size_t size,
int init_value) {
35 mask_.assign(size, init_value);
40 inline void Fill(
int value) { std::fill(mask_.begin(), mask_.end(),
value); }
44 inline const std::vector<int>&
mask()
const {
return mask_; }
54 inline const int&
operator[](
int id)
const {
return mask_[id]; }
58 inline size_t size()
const {
return mask_.size(); }
61 inline void clear() { mask_.clear(); }
70 template <
typename IntegerType>
96 template <
typename IntegerType>
97 void AddIndices(
const std::vector<IntegerType>& indices,
int value = 1);
113 template <
typename IntegerType>
129 void ResetValue(
int source_value,
int target_value);
135 std::vector<int> mask_;
138 mutable std::vector<int> indices_;
141 template <
typename IntegerType>
143 for (
auto&
id : indices) {
148 template <
typename IntegerType>
150 for (
auto&
id : indices) {
155 template <
typename IntegerType>
157 const std::vector<IntegerType>& indices)
const {
159 for (
const auto&
id : indices) {
void AddIndices(const base::PointIndices &indices, int value=1)
void ResetValue(int source_value, int target_value)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
int & operator[](int id)
Definition: cloud_mask.h:49
size_t size() const
Definition: cloud_mask.h:58
Definition: cloud_mask.h:26
const int & operator[](int id) const
Definition: cloud_mask.h:54
void GetValidCloud(const base::AttributePointCloud< base::PointF > &source_cloud, base::AttributePointCloud< base::PointF > *target_cloud) const
Definition: point_cloud.h:264
void GetValidMask(CloudMask *rhs) const
const std::vector< int > & mask() const
Definition: cloud_mask.h:44
void AddIndicesOfIndices(const base::PointIndices &indices, const base::PointIndices &indices_of_indices, int value=1)
std::vector< int > GetValidIndices()
void Set(size_t size, int init_value)
Definition: cloud_mask.h:34
void RemoveIndicesOfIndices(const base::PointIndices &indices, const base::PointIndices &indices_of_indices)
apollo::cyber::base::std value
void Fill(int value)
Definition: cloud_mask.h:40
void clear()
Definition: cloud_mask.h:61
void RemoveIndices(const base::PointIndices &indices)
size_t ValidIndicesCount() const