FreePOOMA
2.4.1
|
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) |
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< 4 >::DescriptorBase(), FieldOffsetList< Dim >::FieldOffsetList(), Loc< Dim2 >::Loc(), DescriptorBase< 4 >::operator=(), FieldOffsetList< Dim >::operator=(), Loc< Dim2 >::operator=(), Connector< Array< Dim, T, EngineTag >, Lux >::update(), and Connector< ConnectPair< DynamicArray< T1, E >, DynamicArray< T2, E > >, Lux >::update().
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().
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.
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.
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().
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.