Functions
ApproxMVBB::ContainerFunctions Namespace Reference

Functions

template<typename Iterator , typename Comp >
Iterator moveConsecutiveToFrontIf (Iterator b, Iterator e, Comp c)
 
template<typename Iterator , typename Func , typename Skip >
Iterator moveConsecutiveToFrontIf (Iterator b, Iterator e, Func f, Skip s)
 
template<typename Iterator , typename Func >
Iterator moveElementsToBackIf (Iterator b, Iterator e, Func f)
 
template<typename Iterator , typename Func >
Iterator moveElementsToFrontIf (Iterator b, Iterator e, Func f)
 

Function Documentation

template<typename Iterator , typename Comp >
Iterator ApproxMVBB::ContainerFunctions::moveConsecutiveToFrontIf ( Iterator  b,
Iterator  e,
Comp  c 
)

Move all sequences S in [b,e) to the front where each element i of the subsequence S =[start,end] fullfils c(start,i). Example: 1 2 2 2 3 3 3 4 5 5 6 -> 1 2 3 4 5 6 (with Comp c=AlmostEqual) This function is especially efficient if we have little items which need to move to the front This function respects the order of the elements

Returns
Iterator r where the range [r,e] is the back part of the vector where Comp c returned true

Definition at line 85 of file ContainerFunctions.hpp.

template<typename Iterator , typename Func , typename Skip >
Iterator ApproxMVBB::ContainerFunctions::moveConsecutiveToFrontIf ( Iterator  b,
Iterator  e,
Func  f,
Skip  s 
)

Move all sequences S in [b,e) to the front where each element i of the subsequence S =[start,end] fullfils Func(start,i). This function skips elements for which s(i) is true Example: 1 2 2 2 3 3 3 4 5 5 6 -> 1 2 3 4 5 6 (with Func=AlmostEqual) This function is especially efficient if we have little items which need to move to the front This function respects the order of the elements

Returns
Iterator r where the range [r,e] is the back part of the vector where Func returned true

Definition at line 119 of file ContainerFunctions.hpp.

template<typename Iterator , typename Func >
Iterator ApproxMVBB::ContainerFunctions::moveElementsToBackIf ( Iterator  b,
Iterator  e,
Func  f 
)

Move elements in the range [b,e] to the back of the container if Func returns true This function is especially efficient if we have little items which need to move to the front Caution: This function does not respect the order of the items (so do not use if container should stay sorted)!

Parameters
bbegin iterator
eend iterator (no past the end iterator of a container!)
Returns
Iterator r where the range [r,e] is the back part of the vector where Func returned true

Definition at line 50 of file ContainerFunctions.hpp.

template<typename Iterator , typename Func >
Iterator ApproxMVBB::ContainerFunctions::moveElementsToFrontIf ( Iterator  b,
Iterator  e,
Func  f 
)

Move elements in the range [b,e) to front of the container if Func returns true This function is especially efficient if we have little items which need to move to the front This function respects the order of the elements

Parameters
biterator to the first item
eiterator to the last item
Returns
Iterator r where the range [r,e] is the back part of the vector where Func returned true

Definition at line 24 of file ContainerFunctions.hpp.



asr_approx_mvbb
Author(s): Gassner Nikolai
autogenerated on Mon Jun 10 2019 12:38:09