| 1 | package Array::Sample::SimpleRandom::Scan; | ||
| 2 | |||
| 3 | 2 | ▶ | use 5.010001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 2 | ▶ | use Exporter qw(import); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 2 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 10 | 2 | our $DATE = '2022-05-21'; # DATE | |
| 11 | 2 | our $DIST = 'Array-Sample-SimpleRandom'; # DIST | |
| 12 | 2 | our $VERSION = '0.003'; # VERSION | |
| 13 | |||
| 14 | 2 | our @EXPORT_OK = qw(sample_simple_random_no_replacement); | |
| 15 | |||
| 16 | 5 | ▶ | sub sample_simple_random_no_replacement { |
|
Subroutine
sample_simple_random_no_replacement: called CC=1 SCAR=0.0
Pod
documented
| |||
| 17 | 5 | require Array::Pick::Scan; | |
| 18 | |||
| 19 | 5 | my ($ary, $n, $opts) = @_; | |
| 20 | 5 | Array::Pick::Scan::random_item($ary, $n, $opts); | |
| 21 | } | ||
| 22 | |||
| 23 | 2 | 1; | |
| 24 | # ABSTRACT: Simple random sampling from an array (scan algorithm) | ||
| 25 | |||
| 26 | __END__ | ||