Apollo 10.0
自动驾驶开放平台
base_bipartite_graph_matcher.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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
17#pragma once
18
19#include <string>
20#include <utility>
21#include <vector>
22
23#include "Eigen/Core"
24
25#include "cyber/common/macros.h"
29
30namespace apollo {
31namespace perception {
32namespace lidar {
33
35
37
39 float cost_thresh = 4.0f;
40 float bound_value = 100.0f;
41};
42
44 public:
45 typedef std::pair<size_t, size_t> NodeNodePair;
47 virtual ~BaseBipartiteGraphMatcher() = default;
48
57 virtual void Match(const BipartiteGraphMatcherOptions &options,
58 std::vector<NodeNodePair> *assignments,
59 std::vector<size_t> *unassigned_rows,
60 std::vector<size_t> *unassigned_cols) = 0;
66 virtual std::string Name() const = 0;
67
74
75 protected:
77 float max_match_distance_ = 0.0f;
78
79 private:
81}; // class BaseBipartiteGraphMatcher
82
84#define PERCEPTION_REGISTER_BIPARTITEGRAPHMATCHER(name) \
85 PERCEPTION_REGISTER_CLASS(BaseBipartiteGraphMatcher, name)
86
87} // namespace lidar
88} // namespace perception
89} // namespace apollo
virtual std::string Name() const =0
Get class name
virtual algorithm::SecureMat< float > * cost_matrix()
Get cost matrix
virtual void Match(const BipartiteGraphMatcherOptions &options, std::vector< NodeNodePair > *assignments, std::vector< size_t > *unassigned_rows, std::vector< size_t > *unassigned_cols)=0
Match bipartite graph
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition macros.h:48
class register implement
Definition arena_queue.h:37
#define PERCEPTION_REGISTER_REGISTERER(base_class)
Definition registerer.h:92