Difference between revisions of "PermuteTPA"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function PermuteTPA(const TPA: TPointArray): T2DPointArray; </source> ==Availability== SCAR Divi 3.38 > Current ==Descripti...") |
(No difference)
|
Latest revision as of 12:38, 8 December 2012
Contents
Definition
function PermuteTPA(const TPA: TPointArray): T2DPointArray;
Availability
SCAR Divi 3.38 > Current
Description
Returns all permutations of the given array TPA.
Example
var ATPA: T2DPointArray; Idx, Len: Integer; begin ATPA := PermuteTPA([Point(0, 0), Point(1, 1), Point(2, 2)]); Len := Length(ATPA); for Idx := 0 to Len - 1 do WriteLn(TPAToStr(ATPA[Idx])); end.
Output:
(2,2);(0,0);(1,1) (2,2);(1,1);(0,0) (1,1);(2,2);(0,0) (0,0);(2,2);(1,1) (1,1);(0,0);(2,2) (0,0);(1,1);(2,2)