mirror of
https://git.freebsd.org/ports.git
synced 2025-06-02 19:36:28 -04:00
Add p5-Algorithm-Numerical-Shuffle 1.4, shuffle a list.
Shuffle is a perl module which performs a one pass, fair shuffle on a list. If the list is passed as a reference to an array, the shuffle is done in situ. The running time of the algorithm is linear in the size of the list. For an in situ shuffle, the memory overhead is constant; otherwise, linear extra memory is used. The algorithm used is discussed by Knuth [3]. It was first published by Fisher and Yates [2], and later by Durstenfeld [1]. PR: 55574 Submitted by: andrew@scoop.co.nz
This commit is contained in:
parent
f2a146575f
commit
15e1a07d56
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=87333
5 changed files with 46 additions and 0 deletions
|
@ -465,6 +465,7 @@
|
|||
SUBDIR += p5-Algorithm-Diff
|
||||
SUBDIR += p5-Algorithm-MDiff
|
||||
SUBDIR += p5-Algorithm-MarkovChain
|
||||
SUBDIR += p5-Algorithm-Numerical-Shuffle
|
||||
SUBDIR += p5-Algorithm-Permute
|
||||
SUBDIR += p5-Alias
|
||||
SUBDIR += p5-App-Info
|
||||
|
|
24
devel/p5-Algorithm-Numerical-Shuffle/Makefile
Normal file
24
devel/p5-Algorithm-Numerical-Shuffle/Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
# New ports collection makefile for: p5-Algorithm-Numerical-Shuffle
|
||||
# Date created: 14 August 2003
|
||||
# Whom: andrew@scoop.co.nz
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= Algorithm-Numerical-Shuffle
|
||||
PORTVERSION= 1.4
|
||||
CATEGORIES= devel perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||
MASTER_SITE_SUBDIR= ../by-authors/id/A/AB/ABIGAIL
|
||||
PKGNAMEPREFIX= p5-
|
||||
DISTNAME= Shuffle-${PORTVERSION}
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= andrew@scoop.co.nz
|
||||
COMMENT= Shuffle a list
|
||||
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
MAN3= Algorithm::Numerical::Shuffle.3
|
||||
|
||||
.include <bsd.port.mk>
|
1
devel/p5-Algorithm-Numerical-Shuffle/distinfo
Normal file
1
devel/p5-Algorithm-Numerical-Shuffle/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (Shuffle-1.4.tgz) = 199d2adad2d4b40291a7d1bf53285279
|
13
devel/p5-Algorithm-Numerical-Shuffle/pkg-descr
Normal file
13
devel/p5-Algorithm-Numerical-Shuffle/pkg-descr
Normal file
|
@ -0,0 +1,13 @@
|
|||
Algorithm::Numerical::Shuffle
|
||||
=============================
|
||||
|
||||
Shuffle is a perl module which performs a one pass, fair shuffle on a
|
||||
list. If the list is passed as a reference to an array, the shuffle
|
||||
is done in situ.
|
||||
|
||||
The running time of the algorithm is linear in the size of the list.
|
||||
For an in situ shuffle, the memory overhead is constant; otherwise,
|
||||
linear extra memory is used.
|
||||
|
||||
The algorithm used is discussed by Knuth [3]. It was first published
|
||||
by Fisher and Yates [2], and later by Durstenfeld [1].
|
7
devel/p5-Algorithm-Numerical-Shuffle/pkg-plist
Normal file
7
devel/p5-Algorithm-Numerical-Shuffle/pkg-plist
Normal file
|
@ -0,0 +1,7 @@
|
|||
%%SITE_PERL%%/Algorithm/Numerical/Shuffle.pm
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Algorithm/Numerical/Shuffle/.packlist
|
||||
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Algorithm/Numerical/Shuffle
|
||||
@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Algorithm/Numerical 2>/dev/null || true
|
||||
@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Algorithm 2>/dev/null || true
|
||||
@unexec rmdir %D/%%SITE_PERL%%/Algorithm/Numerical 2>/dev/null || true
|
||||
@unexec rmdir %D/%%SITE_PERL%%/Algorithm 2>/dev/null || true
|
Loading…
Add table
Reference in a new issue