|
|
|
SortableList< T > Class Template ReferenceA list that is sorted upon construction or when explicitly requested with the sort() method. More...
Inheritance diagram for SortableList< T >:
![]()
Collaboration diagram for SortableList< T >:
![]()
Detailed Descriptiontemplate<class T>
A list that is sorted upon construction or when explicitly requested with the sort() method.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SortableList | ( | ) | [inline] |
Null constructor, sort later (eg, after assignment or transfer).
Definition at line 42 of file SortableList.C.
| SortableList | ( | const UList< T > & | values | ) | [inline, explicit] |
| SortableList | ( | const Xfer< List< T > > & | values | ) | [inline, explicit] |
Construct from transferred List, sorting immediately.
Definition at line 56 of file SortableList.C.
References SortableList< T >::sort().

| SortableList | ( | const label | size | ) | [inline, explicit] |
Construct given size. Sort later on.
The indices remain empty until the list is sorted
Definition at line 65 of file SortableList.C.
References SortableList< T >::sort().

| SortableList | ( | const label | size, | |
| const T & | val | |||
| ) | [inline] |
Construct given size and initial value. Sort later on.
The indices remain empty until the list is sorted
Definition at line 72 of file SortableList.C.
| SortableList | ( | const SortableList< T > & | lst | ) | [inline] |
| const labelList& indices | ( | ) | const [inline] |
Return the list of sorted indices. Updated every sort.
Definition at line 92 of file SortableList.H.
Referenced by primitiveMesh::checkPointNearness(), Foam::matchPoints(), Foam::mergePoints(), and PatchTools::sortedEdgeFaces().

| labelList& indices | ( | ) | [inline] |
Return non-const access to the sorted indices. Updated every sort.
Definition at line 98 of file SortableList.H.
| void clear | ( | ) | [inline] |
Clear the list and the indices.
Reimplemented from List< T >.
Definition at line 90 of file SortableList.C.
Referenced by SortableList< T >::shrink().

| Foam::List< T > & shrink | ( | ) | [inline] |
Clear the indices and return a reference to the underlying List.
Definition at line 98 of file SortableList.C.
References SortableList< T >::clear().

| void sort | ( | ) | [inline] |
(stable) sort the list (if changed after construction time)
also resizes the indices as required
Definition at line 106 of file SortableList.C.
Referenced by SortableList< T >::SortableList(), and PatchTools::sortedEdgeFaces().

| void reverseSort | ( | ) | [inline] |
Reverse (stable) sort the list.
Definition at line 121 of file SortableList.C.
References UList< T >::operator[]().

| Foam::Xfer< Foam::List< T > > xfer | ( | ) | [inline] |
Transfer contents to the Xfer container as a plain List.
Reimplemented from List< T >.
Definition at line 137 of file SortableList.C.
References UList< T >::operator[]().

| void operator= | ( | const T & | t | ) | [inline] |
Assignment of all entries to the given value.
Reimplemented from List< T >.
Definition at line 146 of file SortableList.C.
Referenced by SortableList< T >::operator=().

| void operator= | ( | const UList< T > & | rhs | ) | [inline] |
Assignment from UList operator. Takes linear time.
Reimplemented from List< T >.
Definition at line 153 of file SortableList.C.
References SortableList< T >::operator=().

| void operator= | ( | const SortableList< T > & | rhs | ) | [inline] |
Assignment operator. Takes linear time.
Definition at line 161 of file SortableList.C.
References SortableList< T >::operator=().
