An indirect list with addressing based on sorting. The list is sorted upon construction or when explicitly requested. More...
Public Member Functions | |
SortList (const UList< T > &values) | |
Shallow copy values list reference, sort immediately. More... | |
template<class Compare > | |
SortList (const UList< T > &values, const Compare &comp) | |
const labelUList & | indices () const |
Return the list of sorted indices. Updated every sort. More... | |
labelList & | indices () |
Return the list of indices. Updated every sort. More... | |
void | reverse () |
Reverse the indices. More... | |
void | reset () |
Reset list indices to identity. More... | |
template<class Compare > | |
void | sort (const Compare &comp) |
Sort the list using the given value comparator. More... | |
void | sort () |
void | reverseSort () |
Reverse (stable) sort the list. More... | |
Public Member Functions inherited from IndirectList< T > | |
IndirectList (const UList< T > &values, const labelUList &addr) | |
Copy construct addressing, shallow copy values reference. More... | |
IndirectList (const UList< T > &values, labelList &&addr) | |
Move construct addressing, shallow copy values reference. More... | |
IndirectList (const UList< T > &values, const Foam::zero) | |
Zero-sized addressing, shallow copy values reference. More... | |
IndirectList (const IndirectList< T > &list) | |
Copy construct addressing, shallow copy values reference. More... | |
IndirectList (IndirectList< T > &&list) | |
Move construct addressing, shallow copy values reference. More... | |
IndirectList (const UIndirectList< T > &list) | |
Copy construct addressing, shallow copy values reference. More... | |
void | operator= (const IndirectList< T > &rhs) |
Deep copy values, Fatal if list sizes are not identical. More... | |
const Addr & | addressing () const noexcept |
The list addressing. More... | |
Addr & | addressing () noexcept |
The list addressing. More... | |
Public Member Functions inherited from UIndirectList< T > | |
UIndirectList (const UList< T > &values, const labelUList &addr) | |
Shallow copy values and addressing. More... | |
UIndirectList (const UIndirectList< T > &list) | |
Copy construct (shallow copy values and addressing) More... | |
void | operator= (const UIndirectList< T > &rhs) |
Deep copy values, Fatal if list sizes are not identical. More... | |
An indirect list with addressing based on sorting. The list is sorted upon construction or when explicitly requested.
Uses the std::stable_sort() algorithm.
Definition at line 54 of file SortList.H.
Shallow copy values list reference, sort immediately.
Definition at line 33 of file SortListI.H.
References SortList< T >::sort().
Shallow copy values list reference, sort with given value comparator.
Definition at line 43 of file SortListI.H.
|
inline |
Return the list of sorted indices. Updated every sort.
Same as addressing()
Definition at line 54 of file SortListI.H.
|
inline |
Return the list of indices. Updated every sort.
Same as addressing()
Definition at line 61 of file SortListI.H.
|
inline |
Reverse the indices.
Definition at line 68 of file SortListI.H.
References Foam::reverse().
|
inline |
Reset list indices to identity.
Definition at line 75 of file SortListI.H.
References Foam::ListOps::identity(), List< T >::resize(), and Foam::HashTableOps::values().
|
inline |
Sort the list using the given value comparator.
Definition at line 87 of file SortListI.H.
References Foam::constant::physicoChemical::b, Foam::ListOps::identity(), List< T >::resize(), UList< T >::size(), and Foam::HashTableOps::values().
|
inline |
Forward (stable) sort the list. Functionally identical to sort with std::less<T>()
Definition at line 108 of file SortListI.H.
References Foam::constant::physicoChemical::b, Foam::ListOps::identity(), List< T >::resize(), UList< T >::size(), and Foam::HashTableOps::values().
Referenced by SortList< T >::SortList().
|
inline |
Reverse (stable) sort the list.
Definition at line 130 of file SortListI.H.
References Foam::constant::physicoChemical::b, Foam::ListOps::identity(), List< T >::resize(), UList< T >::size(), and Foam::HashTableOps::values().