Apollo
v5.5.0
Open source self driving car software
modules
perception
common
graph
connected_component_analysis.h
Go to the documentation of this file.
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 <queue>
20
#include <vector>
21
22
#include "cyber/common/log.h"
23
24
namespace
apollo
{
25
namespace
perception {
26
namespace
common {
27
28
/*
29
* @brief: bfs based connected component analysis
30
* @params[IN] graph: input graph for connected component analysis
31
* @params[OUT] components: connected components of input graph
32
* @return nothing
33
* */
34
void
ConnectedComponentAnalysis
(
const
std::vector<std::vector<int>>& graph,
35
std::vector<std::vector<int>>* components);
36
37
}
// namespace common
38
}
// namespace perception
39
}
// namespace apollo
apollo::perception::common::ConnectedComponentAnalysis
void ConnectedComponentAnalysis(const std::vector< std::vector< int >> &graph, std::vector< std::vector< int >> *components)
apollo
Definition:
blob.h:72
Generated by
1.8.13