PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Identifiers< T > Class Template Reference

#include "identifiers.hpp"

Public Types

typedef std::set< T >
::const_iterator 
const_iterator
 
typedef std::set< T >::iterator iterator
 

Public Member Functions

 Identifiers ()=default
 
 Identifiers (T *container, size_t size)
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
bool empty () const
 Returns true when the set is empty. More...
 
iterator end ()
 
const_iterator end () const
 
bool has (const T element) const
 Returns a boolean value true or false. More...
 
const std::set< T > & ids () const
 Returns a set of identifiers of type set<T> More...
 
void insert (const Identifiers< T > &other)
 Inserts a set of identifiers of type Identifiers<T> to this set. More...
 
void insert (const T &other)
 Inserts an identifier of type T to this set. More...
 
bool isDisjoint (const T other) const
 Returns a boolean value true or false. More...
 
bool isDisjoint (const Identifiers< T > &other) const
 Returns a boolean value true or false. More...
 
bool operator== (const Identifiers< T > &other) const
 Returns a boolean value. More...
 
const T & operator[] (size_t index) const
 Returns an identifier of type T at position index in the set. More...
 
size_t size () const
 
mathematical set operations
Identifiers< T > operator+ (const T &other) const
 Returns a set of identifiers of type Identifiers<T> More...
 
Identifiers< T > operator* (const T &other) const
 Returns a set of identifiers of type Identifiers<T> More...
 
Identifiers< T > operator- (const T &other) const
 Returns a set of identifiers of type Identifiers<T> More...
 
Identifiers< T > operator+ (const Identifiers< T > &other) const
 Returns a set of identifiers of type Identifiers<T> More...
 
Identifiers< T > operator* (const Identifiers< T > &other) const
 Returns a set of identifiers of type Identifiers<T> More...
 
Identifiers< T > operator- (const Identifiers< T > &other) const
 Returns a set of identifiers of type Identifiers<T> More...
 
Identifiers< T > & operator+= (const T &other)
 Returns a set of identifiers of type Identifiers<T>& More...
 
Identifiers< T > & operator*= (const T &other)
 Returns a set of identifiers of type Identifiers<T>& More...
 
Identifiers< T > & operator-= (const T &other)
 Returns a set of identifiers of type Identifiers<T>& More...
 
Identifiers< T > & operator+= (const Identifiers< T > &other)
 Returns a set of identifiers of type Identifiers<T>& More...
 
Identifiers< T > & operator*= (const Identifiers< T > &other)
 Returns a set of identifiers of type Identifiers<T>& More...
 
Identifiers< T > & operator-= (const Identifiers< T > &other)
 Returns a set of identifiers of type Identifiers<T>& More...
 

Private Attributes

std::set< T > m_ids
 

Friends

template<T >
std::ostream & operator<< (std::ostream &os, const Identifiers< T > &identifiers)
 Prints the set of identifiers. More...
 

Detailed Description

template<typename T>
class Identifiers< T >

Definition at line 42 of file identifiers.hpp.

Member Typedef Documentation

template<typename T>
typedef std::set<T>::const_iterator Identifiers< T >::const_iterator

Definition at line 45 of file identifiers.hpp.

template<typename T>
typedef std::set<T>::iterator Identifiers< T >::iterator

Definition at line 44 of file identifiers.hpp.

Constructor & Destructor Documentation

template<typename T>
Identifiers< T >::Identifiers ( )
default
template<typename T>
Identifiers< T >::Identifiers ( T *  container,
size_t  size 
)
inline

Definition at line 49 of file identifiers.hpp.

Member Function Documentation

template<typename T>
iterator Identifiers< T >::begin ( )
inline

Definition at line 65 of file identifiers.hpp.

template<typename T>
const_iterator Identifiers< T >::begin ( ) const
inline

Definition at line 66 of file identifiers.hpp.

template<typename T>
void Identifiers< T >::clear ( )
inline
template<typename T>
bool Identifiers< T >::empty ( void  ) const
inline

Returns true when the set is empty.

Definition at line 58 of file identifiers.hpp.

Referenced by pgrouting::CH_edge::has_contracted_vertices().

template<typename T>
iterator Identifiers< T >::end ( )
inline

Definition at line 67 of file identifiers.hpp.

template<typename T>
const_iterator Identifiers< T >::end ( ) const
inline

Definition at line 68 of file identifiers.hpp.

template<typename T>
bool Identifiers< T >::has ( const T  other) const

Returns a boolean value true or false.

Parameters
[in]otherIdentifier of type T Returns: true: If other is in this set false: Otherwise

Definition at line 115 of file identifiers.hpp.

Referenced by pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_changed_vertices().

template<typename T >
const std::set< T > & Identifiers< T >::ids ( ) const
template<typename T>
void Identifiers< T >::insert ( const Identifiers< T > &  other)

Inserts a set of identifiers of type Identifiers<T> to this set.

Parameters
[in]otheris a set of identifiers

Definition at line 153 of file identifiers.hpp.

References Identifiers< T >::ids().

Referenced by do_pgr_test_c_edges(), Identifiers< T >::operator*(), Identifiers< T >::operator+(), Identifiers< T >::operator-(), and process_contraction().

template<typename T>
void Identifiers< T >::insert ( const T &  other)

Inserts an identifier of type T to this set.

Parameters
[in]otheris an identifier of type T

Definition at line 162 of file identifiers.hpp.

template<typename T>
bool Identifiers< T >::isDisjoint ( const T  other) const

Returns a boolean value true or false.

Parameters
[in]otheris an identifier of type T Returns: true: If other is not in this set false: Otherwise

Definition at line 127 of file identifiers.hpp.

template<typename T>
bool Identifiers< T >::isDisjoint ( const Identifiers< T > &  other) const

Returns a boolean value true or false.

Parameters
[in]otheris set of identifiers of type Identifiers<T> Returns: true: If other and this set are disjoint false: otherwise

Definition at line 139 of file identifiers.hpp.

References Identifiers< T >::ids().

template<typename T>
Identifiers< T > Identifiers< T >::operator* ( const T &  other) const

Returns a set of identifiers of type Identifiers<T>

Parameters
[in]otheris an identifier of type T Returns the set intersection of other with this set

Definition at line 198 of file identifiers.hpp.

References Identifiers< T >::insert().

template<typename T>
Identifiers< T > Identifiers< T >::operator* ( const Identifiers< T > &  other) const

Returns a set of identifiers of type Identifiers<T>

Parameters
[in]otheris a set of identifiers of type Identifiers<T> Returns the set intersection of other with this set

Definition at line 237 of file identifiers.hpp.

References Identifiers< T >::insert().

template<typename T>
Identifiers< T > & Identifiers< T >::operator*= ( const T &  other)

Returns a set of identifiers of type Identifiers<T>&

Parameters
[in]otheris an identifiers of type T Replaces this set with the set intersection of other with this set

Definition at line 275 of file identifiers.hpp.

template<typename T>
Identifiers< T > & Identifiers< T >::operator*= ( const Identifiers< T > &  other)

Returns a set of identifiers of type Identifiers<T>&

Parameters
[in]otheris a set of identifiers of type Identifiers<T> Replaces this set with the set intersection of other with this set

Definition at line 316 of file identifiers.hpp.

References Identifiers< T >::ids().

template<typename T>
Identifiers< T > Identifiers< T >::operator+ ( const T &  other) const

Returns a set of identifiers of type Identifiers<T>

Parameters
[in]otheris an identifier of type T Returns the set union of other with this set

Definition at line 185 of file identifiers.hpp.

References Identifiers< T >::insert().

template<typename T>
Identifiers< T > Identifiers< T >::operator+ ( const Identifiers< T > &  other) const

Returns a set of identifiers of type Identifiers<T>

Parameters
[in]otheris a set of identifiers of type Identifiers<T> Returns the set union of other with this set

Definition at line 224 of file identifiers.hpp.

References Identifiers< T >::insert().

template<typename T>
Identifiers< T > & Identifiers< T >::operator+= ( const T &  other)

Returns a set of identifiers of type Identifiers<T>&

Parameters
[in]otheris an identifiers of type T Replaces this set with the set union of other with this set

Definition at line 264 of file identifiers.hpp.

template<typename T>
Identifiers< T > & Identifiers< T >::operator+= ( const Identifiers< T > &  other)

Returns a set of identifiers of type Identifiers<T>&

Parameters
[in]otheris a set of identifiers of type Identifiers<T> Replaces this set with the set union of other with this set

Definition at line 305 of file identifiers.hpp.

template<typename T>
Identifiers< T > Identifiers< T >::operator- ( const T &  other) const

Returns a set of identifiers of type Identifiers<T>

Parameters
[in]otheris an identifier of type T Returns the set difference between this set and other

Definition at line 211 of file identifiers.hpp.

References Identifiers< T >::insert().

template<typename T>
Identifiers< T > Identifiers< T >::operator- ( const Identifiers< T > &  other) const

Returns a set of identifiers of type Identifiers<T>

Parameters
[in]otheris a set of identifiers of type Identifiers<T> Returns the set difference between this set and other

Definition at line 250 of file identifiers.hpp.

References Identifiers< T >::insert().

template<typename T>
Identifiers< T > & Identifiers< T >::operator-= ( const T &  other)

Returns a set of identifiers of type Identifiers<T>&

Parameters
[in]otheris a set of identifiers of type T Replaces this set with the set difference between this set and other

Definition at line 291 of file identifiers.hpp.

template<typename T>
Identifiers< T > & Identifiers< T >::operator-= ( const Identifiers< T > &  other)

Returns a set of identifiers of type Identifiers<T>&

Parameters
[in]otheris a set of identifiers of type Identifiers<T> Replaces this set with the set difference between this set and other

Definition at line 331 of file identifiers.hpp.

References Identifiers< T >::ids().

template<typename T>
bool Identifiers< T >::operator== ( const Identifiers< T > &  other) const

Returns a boolean value.

Parameters
[in]otheris a set of identifiers of type Identifiers<T> Returns: true: If other and this set are equivalent false: Otherwise

Definition at line 174 of file identifiers.hpp.

References Identifiers< T >::ids().

template<typename T >
const T & Identifiers< T >::operator[] ( size_t  index) const

Returns an identifier of type T at position index in the set.

Parameters
[in]indexis of type size_t

Definition at line 356 of file identifiers.hpp.

Friends And Related Function Documentation

template<typename T>
template<T >
std::ostream& operator<< ( std::ostream &  os,
const Identifiers< T > &  identifiers 
)
friend

Prints the set of identifiers.

Definition at line 342 of file identifiers.hpp.

Member Data Documentation


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