17 #ifndef CARTOGRAPHER_MAPPING_TRAJECTORY_CONNECTIVITY_H_ 18 #define CARTOGRAPHER_MAPPING_TRAJECTORY_CONNECTIVITY_H_ 21 #include <unordered_map> 24 #include "cartographer/mapping/proto/trajectory_connectivity.pb.h" 75 std::map<std::pair<int, int>,
int> connection_map_
GUARDED_BY(lock_);
79 proto::TrajectoryConnectivity
ToProto(
80 std::vector<std::vector<int>> connected_components);
84 const cartographer::mapping::proto::TrajectoryConnectivity&
85 trajectory_connectivity,
91 #endif // CARTOGRAPHER_MAPPING_TRAJECTORY_CONNECTIVITY_H_ void Union(int trajectory_id_a, int trajectory_id_b) REQUIRES(lock_)
void Add(int trajectory_id) EXCLUDES(lock_)
int FindSet(int trajectory_id) REQUIRES(lock_)
bool TransitivelyConnected(int trajectory_id_a, int trajectory_id_b) EXCLUDES(lock_)
std::map< int, int > forest_ GUARDED_BY(lock_)
proto::TrajectoryConnectivity::ConnectedComponent FindConnectedComponent(const proto::TrajectoryConnectivity &trajectory_connectivity, const int trajectory_id)
void Connect(int trajectory_id_a, int trajectory_id_b) EXCLUDES(lock_)
std::vector< std::vector< int > > ConnectedComponents() EXCLUDES(lock_)
TrajectoryConnectivity & operator=(const TrajectoryConnectivity &)=delete
proto::SparsePoseGraph::Constraint::Tag ToProto(const SparsePoseGraph::Constraint::Tag &tag)
int ConnectionCount(int trajectory_id_a, int trajectory_id_b) EXCLUDES(lock_)