Public Member Functions | Private Member Functions | Private Attributes | List of all members
cartographer::mapping::ConnectedComponents Class Reference

#include <connected_components.h>

Public Member Functions

void Add (int trajectory_id) EXCLUDES(lock_)
 
std::vector< std::vector< int > > Components () EXCLUDES(lock_)
 
void Connect (int trajectory_id_a, int trajectory_id_b) EXCLUDES(lock_)
 
 ConnectedComponents ()
 
 ConnectedComponents (const ConnectedComponents &)=delete
 
int ConnectionCount (int trajectory_id_a, int trajectory_id_b) EXCLUDES(lock_)
 
std::vector< int > GetComponent (int trajectory_id) EXCLUDES(lock_)
 
ConnectedComponentsoperator= (const ConnectedComponents &)=delete
 
bool TransitivelyConnected (int trajectory_id_a, int trajectory_id_b) EXCLUDES(lock_)
 

Private Member Functions

int FindSet (int trajectory_id) REQUIRES(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) REQUIRES(lock_)
 

Private Attributes

common::Mutex lock_
 

Detailed Description

Definition at line 36 of file connected_components.h.

Constructor & Destructor Documentation

◆ ConnectedComponents() [1/2]

cartographer::mapping::ConnectedComponents::ConnectedComponents ( )

Definition at line 28 of file connected_components.cc.

◆ ConnectedComponents() [2/2]

cartographer::mapping::ConnectedComponents::ConnectedComponents ( const ConnectedComponents )
delete

Member Function Documentation

◆ Add()

void cartographer::mapping::ConnectedComponents::Add ( int  trajectory_id)

Definition at line 31 of file connected_components.cc.

◆ Components()

std::vector< std::vector< int > > cartographer::mapping::ConnectedComponents::Components ( )

Definition at line 78 of file connected_components.cc.

◆ Connect()

void cartographer::mapping::ConnectedComponents::Connect ( int  trajectory_id_a,
int  trajectory_id_b 
)

Definition at line 36 of file connected_components.cc.

◆ ConnectionCount()

int cartographer::mapping::ConnectedComponents::ConnectionCount ( int  trajectory_id_a,
int  trajectory_id_b 
)

Definition at line 107 of file connected_components.cc.

◆ FindSet()

int cartographer::mapping::ConnectedComponents::FindSet ( int  trajectory_id)
private

Definition at line 53 of file connected_components.cc.

◆ GetComponent()

std::vector< int > cartographer::mapping::ConnectedComponents::GetComponent ( int  trajectory_id)

Definition at line 95 of file connected_components.cc.

◆ GUARDED_BY() [1/2]

std::map<int, int> forest_ cartographer::mapping::ConnectedComponents::GUARDED_BY ( lock_  )
private

◆ GUARDED_BY() [2/2]

std::map<std::pair<int, int>, int> connection_map_ cartographer::mapping::ConnectedComponents::GUARDED_BY ( lock_  )
private

◆ operator=()

ConnectedComponents& cartographer::mapping::ConnectedComponents::operator= ( const ConnectedComponents )
delete

◆ TransitivelyConnected()

bool cartographer::mapping::ConnectedComponents::TransitivelyConnected ( int  trajectory_id_a,
int  trajectory_id_b 
)

Definition at line 63 of file connected_components.cc.

◆ Union()

void cartographer::mapping::ConnectedComponents::Union ( int  trajectory_id_a,
int  trajectory_id_b 
)
private

Definition at line 44 of file connected_components.cc.

Member Data Documentation

◆ lock_

common::Mutex cartographer::mapping::ConnectedComponents::lock_
private

Definition at line 75 of file connected_components.h.


The documentation for this class was generated from the following files:


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:59