|
NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
Abstract parent class to implement the sorting functionality (using Quicksort) on a more generic level. More...
#include <sorter.hpp>
Public Member Functions | |
| virtual | ~Sorter () |
| bool | qSort (int *nIndex, int nElements, int nColumn, long long int nLeft, long long int nRight, int nSign) |
| This public member function is the interface to the quicksort algorithm, which itself is implemented as a private member function of this class. More... | |
| bool | sortSubList (int *nIndex, int nElements, ColumnKeys *KeyList, long long int i1, long long int i2, long long int j1, int nSign, long long int nColumns) |
| This public member function handles the hierarchical sorting process of many columns together. The ColumnKeys object contains the necessary information needed for the hierarchical sorting. More... | |
| ColumnKeys * | evaluateKeyList (std::string &sKeyList, long long int nColumnCount) |
| This public member function creates a ColumnKeys object from a string containing the hierarchical sorting order for the current sorting process. More... | |
Protected Member Functions | |
| virtual int | compare (int i, int j, int col)=0 |
| virtual bool | isValue (int line, int col)=0 |
Private Member Functions | |
| bool | qSortImplementation (int *nIndex, int nElements, int nColumn, long long int nLeft, long long int nRight, int nSign) |
| This private member function is the actual implementation of the quicksort algorithm. More... | |
Abstract parent class to implement the sorting functionality (using Quicksort) on a more generic level.
Definition at line 30 of file sorter.hpp.
|
inlinevirtual |
Definition at line 42 of file sorter.hpp.
|
protectedpure virtual |
Implemented in NumeRe::Cluster, Memory, and StringInternalMemory.
Referenced by qSortImplementation(), and sortSubList().
| ColumnKeys * Sorter::evaluateKeyList | ( | std::string & | sKeyList, |
| long long int | nColumnCount | ||
| ) |
This public member function creates a ColumnKeys object from a string containing the hierarchical sorting order for the current sorting process.
| sKeyList | string& |
| nColumnCount | long longint |
Definition at line 252 of file sorter.cpp.
References evaluateKeyList(), getMatchingParenthesis(), ColumnKeys::nKey, StrToInt(), and ColumnKeys::subkeys.
Referenced by evaluateKeyList(), Memory::sortElements(), and StringInternalMemory::sortElements().
|
protectedpure virtual |
Implemented in NumeRe::Cluster, Memory, and StringInternalMemory.
Referenced by qSort().
| bool Sorter::qSort | ( | int * | nIndex, |
| int | nElements, | ||
| int | nColumn, | ||
| long long int | nLeft, | ||
| long long int | nRight, | ||
| int | nSign | ||
| ) |
This public member function is the interface to the quicksort algorithm, which itself is implemented as a private member function of this class.
| nIndex | int* |
| nElements | int |
| nColumn | int |
| nLeft | long longint |
| nRight | long longint |
| nSign | int |
Definition at line 40 of file sorter.cpp.
References isValue(), and qSortImplementation().
Referenced by Memory::sortElements(), NumeRe::Cluster::sortElements(), StringInternalMemory::sortElements(), and sortSubList().
|
private |
This private member function is the actual implementation of the quicksort algorithm.
| nIndex | int* |
| nElements | int |
| nColumn | int |
| nLeft | long longint |
| nRight | long longint |
| nSign | int |
Definition at line 93 of file sorter.cpp.
References compare(), and qSortImplementation().
Referenced by qSort(), and qSortImplementation().
| bool Sorter::sortSubList | ( | int * | nIndex, |
| int | nElements, | ||
| ColumnKeys * | KeyList, | ||
| long long int | i1, | ||
| long long int | i2, | ||
| long long int | j1, | ||
| int | nSign, | ||
| long long int | nColumns | ||
| ) |
This public member function handles the hierarchical sorting process of many columns together. The ColumnKeys object contains the necessary information needed for the hierarchical sorting.
| nIndex | int* |
| nElements | int |
| KeyList | ColumnKeys* |
| i1 | long longint |
| i2 | long longint |
| j1 | long longint |
| nSign | int |
| nColumns | long longint |
Definition at line 196 of file sorter.cpp.
References compare(), ColumnKeys::nKey, qSort(), sortSubList(), and ColumnKeys::subkeys.
Referenced by Memory::sortElements(), StringInternalMemory::sortElements(), and sortSubList().