|
SPH
|
Utilities to simplify working with arrays. More...
#include "math/MathUtils.h"#include "objects/containers/ArrayView.h"#include "objects/containers/Tuple.h"Go to the source code of this file.
Functions | |
| template<typename U , typename T , typename TFunctor , typename TComparator > | |
| NAMESPACE_SPH_BEGIN Iterator< T > | findByComparator (ArrayView< T > container, TFunctor &&functor, const U defaultValue, TComparator &&comparator) |
| template<typename U , typename T , typename TFunctor > | |
| Iterator< T > | findByMaximum (ArrayView< T > container, TFunctor &&functor) |
| template<typename U , typename T , typename TFunctor > | |
| Iterator< T > | findByMinimum (ArrayView< T > container, TFunctor &&functor) |
| template<typename U , typename T , typename TFunctor , typename TComparator > | |
| Tuple< Iterator< T >, Iterator< T > > | findPairByComparator (ArrayView< T > container, TFunctor &&functor, const U defaultValue, TComparator &&comparator) |
| template<typename U , typename T , typename TFunctor > | |
| Tuple< Iterator< T >, Iterator< T > > | findPairByMaximum (ArrayView< T > container, TFunctor &&functor) |
| template<typename U , typename T , typename TFunctor > | |
| Tuple< Iterator< T >, Iterator< T > > | findPairByMinimum (ArrayView< T > container, TFunctor &&functor) |
| template<typename TStorage , typename TFunctor > | |
| int | getCountMatching (const TStorage &container, TFunctor &&functor) |
| template<typename TStorage , typename TFunctor > | |
| bool | areAllMatching (const TStorage &container, TFunctor &&functor) |
| template<typename TStorage , typename TFunctor > | |
| bool | isAnyMatching (const TStorage &container, TFunctor &&functor) |
| template<typename TStorage > | |
| bool | areElementsUnique (const TStorage &container) |
| template<typename TStorage1 , typename TStorage2 > | |
| bool | haveCommonElements (const TStorage1 &c1, const TStorage2 &c2) |
| Returns true if two containers have at least one element with the same value. More... | |
| bool areAllMatching | ( | const TStorage & | container, |
| TFunctor && | functor | ||
| ) |
Definition at line 103 of file ArrayUtils.h.
| bool areElementsUnique | ( | const TStorage & | container | ) |
Returns true if all elements stored in the container are unique, i.e. the container does not store any value more than once.
Definition at line 125 of file ArrayUtils.h.
| NAMESPACE_SPH_BEGIN Iterator<T> findByComparator | ( | ArrayView< T > | container, |
| TFunctor && | functor, | ||
| const U | defaultValue, | ||
| TComparator && | comparator | ||
| ) |
Definition at line 15 of file ArrayUtils.h.
| Iterator<T> findByMaximum | ( | ArrayView< T > | container, |
| TFunctor && | functor | ||
| ) |
Definition at line 32 of file ArrayUtils.h.
| Iterator<T> findByMinimum | ( | ArrayView< T > | container, |
| TFunctor && | functor | ||
| ) |
Definition at line 41 of file ArrayUtils.h.
| Tuple<Iterator<T>, Iterator<T> > findPairByComparator | ( | ArrayView< T > | container, |
| TFunctor && | functor, | ||
| const U | defaultValue, | ||
| TComparator && | comparator | ||
| ) |
Returns first the lower iterator
Definition at line 51 of file ArrayUtils.h.
| Tuple<Iterator<T>, Iterator<T> > findPairByMaximum | ( | ArrayView< T > | container, |
| TFunctor && | functor | ||
| ) |
Definition at line 76 of file ArrayUtils.h.
| Tuple<Iterator<T>, Iterator<T> > findPairByMinimum | ( | ArrayView< T > | container, |
| TFunctor && | functor | ||
| ) |
Definition at line 84 of file ArrayUtils.h.
| int getCountMatching | ( | const TStorage & | container, |
| TFunctor && | functor | ||
| ) |
Definition at line 92 of file ArrayUtils.h.
| bool haveCommonElements | ( | const TStorage1 & | c1, |
| const TStorage2 & | c2 | ||
| ) |
Returns true if two containers have at least one element with the same value.
Definition at line 139 of file ArrayUtils.h.
| bool isAnyMatching | ( | const TStorage & | container, |
| TFunctor && | functor | ||
| ) |
Definition at line 113 of file ArrayUtils.h.