Difference between revisions of "SortATPA"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure SortATPA(var ATPA: T2DPointArray); </source> ==Availability== SCAR Divi 3.28 > Current ==Description== Sorts all the...")
 
(No difference)

Latest revision as of 00:57, 24 October 2011

Definition

procedure SortATPA(var ATPA: T2DPointArray);

Availability

SCAR Divi 3.28 > Current

Description

Sorts all the subarrays of a given T2DPointArray ATPA with SortTPA wich is based on the fast ShellSort algorithm. An extended function with additional functionality is available as SortATPAEx.

Example

var
  ATPA: T2DPointArray;
  i: Integer;

begin
  SetLength(ATPA, 3);
  ATPA[0] := [Point(1, 6), Point(5, 4), Point(1, 5)];
  ATPA[1] := [Point(1, 1), Point(2, 2)];
  ATPA[2] := [Point(5, 10)];
  SortATPA(ATPA);
  for i := 0 to High(ATPA) do
    WriteLn(TPAToStr(ATPA[i]));
end.

Output:

(1,5);(1,6);(5,4)
(1,1);(2,2)
(5,10)

See Also