Pooma::Algorithms Namespace Reference


Classes

struct  IsConcrete

Functions

template<class It , class It2 >
It2 copy (It begin, It end, It2 dest)
 void copy(Iterator begin, Iterator end, Iterator2 dest)
template<class It , class It2 >
It2 copy_special (It begin, It end, It2 dest, IsConcrete< true >)
 void copy_special(Iterator begin, Iterator end, Iterator2 dest, IsConcrete<true>)
template<class It , class It2 >
It2 copy_special (It begin, It end, It2 dest, IsConcrete< false >)
 void copy_special(Iterator begin, Iterator end, Iterator2 dest, IsConcrete<false>)
template<class DataIterator , class KillIterator >
std::iterator_traits
< DataIterator >
::difference_type 
delete_backfill (DataIterator data_begin, DataIterator data_end, const KillIterator kill_begin, const KillIterator kill_end, typename std::iterator_traits< DataIterator >::difference_type offset=0)
 difference_type delete_backfill(DataIterator, DataIterator, KillIterator, KillIterator, difference_type)
template<class DataIterator , class KillIterator >
std::iterator_traits
< DataIterator >
::difference_type 
delete_shiftup (DataIterator data_begin, DataIterator data_end, KillIterator kill_begin, KillIterator kill_end, typename std::iterator_traits< DataIterator >::difference_type offset=0)
 difference_type delete_shiftup(DataIterator, DataIterator, KillIterator, KillIterator, difference_type)
template<class DataIterator >
DataIterator find_most_common (DataIterator dataBegin, DataIterator dataEnd)
 DataIterator find_most_common(DataIterator, DataIterator).

Function Documentation

template<class It , class It2 >
It2 Pooma::Algorithms::copy ( It  begin,
It  end,
It2  dest 
) [inline]

void copy(Iterator begin, Iterator end, Iterator2 dest)

General version of Pooma's copy routine. Uses ElementProperties to determine whether elements are concrete or not and calls the appropriate specialization.

This will work with overlapping regions if the destination is below the source (std::copy has the same limitation).

References copy_special(), and PAssert.

Referenced by Pooma::PoomaDA< Dim >::assign(), copy_special(), delete_shiftup(), DescriptorBase< 2 >::DescriptorBase(), FieldOffsetList< Dim >::FieldOffsetList(), Loc< Dim2 >::Loc(), Loc< Dim2 >::operator=(), FieldOffsetList< Dim >::operator=(), DescriptorBase< 2 >::operator=(), Connector< ConnectPair< DynamicArray< T1, E >, DynamicArray< T2, E > >, Lux >::update(), and Connector< Array< Dim, T, EngineTag >, Lux >::update().

template<class It , class It2 >
It2 Pooma::Algorithms::copy_special ( It  begin,
It  end,
It2  dest,
IsConcrete< true >   
) [inline]

void copy_special(Iterator begin, Iterator end, Iterator2 dest, IsConcrete<true>)

Version of Pooma's copy routine for "concrete" types. Uses either the stl copy algorithm or memmove to copy the data, depending on the data size. (Some stl copy algorithms may already make this optimization in which case this could be simplified - probably should have a cpp macro that comments out the memmove version for platform where copy is just as fast.)

References copy().

Referenced by copy().

template<class It , class It2 >
It2 Pooma::Algorithms::copy_special ( It  begin,
It  end,
It2  dest,
IsConcrete< false >   
) [inline]

void copy_special(Iterator begin, Iterator end, Iterator2 dest, IsConcrete<false>)

Version of Pooma's copy routine for non-"concrete" types. This uses ElementProperties::construct to do the copy.

template<class DataIterator , class KillIterator >
std::iterator_traits<DataIterator>::difference_type Pooma::Algorithms::delete_backfill ( DataIterator  data_begin,
DataIterator  data_end,
const KillIterator  kill_begin,
const KillIterator  kill_end,
typename std::iterator_traits< DataIterator >::difference_type  offset = 0 
) [inline]

difference_type delete_backfill(DataIterator, DataIterator, KillIterator, KillIterator, difference_type)

Loop through the data and destroy the desired elements, replacing them with elements from the end of the list. The KillIterators refer to a list of indices of elements to be killed. The final optional argument provides an offset for the kill list index values, for cases in which they are not zero-based. Return the number of elements killed.

NOTE: This algorithm assumes that the killList is sorted and that all iterators are random-access iterators.

References PAssert.

template<class DataIterator , class KillIterator >
std::iterator_traits<DataIterator>::difference_type Pooma::Algorithms::delete_shiftup ( DataIterator  data_begin,
DataIterator  data_end,
KillIterator  kill_begin,
KillIterator  kill_end,
typename std::iterator_traits< DataIterator >::difference_type  offset = 0 
) [inline]

difference_type delete_shiftup(DataIterator, DataIterator, KillIterator, KillIterator, difference_type)

Loop through the data and destroy the desired elements, shifting remaining elements forward in the list so as to maintain their order. The KillIterators refer to a list of indices of elements to be killed. The final optional argument provides an offset for the kill list index values, for cases in which they are not zero-based. Return the number of elements killed.

NOTE: This algorithm assumes that the killList is sorted and that all iterators are random-access iterators.

References copy().

template<class DataIterator >
DataIterator Pooma::Algorithms::find_most_common ( DataIterator  dataBegin,
DataIterator  dataEnd 
) [inline]

DataIterator find_most_common(DataIterator, DataIterator).

Loop through the data, counting each distinct value and return an iterator pointing to the most common one (or the end of the sequence if not found).

NOTE: This algorithm assumes that the data is sorted.


Generated on Wed Mar 16 06:22:48 2011 for FreePOOMA by  doxygen 1.5.9