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/node35.html | 142 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 src/slalib/sun67.htx/node35.html (limited to 'src/slalib/sun67.htx/node35.html') diff --git a/src/slalib/sun67.htx/node35.html b/src/slalib/sun67.htx/node35.html new file mode 100644 index 0000000..8723385 --- /dev/null +++ b/src/slalib/sun67.htx/node35.html @@ -0,0 +1,142 @@ + + + + +SLA_COMBN - Next Combination + + + + + + + + + + + + +

+ +next + +up + +previous +
+ Next: SLA_CR2AF - Radians to Deg,Arcmin,Arcsec +
+Up: SUBPROGRAM SPECIFICATIONS +
+ Previous: SLA_CLYD - Calendar to Year, Day +

+

+

SLA_COMBN - Next Combination +   +

+
+
ACTION: +
Generate the next combination, a subset of a specified size chosen +from a specified number of items. +

CALL: +
CALL sla_COMBN (NSEL, NCAND, LIST, J) +

+

+
GIVEN: +
+
+ + + + + + + + + +
NSELInumber of items (subset size)
NCANDInumber of candidates (set size)
+

+
GIVEN and RETURNED: +
+
+ + + + + +
LISTI(NSEL)latest combination, LIST(1)=0 to initialize
+

+
RETURNED: +
+
+ + + + + + + + + + + + + + + + + +
JIstatus:
-1 = illegal NSEL or NCAND
0 = OK
+1 = no more combinations available
+

+
NOTES: +
+
1. +
NSEL and NCAND must both be at least 1, and NSEL must be less +than or equal to NCAND. +
2. +
This routine returns, in the LIST array, a subset of NSEL integers + chosen from the range 1 to NCAND inclusive, in ascending order. + Before calling the routine for the first time, the caller must set + the first element of the LIST array to zero (any value less than 1 + will do) to cause initialization. +
3. +
The first combination to be generated is: +
LIST(1)=1, LIST(2)=2, ..., LIST(NSEL)=NSEL +
+ This is also the combination returned for the ``finished'' (J=1) case. + The final permutation to be generated is: +
LIST(1)=NCAND, LIST(2)=NCAND-1, ...,
+                                LIST(NSEL)=NCAND-NSEL+1 +
+
4. +
If the ``finished'' (J=1) status is ignored, the routine + continues to deliver combinations, the pattern repeating + every NCAND!/(NSEL!(NCAND-NSEL)!) calls. +
5. +
The algorithm is by R.F.Warren-Smith (private communication). +
+

+ +next + +up + +previous +
+ Next: SLA_CR2AF - Radians to Deg,Arcmin,Arcsec +
+Up: SUBPROGRAM SPECIFICATIONS +
+ Previous: SLA_CLYD - Calendar to Year, Day +

+

+

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