ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/cnt.1
Revision: 1.5
Committed: Mon Apr 11 18:08:19 2022 UTC (3 years ago) by greg
Branch: MAIN
CVS Tags: rad5R4, HEAD
Changes since 1.4: +20 -2 lines
Log Message:
feat(cnt): Added -s option to shuffle output

File Contents

# Content
1 .\" RCSid "$Id: cnt.1,v 1.4 2019/07/20 00:57:43 greg Exp $"
2 .TH CNT 1 11/15/93 RADIANCE
3 .SH NAME
4 cnt - index counter
5 .SH SYNOPSIS
6 .B cnt
7 [
8 .B \-s
9 ]
10 N1
11 [
12 N2 ..
13 ]
14 .SH DESCRIPTION
15 .I Cnt
16 counts from 0 to N-1, producing N lines of output.
17 If multiple arguments are given,
18 .I cnt
19 produces a nested array of values where the final counter
20 rotates fastest through its range.
21 The
22 .I \-s
23 option shuffles the output lines, giving a different random
24 order on each invocation.
25 .I Cnt
26 is most useful in conjunction with
27 .I rcalc(1)
28 to produce array values.
29 .SH EXAMPLE
30 To create a 3 by 5 array:
31 .IP "" .2i
32 cnt 3 5
33 .PP
34 To generate a random shuffle of indices 0 through 51:
35 .IP "" .2i
36 cnt -s 52
37 .PP
38 Similar shuffling broken down by suit:
39 .IP "" .2i
40 cnt -s 4 13
41 .SH AUTHOR
42 Greg Ward
43 .SH "SEE ALSO"
44 neaten(1), rcalc(1), rlam(1), rsplit(1), total(1)