blob: 24236a867d557af21009d2dbc903d9ba90dd77f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/..";
use Random;
my ($seed, $count) = @ARGV;
my $rng = Random->new($seed, "arithmetic");
my @edges = (
'9223372036854775807 1',
'-9223372036854775808 1',
'-9223372036854775808 2',
'0 -1',
'7 -3',
'-7 3',
'-7 -3',
'1 1',
);
$rng->emit($count, \@edges, sub {
my $a = $rng->integer(-1000000, 1000000);
my $b = $rng->integer(-1000000, 1000000);
$b = 1 if $b == 0;
return "$a $b";
});
|