分而治之方法還可以用于實現另一種完全不同的排序方法,這種排序法稱為快速排序(quick sort)。在這種方法中, n 個元素被分成三段(組):左段l e f t,右段r i g h t和中段m i d d l e。中段僅包含一個元素。左段中各元素都小于等于中段元素,右段中各元素都大于等于中段元素。因此l e f t和r i g h t中的元素可以獨立排序,并且不必對l e f t和r i g h t的排序結果進行合并。m i d d l e中的元素被稱為支點( p i v o t )。圖1 4 - 9中給出了快速排序的偽代碼
假定已經有許多應用采用了程序1 - 1 5中所定義的C u r r e n c y類,現在我們想要對C u r r e n c y類
的描述進行修改,使其應用頻率最高的兩個函數A d d和I n c r e m e n t可以運行得更快,從而提高應
用程序的執行速度。由于用戶僅能通過p u b l i c部分所提供的接口與C u r r e n c y類進行交互,
This little Program allows you to send commands to the CardReader (CT-BCS) or to the Card itself.
First you will be ask to what Port the Reader is connected (0=COM1, 1=COM2).
Then the Class-Byte (CLA), Instruction-Byte (INS), Parameter 1 (P1), Parameter 2 (P2).
If wou don愒 want to send Parameter 3 (P3) press Ctrl-d (^d).
If you enter a number then you have to the Bytes of the Datafield.
After the last Byte of the Datafield is entered the whole APDU is send the replay is displayed. After that you can send the next APDU.