#include <connected_components.h>
Public Member Functions | |
void | Add (int trajectory_id) LOCKS_EXCLUDED(lock_) |
std::vector< std::vector< int > > | Components () LOCKS_EXCLUDED(lock_) |
void | Connect (int trajectory_id_a, int trajectory_id_b) LOCKS_EXCLUDED(lock_) |
ConnectedComponents () | |
ConnectedComponents (const ConnectedComponents &) | |
int | ConnectionCount (int trajectory_id_a, int trajectory_id_b) LOCKS_EXCLUDED(lock_) |
std::vector< int > | GetComponent (int trajectory_id) LOCKS_EXCLUDED(lock_) |
ConnectedComponents & | operator= (const ConnectedComponents &) |
bool | TransitivelyConnected (int trajectory_id_a, int trajectory_id_b) LOCKS_EXCLUDED(lock_) |
Private Member Functions | |
int | FindSet (int trajectory_id) EXCLUSIVE_LOCKS_REQUIRED(lock_) |
std::map< int, int > forest_ | GUARDED_BY (lock_) |
std::map< std::pair< int, int > , int > connection_map_ | GUARDED_BY (lock_) |
void | Union (int trajectory_id_a, int trajectory_id_b) EXCLUSIVE_LOCKS_REQUIRED(lock_) |
Private Attributes | |
absl::Mutex | lock_ |
Definition at line 36 of file connected_components.h.
Definition at line 28 of file connected_components.cc.
void cartographer::mapping::ConnectedComponents::Add | ( | int | trajectory_id | ) |
Definition at line 31 of file connected_components.cc.
std::vector< std::vector< int > > cartographer::mapping::ConnectedComponents::Components | ( | ) |
Definition at line 78 of file connected_components.cc.
void cartographer::mapping::ConnectedComponents::Connect | ( | int | trajectory_id_a, |
int | trajectory_id_b | ||
) |
Definition at line 36 of file connected_components.cc.
int cartographer::mapping::ConnectedComponents::ConnectionCount | ( | int | trajectory_id_a, |
int | trajectory_id_b | ||
) |
Definition at line 107 of file connected_components.cc.
int cartographer::mapping::ConnectedComponents::FindSet | ( | int | trajectory_id | ) | [private] |
Definition at line 53 of file connected_components.cc.
std::vector< int > cartographer::mapping::ConnectedComponents::GetComponent | ( | int | trajectory_id | ) |
Definition at line 95 of file connected_components.cc.
std::map<int, int> forest_ cartographer::mapping::ConnectedComponents::GUARDED_BY | ( | lock_ | ) | [private] |
std::map<std::pair<int, int>, int> connection_map_ cartographer::mapping::ConnectedComponents::GUARDED_BY | ( | lock_ | ) | [private] |
ConnectedComponents& cartographer::mapping::ConnectedComponents::operator= | ( | const ConnectedComponents & | ) |
bool cartographer::mapping::ConnectedComponents::TransitivelyConnected | ( | int | trajectory_id_a, |
int | trajectory_id_b | ||
) |
Definition at line 63 of file connected_components.cc.
void cartographer::mapping::ConnectedComponents::Union | ( | int | trajectory_id_a, |
int | trajectory_id_b | ||
) | [private] |
Definition at line 44 of file connected_components.cc.
absl::Mutex cartographer::mapping::ConnectedComponents::lock_ [private] |
Definition at line 77 of file connected_components.h.