diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-04-10 19:20:48 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-04-10 19:20:48 +0000 |
commit | 160cc1e115eeb75638dce6effdd16b2bc810ddb4 (patch) | |
tree | b791a95695a7cf674e61a6153139c6f9c6c491fa /packages/fcl-stl/doc/arrayutils.tex | |
parent | 3843727e74b31bbf2a34e7e3b89ee422269f770e (diff) | |
parent | 413a6aa6469e6c297780217a27ca91363c637944 (diff) | |
download | fpc-avr.tar.gz |
* rebase to trunk@17295avr
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/avr@17296 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-stl/doc/arrayutils.tex')
-rw-r--r-- | packages/fcl-stl/doc/arrayutils.tex | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/fcl-stl/doc/arrayutils.tex b/packages/fcl-stl/doc/arrayutils.tex new file mode 100644 index 0000000000..b53f8bbf4c --- /dev/null +++ b/packages/fcl-stl/doc/arrayutils.tex @@ -0,0 +1,47 @@ +\chapter{TArrayUtils} + +Set of utilities for manipulating arrays data. + +Takes 3 arguements for specialization. First one is type of array (can be anything, which is +accesible by [] operator, e. g. ordinary array, vector, ...), second one is type of array element. + +%Usage example for sorting: + +%\lstinputlisting[language=Pascal]{sortingexample.pp} + +Members list: + +\begin{longtable}{|m{10cm}|m{5cm}|} +\hline +Method & Complexity guarantees \\ \hline +\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline + +\verb!procedure RandomShuffle(arr: TArr, size:SizeUint)! & +O(N)\\ \hline +\multicolumn{2}{|m{15cm}|}{Shuffles elements in array in random way} \\\hline\hline + +\end{longtable}\chapter{TOrderingArrayUtils} + +Set of utilities for manipulating arrays data. + +Takes 3 arguements for specialization. First one is type of array (can be anything, which is +accesible by [] operator, e. g. ordinary array, vector, ...), second one is type of array element, +third one is comparator class (see TPriorityQueue for definition of comparator class). + +Usage example for sorting: + +\lstinputlisting[language=Pascal]{sortingexample.pp} + +Members list: + +\begin{longtable}{|m{10cm}|m{5cm}|} +\hline +Method & Complexity guarantees \\ \hline +\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline + +\verb!procedure Sort(arr: TArr, size:SizeUint)! & +O(N log N) average and worst case. Uses QuickSort, backed up by HeapSort, when QuickSort ends up in +using too much recursion.\\ \hline +\multicolumn{2}{|m{15cm}|}{Sort array arr, with specified size. Array indexing should be 0 based.} \\\hline\hline + +\end{longtable} |