Public Member Functions | List of all members
SortList< T > Class Template Reference

An indirect list with addressing based on sorting. The list is sorted upon construction or when explicitly requested. More...

Inheritance diagram for SortList< T >:
Inheritance graph
[legend]
Collaboration diagram for SortList< T >:
Collaboration graph
[legend]

Public Member Functions

 SortList (const UList< T > &values)
 
template<class Compare >
 SortList (const UList< T > &values, const Compare &comp)
 
const labelUListindices () const
 
labelListindices ()
 
void reverse ()
 
void reset ()
 
template<class Compare >
void sort (const Compare &comp)
 
void sort ()
 
void reverseSort ()
 
- Public Member Functions inherited from IndirectList< T >
 IndirectList (const UList< T > &values, const labelUList &addr)
 
 IndirectList (const UList< T > &values, labelList &&addr)
 
 IndirectList (const UList< T > &values, const Foam::zero)
 
 IndirectList (const IndirectList< T > &list)
 
 IndirectList (IndirectList< T > &&list)
 
 IndirectList (const UIndirectList< T > &list)
 
void operator= (const IndirectList< T > &rhs)
 
const Addr & addressing () const noexcept
 
Addr & addressing () noexcept
 
- Public Member Functions inherited from UIndirectList< T >
 UIndirectList (const UList< T > &values, const labelUList &addr)
 
 UIndirectList (const UIndirectList< T > &list)
 
void operator= (const UIndirectList< T > &rhs)
 

Detailed Description

template<class T>
class Foam::SortList< T >

An indirect list with addressing based on sorting. The list is sorted upon construction or when explicitly requested.

Uses the std::stable_sort() algorithm.

Source files

Definition at line 50 of file SortList.H.

Constructor & Destructor Documentation

◆ SortList() [1/2]

SortList ( const UList< T > &  values)
inlineexplicit

Definition at line 26 of file SortListI.H.

References SortList< T >::sort().

Here is the call graph for this function:

◆ SortList() [2/2]

SortList ( const UList< T > &  values,
const Compare &  comp 
)
inline

Definition at line 36 of file SortListI.H.

Member Function Documentation

◆ indices() [1/2]

Foam::labelList & indices
inline

Definition at line 47 of file SortListI.H.

◆ indices() [2/2]

labelList& indices ( )
inline

◆ reverse()

void reverse
inline

Definition at line 61 of file SortListI.H.

References Foam::reverse().

Here is the call graph for this function:

◆ reset()

void reset
inline

Definition at line 68 of file SortListI.H.

References Foam::ListOps::identity(), List::resize(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sort() [1/2]

void sort ( const Compare &  comp)
inline

Definition at line 80 of file SortListI.H.

References Foam::constant::physicoChemical::b, Foam::ListOps::identity(), List::resize(), UList::size(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sort() [2/2]

void sort
inline

Definition at line 101 of file SortListI.H.

References Foam::constant::physicoChemical::b, Foam::ListOps::identity(), List::resize(), UList::size(), and Foam::HashTableOps::values().

Referenced by SortList< T >::SortList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverseSort()

void reverseSort
inline

Definition at line 123 of file SortListI.H.

References Foam::constant::physicoChemical::b, Foam::ListOps::identity(), List::resize(), UList::size(), and Foam::HashTableOps::values().

Here is the call graph for this function:

The documentation for this class was generated from the following files: