Quicksortascending

From Mesham

Jump to: navigation, search

Overview

The quicksortascending function will perform quicksort on an array or list of reference records to order them in an ascending manner. For arrays, pass in the array and it will simply do the quicksort with reference to the data. For reference records, pass in the head (1st record), the comparator field and the linking field.

  • Pass: For an array, just the array. For a reference record, the first record, the comparator field and the linking field.
  • Returns: Nothing (the function modifies the array/record passed in.)

Example

quicksortascending[head,"startkey","next"];

This is an exert of Gadget-2 Mesham domain decomposition. It will quicksort the list (starting with node head), via the startkey, and linking each node using its next member.

Personal tools