Apollo  6.0
Open source self driving car software
sequence_self_statistics.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2019 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 #pragma once
17 #include <vector>
19 
20 namespace apollo {
21 namespace perception {
22 namespace benchmark {
23 
24 template <typename KeyType>
26  public:
28  ~SequenceSelfStatistics() = default;
29 
30  void reset();
31 
32  bool add_objects(const std::vector<ObjectPtr>& objects, KeyType key);
34  std::vector<std::vector<double>>* rate_per_class, double* rate) const;
35 
36  protected:
37  void add_statistics(SequenceType<KeyType>* sequence);
38 
39  protected:
41 
42  std::vector<std::vector<unsigned int>> _type_change_counts;
43 };
44 
45 } // namespace benchmark
46 } // namespace perception
47 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::vector< std::vector< unsigned int > > _type_change_counts
Definition: sequence_self_statistics.h:42
SequenceMaintainer< KeyType > _sequences
Definition: sequence_self_statistics.h:40
void add_statistics(SequenceType< KeyType > *sequence)
void get_classification_type_change_rates(std::vector< std::vector< double >> *rate_per_class, double *rate) const
std::map< ObjectKey, ObjectPtr > SequenceType
Definition: sequence_maintainer.h:29
Definition: sequence_self_statistics.h:25
bool add_objects(const std::vector< ObjectPtr > &objects, KeyType key)