ports/144023: [NEW PORT]math/lll_spect: LLL-spectral test for linear congruential pseudorandom number generators

bf bf1783 at gmail.com
Tue Feb 16 22:30:06 UTC 2010


>Number:         144023
>Category:       ports
>Synopsis:       [NEW PORT]math/lll_spect: LLL-spectral test for linear congruential pseudorandom number generators
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 16 22:30:05 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     bf
>Release:        9-CURRENT amd64
>Organization:
-
>Environment:
>Description:

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	lll_spect
#	lll_spect/Makefile
#	lll_spect/distinfo
#	lll_spect/pkg-descr
#	lll_spect/files
#	lll_spect/files/patch-lll_spect.C
#	lll_spect/files/patch-lll_search.C
#
echo c - lll_spect
mkdir -p lll_spect > /dev/null 2>&1
echo x - lll_spect/Makefile
sed 's/^X//' >lll_spect/Makefile << 'cf2c84081c11ba7133e9c8ff09c06915'
X# New ports collection makefile for:	lll_spect
X# Date created:		6 Feb. 2010
X# Whom:			bf <bf1783 at gmail.com>
X# $FreeBSD$
X
XPORTNAME=	lll_spect
XDISTVERSION=	1.0
XCATEGORIES=	math
XMASTER_SITES=	http://random.mat.sbg.ac.at/results/karl/spectraltest/LLLSpectralTest/
XDISTFILES=	lll_spect.C lll_search.C examples.txt
XDIST_SUBDIR=	${PORTNAME}
XEXTRACT_ONLY=
X
XMAINTAINER=	bf1783 at gmail.com
XCOMMENT=	LLL-spectral test of linear congruential random number generators
X
XBUILD_DEPENDS=	${LOCALBASE}/lib/libntl.a:${PORTSDIR}/math/ntl
XRUN_DEPENDS=	${LOCALBASE}/lib/libntl.a:${PORTSDIR}/math/ntl
X
XPLIST_FILES=	bin/lll_spect bin/lll_search
XPORTEXAMPLES=	examples.txt
XNO_WRKSUBDIR=	yes
X
XCPPFLAGS+=	-I${LOCALBASE}/include
XLDFLAGS+=	-L${LOCALBASE}/lib
X
Xpost-extract:
X.for _file in lll_spect lll_search
X	@${CP} ${_DISTDIR}/${_file}.C ${WRKDIR}
X.endfor
X
Xdo-build:
X.for _file in lll_spect lll_search
X	${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o ${WRKDIR}/${_file}.o ${WRKDIR}/${_file}.C
X	${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${WRKDIR}/${_file} ${WRKDIR}/${_file}.o -lntl -lgmp -lm
X.endfor
X
Xdo-install:
X.for _file in lll_spect lll_search
X	${INSTALL_PROGRAM} ${WRKDIR}/${_file} ${PREFIX}/bin
X.endfor
X.if !defined(NOPORTEXAMPLES)
X	${MKDIR} ${EXAMPLESDIR}
X	${INSTALL_DATA} ${_DISTDIR}/examples.txt ${EXAMPLESDIR}
X.endif
X
Xtest: build
X	@${WRKSRC}/lll_spect "${WRKSRC}/output_spect" 17 16907 2147483647
X	@${WRKSRC}/lll_search "${WRKSRC}/output_search" 2147483647 2 3 7 11 31 151 331
X	@${SED} -n -e '/Modul/,/Time/p' ${_DISTDIR}/examples.txt > ${WRKSRC}/output_spect_example
X	@${SED} -n -e '/may yield/,/Therefore/p' \
X		${_DISTDIR}/examples.txt > ${WRKSRC}/output_search_example
X
X.include <bsd.port.mk>
cf2c84081c11ba7133e9c8ff09c06915
echo x - lll_spect/distinfo
sed 's/^X//' >lll_spect/distinfo << '810d51936c1ea2e4c4d2c5e12c267dfb'
XMD5 (lll_spect/lll_spect.C) = 7f8aaffde376e3699211f9d39fbee188
XSHA256 (lll_spect/lll_spect.C) = a286543035422cde3ac7dcbb9c3a0933933eaedbe609b063ec10c28615747b90
XSIZE (lll_spect/lll_spect.C) = 4410
XMD5 (lll_spect/lll_search.C) = d3d6be7ef1800fa176898875d8e8e9d7
XSHA256 (lll_spect/lll_search.C) = 4d29518d357dd2ce55c6ba2a313d2dddaba6ef6dcfaec8e2ccd78bfa4871b116
XSIZE (lll_spect/lll_search.C) = 4965
XMD5 (lll_spect/examples.txt) = a96728cd3764e22568d313d00750c408
XSHA256 (lll_spect/examples.txt) = 4ea78c5a5fa15ba07af0ac529e32767678e2c9d458cceb67e99fda4f5b094a47
XSIZE (lll_spect/examples.txt) = 2058
810d51936c1ea2e4c4d2c5e12c267dfb
echo x - lll_spect/pkg-descr
sed 's/^X//' >lll_spect/pkg-descr << '21649a1a60195611b9bd228583255339'
XThis software calculates a normalized version of the classical spectral test for
Xlinear congruential pseudorandom number generators (LCGs), where the shortest
Xvector is replaced by an approximation obtained with the Lenstra-Lenstra-Lovasz
Xbasis reduction algorithm, which can be calculated in polynomial time. The code
Xis able to test in up to 24 dimensions, and includes an example of how to use
Xthe test to search for good LCG parameters.
X
XWWW: http://random.mat.sbg.ac.at/results/karl/spectraltest/lll.html
21649a1a60195611b9bd228583255339
echo c - lll_spect/files
mkdir -p lll_spect/files > /dev/null 2>&1
echo x - lll_spect/files/patch-lll_spect.C
sed 's/^X//' >lll_spect/files/patch-lll_spect.C << '2bb27e0f237014147d1a06b5cc9c3693'
X--- lll_spect.C.orig	2010-02-16 15:51:33.000000000 -0500
X+++ lll_spect.C	2010-02-16 15:55:48.000000000 -0500
X@@ -14,30 +14,29 @@
X 
X /*-------------Libraries (needs Victor Shoups NTL-Lib----------------*/
X 
X-#include <iostream.h>
X+#include <iostream>
X 
X-#include <fstream.h>
X+#include <fstream>
X 
X #include <time.h>
X 
X #include <sys/resource.h>
X 
X-#include <math.h>
X+#include <cmath>
X 
X #include <float.h>
X 
X-#include <NTL/ZZ.h>
X-
X #include <NTL/RR.h>
X 
X-#include <NTL/mat_ZZ.h>
X-
X #include <NTL/LLL.h>
X 
X 
X 
X /*------------------------ Definitions ------------------------------*/
X 
X+using namespace NTL;
X+using namespace std;
X+
X ZZ mult, modul; 
X 
X const int dim_max = 24;
2bb27e0f237014147d1a06b5cc9c3693
echo x - lll_spect/files/patch-lll_search.C
sed 's/^X//' >lll_spect/files/patch-lll_search.C << '431f90de938735f89eff47c2fad594c1'
X--- lll_search.C.orig	2010-02-16 15:59:17.000000000 -0500
X+++ lll_search.C	2010-02-16 16:00:58.000000000 -0500
X@@ -12,24 +12,20 @@
X 
X /*-------------Libraries (needs Victor Shoups NTL-Lib----------------*/
X 
X-#include <iostream.h>
X+#include <iostream>
X 
X-#include <fstream.h>
X+#include <fstream>
X 
X #include <time.h>
X 
X #include <sys/resource.h>
X 
X-#include <math.h>
X+#include <cmath>
X 
X #include <float.h>
X 
X-#include <NTL/ZZ.h>
X-
X #include <NTL/RR.h>
X 
X-#include <NTL/mat_ZZ.h>
X-
X #include <NTL/LLL.h>
X 
X 
X@@ -38,7 +34,8 @@
X 
X /*------------------------ Definitions ------------------------------*/
X 
X-
X+using namespace NTL;
X+using namespace std;
X 
X ZZ lambda, modul, *m_primes;
X 
431f90de938735f89eff47c2fad594c1
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list