ug4
pcl::OrderedInterface< TType, TContainer, TAlloc > Class Template Reference

You may add elements to this interface and iterate over them. More...

#include <pcl_communication_structs.h>

Classes

struct  InterfaceEntry
 
struct  InterfaceEntryCmp
 

Public Types

typedef interface_tags::ordered_interface_tag category_tag
 
typedef ElemContainer::const_iterator const_iterator
 
typedef type_traits< TType >::Elem Element
 
typedef ElemContainer::iterator iterator
 
typedef TType Type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
iterator erase (iterator iter)
 
template<class TCompare >
iterator find_insert_pos_sorted (const Element e, TCompare cmp)
 find insertion position for an element to be inserted More...
 
const Elementget_element (const_iterator iter) const
 
Elementget_element (iterator iter)
 
size_t get_local_id (const_iterator iter) const
 
size_t get_local_id (iterator iter)
 
int get_target_proc () const
 
iterator insert (const Element &elem, iterator insertBefore)
 Insert an element before the passed iterator. More...
 
 OrderedInterface (int targetProc=-1)
 
iterator push_back (const Element &elem)
 
size_t size () const
 returns the number of elements that are stored in the interface. More...
 
template<class TCompare >
void sort (TCompare cmp)
 sort the entries in this interface. More...
 
void swap (OrderedInterface &interface)
 swaps the content of two interfaces. More...
 

Static Public Member Functions

static bool cmp (iterator iter1, iterator iter2, const std::input_iterator_tag &)
 returns true if iter1 < iter2. More...
 

Protected Types

typedef TContainer< InterfaceEntry, TAlloc< InterfaceEntry > > ElemContainer
 
typedef type_traits< TType >::Elem TElem
 

Protected Member Functions

size_t get_free_id ()
 returns a free id in each call. More...
 

Protected Attributes

ElemContainer m_elements
 
size_t m_idCounter
 
size_t m_size
 
int m_targetProc
 

Detailed Description

template<class TType, template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
class pcl::OrderedInterface< TType, TContainer, TAlloc >

You may add elements to this interface and iterate over them.

You may retrieve a localID for each element in the interface

Member Typedef Documentation

◆ category_tag

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef interface_tags::ordered_interface_tag pcl::OrderedInterface< TType, TContainer, TAlloc >::category_tag

◆ const_iterator

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef ElemContainer::const_iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::const_iterator

◆ ElemContainer

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef TContainer<InterfaceEntry, TAlloc<InterfaceEntry> > pcl::OrderedInterface< TType, TContainer, TAlloc >::ElemContainer
protected

◆ Element

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef type_traits<TType>::Elem pcl::OrderedInterface< TType, TContainer, TAlloc >::Element

◆ iterator

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef ElemContainer::iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::iterator

◆ TElem

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef type_traits<TType>::Elem pcl::OrderedInterface< TType, TContainer, TAlloc >::TElem
protected

◆ Type

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
typedef TType pcl::OrderedInterface< TType, TContainer, TAlloc >::Type

Constructor & Destructor Documentation

◆ OrderedInterface()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
pcl::OrderedInterface< TType, TContainer, TAlloc >::OrderedInterface ( int  targetProc = -1)
inline

Member Function Documentation

◆ begin() [1/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::begin ( )
inline

References pcl::OrderedInterface< TType, TContainer, TAlloc >::m_elements.

Referenced by ug::ComPol_VecCopy< TVector >::collect(), ug::ComPol_VecScaleCopy< TVector >::collect(), ug::ComPol_VecAdd< TVector >::collect(), ug::ComPol_VecScaleAdd< TVector >::collect(), ug::ComPol_VecAddSetZero< TVector >::collect(), ug::ComPol_VecSubtract< TVector >::collect(), ug::ComPol_CheckConsistency< TVector >::collect(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::collect(), ug::ComPol_MatDistributeDiag< TAlgebra >::collect(), ug::ComPol_MatAddRowsOverlap0< TMatrix >::collect(), ug::ComPol_MatCopyRowsOverlap0< TMatrix >::collect(), ug::ComPol_MatAddSetZeroInnerInterfaceCouplings< TMatrix >::collect(), ug::CommunicationScheme< TDerived, TValue >::collect(), ug::CommunicationScheme< TDerived, bool >::collect(), ug::ComPol_MatCopyDiag< TMatrix >::collect(), ug::ComPol_MatCreateOverlap< TMatrix >::collect(), ug::ComPol_VecCopy< TVector >::extract(), ug::ComPol_VecScaleCopy< TVector >::extract(), ug::ComPol_VecAdd< TVector >::extract(), ug::ComPol_VecScaleAdd< TVector >::extract(), ug::ComPol_VecAddSetZero< TVector >::extract(), ug::ComPol_VecSubtract< TVector >::extract(), ug::ComPol_CheckConsistency< TVector >::extract(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::extract(), ug::ComPol_MatDistributeDiag< TAlgebra >::extract(), ug::ComPol_MatAddRowsOverlap0< TMatrix >::extract(), ug::ComPol_MatCopyRowsOverlap0< TMatrix >::extract(), ug::ComPol_MatAddSetZeroInnerInterfaceCouplings< TMatrix >::extract(), ug::CommunicationScheme< TDerived, TValue >::extract(), ug::CommunicationScheme< TDerived, bool >::extract(), ug::ComPol_MatCopyDiag< TMatrix >::extract(), ug::ComPol_MatCreateOverlap< TMatrix >::extract(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_free_id(), ug::SlicingData< TVec, N >::replace_indices_in_layout(), ug::SerializeInterface(), and ug::SetInterfaceValues().

◆ begin() [2/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
const_iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::begin ( ) const
inline

◆ cmp()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
static bool pcl::OrderedInterface< TType, TContainer, TAlloc >::cmp ( iterator  iter1,
iterator  iter2,
const std::input_iterator_tag &   
)
inlinestatic

◆ empty()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
bool pcl::OrderedInterface< TType, TContainer, TAlloc >::empty ( ) const
inline

◆ end() [1/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::end ( )
inline

References pcl::OrderedInterface< TType, TContainer, TAlloc >::m_elements.

Referenced by ug::ComPol_VecCopy< TVector >::collect(), ug::ComPol_VecScaleCopy< TVector >::collect(), ug::ComPol_VecAdd< TVector >::collect(), ug::ComPol_VecScaleAdd< TVector >::collect(), ug::ComPol_VecAddSetZero< TVector >::collect(), ug::ComPol_VecSubtract< TVector >::collect(), ug::ComPol_CheckConsistency< TVector >::collect(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::collect(), ug::ComPol_MatDistributeDiag< TAlgebra >::collect(), ug::ComPol_MatAddRowsOverlap0< TMatrix >::collect(), ug::ComPol_MatCopyRowsOverlap0< TMatrix >::collect(), ug::ComPol_MatAddSetZeroInnerInterfaceCouplings< TMatrix >::collect(), ug::CommunicationScheme< TDerived, TValue >::collect(), ug::CommunicationScheme< TDerived, bool >::collect(), ug::ComPol_MatCopyDiag< TMatrix >::collect(), ug::ComPol_MatCreateOverlap< TMatrix >::collect(), ug::ComPol_VecCopy< TVector >::extract(), ug::ComPol_VecScaleCopy< TVector >::extract(), ug::ComPol_VecAdd< TVector >::extract(), ug::ComPol_VecScaleAdd< TVector >::extract(), ug::ComPol_VecAddSetZero< TVector >::extract(), ug::ComPol_VecSubtract< TVector >::extract(), ug::ComPol_CheckConsistency< TVector >::extract(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::extract(), ug::ComPol_MatDistributeDiag< TAlgebra >::extract(), ug::ComPol_MatAddRowsOverlap0< TMatrix >::extract(), ug::ComPol_MatCopyRowsOverlap0< TMatrix >::extract(), ug::ComPol_MatAddSetZeroInnerInterfaceCouplings< TMatrix >::extract(), ug::CommunicationScheme< TDerived, TValue >::extract(), ug::CommunicationScheme< TDerived, bool >::extract(), ug::ComPol_MatCopyDiag< TMatrix >::extract(), ug::ComPol_MatCreateOverlap< TMatrix >::extract(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_free_id(), pcl::OrderedInterface< TType, TContainer, TAlloc >::insert(), ug::SlicingData< TVec, N >::replace_indices_in_layout(), ug::SerializeInterface(), and ug::SetInterfaceValues().

◆ end() [2/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
const_iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::end ( ) const
inline

◆ erase()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::erase ( iterator  iter)
inline

◆ find_insert_pos_sorted()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
template<class TCompare >
iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::find_insert_pos_sorted ( const Element  e,
TCompare  cmp 
)
inline

find insertion position for an element to be inserted

Returns
iterator to insertion position if found; end-iterator otherwise
Warning
This method implicitly requires the interface to be sorted w.r.t. the passed compare object. If it is not, the position might not be correct.

References pcl::OrderedInterface< TType, TContainer, TAlloc >::cmp(), and pcl::OrderedInterface< TType, TContainer, TAlloc >::m_elements.

◆ get_element() [1/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
const Element& pcl::OrderedInterface< TType, TContainer, TAlloc >::get_element ( const_iterator  iter) const
inline

◆ get_element() [2/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
Element& pcl::OrderedInterface< TType, TContainer, TAlloc >::get_element ( iterator  iter)
inline

Referenced by ug::DoFDistribution::add_indices_from_layouts(), ug::AddEntriesToIndexLayout_DomainDecomposition(), ug::AddEntriesToSurfaceIndexLayout(), ug::ParallelVector< TVector >::check_storage_type(), ug::ComPol_VecCopy< TVector >::collect(), ug::ComPol_VecScaleCopy< TVector >::collect(), ug::ComPol_VecAdd< TVector >::collect(), ug::ComPol_VecScaleAdd< TVector >::collect(), ug::ComPol_VecAddSetZero< TVector >::collect(), ug::ComPol_VecSubtract< TVector >::collect(), ug::ComPol_CheckConsistency< TVector >::collect(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::collect(), ug::ComPol_MatDistributeDiag< TAlgebra >::collect(), ug::ComPol_MatAddRowsOverlap0< TMatrix >::collect(), ug::ComPol_MatCopyRowsOverlap0< TMatrix >::collect(), ug::ComPol_MatAddSetZeroInnerInterfaceCouplings< TMatrix >::collect(), ug::CommunicationScheme< TDerived, TValue >::collect(), ug::CommunicationScheme< TDerived, bool >::collect(), ug::ComPol_MatCopyDiag< TMatrix >::collect(), ug::ComPol_MatCreateOverlap< TMatrix >::collect(), ug::CopyInterfaceEntrysToDomainDecompositionLayouts(), ug::ComPol_VecCopy< TVector >::extract(), ug::ComPol_VecScaleCopy< TVector >::extract(), ug::ComPol_VecAdd< TVector >::extract(), ug::ComPol_VecScaleAdd< TVector >::extract(), ug::ComPol_VecAddSetZero< TVector >::extract(), ug::ComPol_VecSubtract< TVector >::extract(), ug::ComPol_CheckConsistency< TVector >::extract(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::extract(), ug::ComPol_MatDistributeDiag< TAlgebra >::extract(), ug::ComPol_MatAddRowsOverlap0< TMatrix >::extract(), ug::ComPol_MatCopyRowsOverlap0< TMatrix >::extract(), ug::ComPol_MatAddSetZeroInnerInterfaceCouplings< TMatrix >::extract(), ug::CommunicationScheme< TDerived, TValue >::extract(), ug::CommunicationScheme< TDerived, bool >::extract(), ug::ComPol_MatCopyDiag< TMatrix >::extract(), ug::ComPol_MatCreateOverlap< TMatrix >::extract(), ug::GetHighestReferencedIndex(), ug::MatExtractDiagOnLayout(), ug::MatWriteDiagOnLayout(), ug::PermuteIndicesInIndexLayout(), ug::SlicingData< TVec, N >::replace_indices_in_layout(), ug::ScaleLayoutValues(), ug::SerializeInterface(), ug::SetInterfaceValues(), and ug::SetLayoutValues().

◆ get_free_id()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
size_t pcl::OrderedInterface< TType, TContainer, TAlloc >::get_free_id ( )
inlineprotected

◆ get_local_id() [1/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
size_t pcl::OrderedInterface< TType, TContainer, TAlloc >::get_local_id ( const_iterator  iter) const
inline

◆ get_local_id() [2/2]

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
size_t pcl::OrderedInterface< TType, TContainer, TAlloc >::get_local_id ( iterator  iter)
inline

◆ get_target_proc()

◆ insert()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
iterator pcl::OrderedInterface< TType, TContainer, TAlloc >::insert ( const Element elem,
iterator  insertBefore 
)
inline

Insert an element before the passed iterator.

The insertion iterator is best determined using the find_insert_pos_sorted() method designed for this purpose.

Returns
iterator to inserted element
Note
The method is intended for manipulation of the interface after it has been ordered and only suited for a small number of insertions (typically a single insertion). For more insertions, consider push_back() and re-ordering.
Warning
This method is highly experimental. Use with extreme caution!

References pcl::OrderedInterface< TType, TContainer, TAlloc >::end(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_free_id(), pcl::OrderedInterface< TType, TContainer, TAlloc >::m_elements, and pcl::OrderedInterface< TType, TContainer, TAlloc >::m_size.

◆ push_back()

◆ size()

◆ sort()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
template<class TCompare >
void pcl::OrderedInterface< TType, TContainer, TAlloc >::sort ( TCompare  cmp)
inline

◆ swap()

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
void pcl::OrderedInterface< TType, TContainer, TAlloc >::swap ( OrderedInterface< TType, TContainer, TAlloc > &  interface)
inline

Member Data Documentation

◆ m_elements

◆ m_idCounter

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
size_t pcl::OrderedInterface< TType, TContainer, TAlloc >::m_idCounter
protected

◆ m_size

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
size_t pcl::OrderedInterface< TType, TContainer, TAlloc >::m_size
protected

◆ m_targetProc

template<class TType , template< class T, class Alloc > class TContainer = std::vector, template< class T > class TAlloc = std::allocator>
int pcl::OrderedInterface< TType, TContainer, TAlloc >::m_targetProc
protected

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