Skip to content

Commit e9d5568

Browse files
committed
fix input specification
1 parent b300ee0 commit e9d5568

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,15 @@ int main(int argc, char **argv) {
5151
The executable in `build/bin/aldr` has the following command line interface:
5252
5353
```
54-
usage: ./build/bin/aldr <n> <dist>
54+
usage: ./build/bin/aldr <num_samples> <distribution>
5555
```
5656
57-
where `<n>` is an integer denoting the number of samples to draw; and
58-
`<dist>` is a space-separated list of positive integers weights for
59-
the desired discrete distribution.
57+
where `<num_samples>` is an integer denoting the number of samples to draw,
58+
satisfying `0 <= num_samples <= 2147483647`;
59+
and `<distribution>` is a space-separated list of positive integer weights
60+
for the desired discrete distribution,
61+
with the total number of elements bounded as `0 < n <= 2147483647`,
62+
and the sum bounded as `0 < m <= 2147483647`.
6063
6164
For example, to generate 90 samples from { 1, 1, 2, 3, 2 }, run the following:
6265

sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
int main(int argc, char **argv) {
1616
if (argc < 3) {
17-
printf("usage: %s <n> <dist>\n", argv[0]);
17+
printf("usage: %s <num_samples> <distribution>\n", argv[0]);
1818
exit(0);
1919
}
2020
int num_samples = atoi(argv[1]);

0 commit comments

Comments
 (0)