line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::saikoro; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
50829
|
use 5.006; |
|
1
|
|
|
|
|
2
|
|
4
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
5
|
1
|
|
|
1
|
|
2
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
App::saikoro - A random number (matrix) generator of uniform distributions. Saikoro is a Japanese dice. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.23 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.23'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
saikoro -g I,J -y L..U # I,J,L,U are all numbers. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
A random number(matrix) generator from uniform distributions. |
26
|
|
|
|
|
|
|
Generates random uniform variable. Discrete/uniform can be specified. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 OPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=over 4 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item B<-g N> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Get N random variables. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item B<-g N1,N2> |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Get N1 times N2 variables. N1 for vertical, N2 for horizontal. |
40
|
|
|
|
|
|
|
The form "B<-g N1xN2>" is allowed. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=item B<-~ > |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
The number specifications N1 and N2 are reversed. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item B<-y N1,N2> |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Limit the values into the number interval [N1,N2]. |
49
|
|
|
|
|
|
|
The form "B<-y N1..N2>" is also allowed. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item B<-. N> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Switch to continuous from discrete. N digits after decimal points by rounding. |
54
|
|
|
|
|
|
|
N=0 means integers |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item B<-1> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Switch to no secondary information that would be output to STDOUT. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item B<-s N> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Random seed specification. Essentially the residual divided by 2**32 is used. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item B<-/ char> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Specifies the horizontal separator character. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item B<--help> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Print this online help manual of this command "saikoro". Similar to "perldoc `which [-t] saikoro` ". |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item B<--help opt> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Only shows the option helps. It is easy to read when you are in very necessary. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item B<--help ja> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Shows Japanese online help manual. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item B<--help nopod> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Print this online manual using the code insdide this program without using the function of Perl POD. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item --version |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Outputs version information of this program. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=back |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 EXAMPLES |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over 4 |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item saikoro |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# Outputs 12 random numbers from {1,2,3,4,5,6} horizontally. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item saikoro B< -~ > |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
# Outputs 12 random numbers from {1,2,3,4,5,6} vertically. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item saikoro B< -g 5,8 > |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# 5 x 8 matrix whose elements are from {1,2,..,6}. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item saikoro -g 5,8 B<-y 0,100> |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
# 5 x 8 matrix whose elements are from {0, 1, 2,..,100}. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item saikoro -g 5,8 B< -. 3 > |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
# Continuous random variables with 3 digits after decimal points. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=back |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 AUTHOR |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
"Toshiyuki Shimono", C<< >> |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 HISTORY |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This program has been made since 2016-03-04 (Fri) |
123
|
|
|
|
|
|
|
as a part of TSV hacking toolset for table data. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 BUGS |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
129
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
130
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 SUPPORT |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
perldoc App::saikoro |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
You can also look for information at: |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=over 4 |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
L |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
L |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=item * CPAN Ratings |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
L |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item * Search CPAN |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
L |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=back |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Copyright 2018 "Toshiyuki Shimono". |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify |
169
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
170
|
|
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or |
171
|
|
|
|
|
|
|
(at your option) any later version. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
174
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
175
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
176
|
|
|
|
|
|
|
GNU General Public License for more details. |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
179
|
|
|
|
|
|
|
along with this program. If not, see L. |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
1; # End of App::saikoro |