From d54fe7c1f704a63824c5bfa0ece65245572e9b27 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 4 Mar 2015 21:21:30 -0500 Subject: Initial commit --- src/slalib/sun67.htx/node143.html | 133 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 src/slalib/sun67.htx/node143.html (limited to 'src/slalib/sun67.htx/node143.html') diff --git a/src/slalib/sun67.htx/node143.html b/src/slalib/sun67.htx/node143.html new file mode 100644 index 0000000..46f3e9e --- /dev/null +++ b/src/slalib/sun67.htx/node143.html @@ -0,0 +1,133 @@ + + + + +SLA_PERMUT - Next Permutation + + + + + + + + + + + + +

+ +next + +up + +previous +
+ Next: SLA_PERTEL - Perturbed Orbital Elements +
+Up: SUBPROGRAM SPECIFICATIONS +
+ Previous: SLA_PDQ2H - H.A. for a Given P.A. +

+

+

SLA_PERMUT - Next Permutation +   +

+
+
ACTION: +
Generate the next permutation of a specified number of items. +
CALL: +
CALL sla_PERMUT (N, ISTATE, IORDER, J) +

+

+
GIVEN: +
+
+ + + + + + + + + +
NInumber of items: there will be N! permutations
ISTATEI(N)state, ISTATE(1)=-1 to initialize
+

+
RETURNED: +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ISTATEI(N)state, updated ready for next time
IORDERI(N)next permutation of numbers 1,2,...,N
JIstatus:
-1 = illegal N (zero or less is illegal)
0 = OK
+1 = no more permutations available
+

+
NOTES: +
+
1. +
This routine returns, in the IORDER array, the integers 1 to N +inclusive, in an order that depends on the current contents of +the ISTATE array. Before calling the routine for the first + time, the caller must set the first element of the ISTATE array + to -1 (any negative number will do) to cause the ISTATE array + to be fully initialized. +
2. +
The first permutation to be generated is: +
IORDER(1)=N, IORDER(2)=N-1, ..., IORDER(N)=1 +
+ This is also the permutation returned for the ``finished'' (J=1) case. + The final permutation to be generated is: +
IORDER(1)=1, IORDER(2)=2, ..., IORDER(N)=N +
+
3. +
If the ``finished'' (J=1) status is ignored, the routine continues + to deliver permutations, the pattern repeating every N! calls. +
+

+ +next + +up + +previous +
+ Next: SLA_PERTEL - Perturbed Orbital Elements +
+Up: SUBPROGRAM SPECIFICATIONS +
+ Previous: SLA_PDQ2H - H.A. for a Given P.A. +

+

+

+SLALIB --- Positional Astronomy Library
Starlink User Note 67
P. T. Wallace
12 October 1999
E-mail:ptw@star.rl.ac.uk
+
+ + -- cgit