DART  6.10.1
dart::collision::detail::UnorderedPairs< T > Class Template Reference

#include <UnorderedPairs.hpp>

Public Member Functions

void addPair (const T *left, const T *right)
 Adds a pair to this container. More...
 
void removePair (const T *left, const T *right)
 Removes a pair from this container. More...
 
void removeAllPairs ()
 Removes all the pairs from this container. More...
 
bool contains (const T *left, const T *right) const
 Returns true if this container contains the pair. More...
 

Private Attributes

std::unordered_map< const T *, std::unordered_set< const T * > > mList
 The actual container to store pairs. More...
 

Member Function Documentation

◆ addPair()

template<class T >
void dart::collision::detail::UnorderedPairs< T >::addPair ( const T *  left,
const T *  right 
)

Adds a pair to this container.

◆ contains()

template<class T >
bool dart::collision::detail::UnorderedPairs< T >::contains ( const T *  left,
const T *  right 
) const

Returns true if this container contains the pair.

◆ removeAllPairs()

template<class T >
void dart::collision::detail::UnorderedPairs< T >::removeAllPairs

Removes all the pairs from this container.

◆ removePair()

template<class T >
void dart::collision::detail::UnorderedPairs< T >::removePair ( const T *  left,
const T *  right 
)

Removes a pair from this container.

Member Data Documentation

◆ mList

template<class T >
std::unordered_map<const T*, std::unordered_set<const T*> > dart::collision::detail::UnorderedPairs< T >::mList
private

The actual container to store pairs.

Each pair is stored so that the key of the std::unordered_map always has a value less than every element in the std::unordered_set that is associated with it.