diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/randlib | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/randlib')
234 files changed, 28834 insertions, 0 deletions
diff --git a/modules/randlib/.libs/libscirandlib-algo.a b/modules/randlib/.libs/libscirandlib-algo.a Binary files differnew file mode 100755 index 000000000..1d22b6597 --- /dev/null +++ b/modules/randlib/.libs/libscirandlib-algo.a diff --git a/modules/randlib/.libs/libscirandlib-algo.la b/modules/randlib/.libs/libscirandlib-algo.la new file mode 120000 index 000000000..8cb738176 --- /dev/null +++ b/modules/randlib/.libs/libscirandlib-algo.la @@ -0,0 +1 @@ +../libscirandlib-algo.la
\ No newline at end of file diff --git a/modules/randlib/.libs/libscirandlib.la b/modules/randlib/.libs/libscirandlib.la new file mode 120000 index 000000000..bb42d3038 --- /dev/null +++ b/modules/randlib/.libs/libscirandlib.la @@ -0,0 +1 @@ +../libscirandlib.la
\ No newline at end of file diff --git a/modules/randlib/.libs/libscirandlib.lai b/modules/randlib/.libs/libscirandlib.lai new file mode 100755 index 000000000..f92a8ce1f --- /dev/null +++ b/modules/randlib/.libs/libscirandlib.lai @@ -0,0 +1,41 @@ +# libscirandlib.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libscirandlib.so.5' + +# Names of this library. +library_names='libscirandlib.so.5.5.2 libscirandlib.so.5 libscirandlib.so' + +# The name of the static archive. +old_library='' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' -lpthread -ldl -lcurses -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libscirandlib. +current=10 +age=5 +revision=2 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib/scilab' diff --git a/modules/randlib/.libs/libscirandlib.so b/modules/randlib/.libs/libscirandlib.so new file mode 120000 index 000000000..4766a2261 --- /dev/null +++ b/modules/randlib/.libs/libscirandlib.so @@ -0,0 +1 @@ +libscirandlib.so.5.5.2
\ No newline at end of file diff --git a/modules/randlib/.libs/libscirandlib.so.5 b/modules/randlib/.libs/libscirandlib.so.5 new file mode 120000 index 000000000..4766a2261 --- /dev/null +++ b/modules/randlib/.libs/libscirandlib.so.5 @@ -0,0 +1 @@ +libscirandlib.so.5.5.2
\ No newline at end of file diff --git a/modules/randlib/.libs/libscirandlib.so.5.5.2 b/modules/randlib/.libs/libscirandlib.so.5.5.2 Binary files differnew file mode 100755 index 000000000..32c2bcbc7 --- /dev/null +++ b/modules/randlib/.libs/libscirandlib.so.5.5.2 diff --git a/modules/randlib/Makefile b/modules/randlib/Makefile new file mode 100755 index 000000000..f1335bd7a --- /dev/null +++ b/modules/randlib/Makefile @@ -0,0 +1,1540 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# modules/randlib/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006 - INRIA - Sylvestre LEDRU +# +# This file is distributed under the same license as the Scilab package. + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr> +# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +# +# This file must be used under the terms of the CeCILL. +# This source file is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at +# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +# + +########## +### Makefile included stuff +### Target, variable, suffixes which are supposed to be useful in every makefile.am +########## + + + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/scilab +pkgincludedir = $(includedir)/scilab +pkglibdir = $(libdir)/scilab +pkglibexecdir = $(libexecdir)/scilab +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \ + $(top_srcdir)/config/depcomp +am__append_1 = java +subdir = modules/randlib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \ + $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \ + $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \ + $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \ + $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \ + $(top_srcdir)/m4/intel_compiler.m4 \ + $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \ + $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \ + $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \ + $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \ + $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkglibdir)" \ + "$(DESTDIR)$(libscirandlib_la_etcdir)" \ + "$(DESTDIR)$(libscirandlib_la_rootdir)" \ + "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES) +libscirandlib_algo_la_LIBADD = +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = src/c/libscirandlib_algo_la-fsultra.lo \ + src/c/libscirandlib_algo_la-mt.lo \ + src/c/libscirandlib_algo_la-igngeom.lo \ + src/c/libscirandlib_algo_la-kiss.lo \ + src/c/libscirandlib_algo_la-urand.lo \ + src/c/libscirandlib_algo_la-clcg2.lo \ + src/c/libscirandlib_algo_la-clcg4.lo \ + src/c/libscirandlib_algo_la-sexpo.lo \ + src/c/libscirandlib_algo_la-ignbin.lo \ + src/c/libscirandlib_algo_la-ignpoi.lo \ + src/c/libscirandlib_algo_la-sgamma.lo \ + src/c/libscirandlib_algo_la-genbet.lo +am__objects_2 = src/fortran/gennf.lo src/fortran/genchi.lo \ + src/fortran/setgmn.lo src/fortran/gengam.lo \ + src/fortran/snorm.lo src/fortran/gennch.lo \ + src/fortran/genmn.lo src/fortran/phrtsd.lo \ + src/fortran/ignnbn.lo src/fortran/genf.lo \ + src/fortran/genunf.lo src/fortran/genexp.lo \ + src/fortran/genmul.lo src/fortran/genprm.lo \ + src/fortran/gennor.lo +am_libscirandlib_algo_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libscirandlib_algo_la_OBJECTS = $(am_libscirandlib_algo_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +libscirandlib_la_DEPENDENCIES = libscirandlib-algo.la +am__objects_3 = sci_gateway/c/libscirandlib_la-gw_randlib.lo \ + sci_gateway/c/libscirandlib_la-sci_grand.lo +am_libscirandlib_la_OBJECTS = $(am__objects_3) +libscirandlib_la_OBJECTS = $(am_libscirandlib_la_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir)/modules/core/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS) +LTF77COMPILE = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) +AM_V_F77 = $(am__v_F77_$(V)) +am__v_F77_ = $(am__v_F77_$(AM_DEFAULT_VERBOSITY)) +am__v_F77_0 = @echo " F77 " $@; +am__v_F77_1 = +F77LD = $(F77) +F77LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_F77LD = $(am__v_F77LD_$(V)) +am__v_F77LD_ = $(am__v_F77LD_$(AM_DEFAULT_VERBOSITY)) +am__v_F77LD_0 = @echo " F77LD " $@; +am__v_F77LD_1 = +SOURCES = $(libscirandlib_algo_la_SOURCES) $(libscirandlib_la_SOURCES) +DIST_SOURCES = $(libscirandlib_algo_la_SOURCES) \ + $(libscirandlib_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(libscirandlib_la_etc_DATA) $(libscirandlib_la_root_DATA) \ + $(libscirandlib_la_sci_gateway_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing aclocal-1.14 +ALL_LINGUAS = en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ +ALL_LINGUAS_DOC = en_US fr_FR pt_BR ja_JP ru_RU +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +ANT = /usr/bin/ant +ANTLR = /usr/share/java/antlr.jar +AR = ar +ARPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -larpack +ASM3 = /usr/share/java/asm3-3.3.2.jar +AUTOCONF = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoconf +AUTOHEADER = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing autoheader +AUTOMAKE = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing automake-1.14 +AVALON_FRAMEWORK = /home/shashank/scilab-master_5.5.2/thirdparty/avalon-framework.jar +AWK = mawk +BATIK = /home/shashank/scilab-master_5.5.2/thirdparty/batik-all-1.7.jar +BLAS_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lblas +CC = gcc +CCACHE = +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CHECKSTYLE = +COBERTURA = /usr/share/java/cobertura.jar +COMMONS_BEANUTILS = +COMMONS_IO = /home/shashank/scilab-master_5.5.2/thirdparty/commons-io.jar +COMMONS_LOGGING = /home/shashank/scilab-master_5.5.2/thirdparty/commons-logging.jar +CPP = gcc -E +CPPFLAGS = +CURL_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +CURL_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/curl-config +CURL_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lcurl -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lssl -lcrypto -lrt -lz +CURL_VERSION = libcurl 7.19.7 +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEMOTOOLS_ENABLE = yes +DEPDIR = .deps +DLLTOOL = false +DOCBOOK_ROOT = /home/shashank/scilab-master_5.5.2/thirdparty/docbook/ +DOXYGEN_BIN = +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +ECJ = /home/shashank/scilab-master_5.5.2/thirdparty/ecj.jar +EGREP = /bin/grep -E +EXEEXT = +F77 = gfortran +FFLAGS = -g -O2 +FFTW3_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lfftw3 +FFTW_ENABLE = yes +FGREP = /bin/grep -F +FLEXDOCK = /home/shashank/scilab-master_5.5.2/thirdparty/flexdock-1.2.4.jar +FLIBS = -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lpthread -ldl -lcurses -lgfortran -lm -lquadmath +FOP = /home/shashank/scilab-master_5.5.2/thirdparty/fop.jar +FREEHEP_GRAPHICS2D = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphics2d.jar +FREEHEP_GRAPHICSIO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio.jar +FREEHEP_GRAPHICSIO_EMF = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-graphicsio-emf.jar +FREEHEP_IO = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-io.jar +FREEHEP_UTIL = /home/shashank/scilab-master_5.5.2/thirdparty/freehep-util.jar +GENHTML = +GETTEXT_MACRO_VERSION = 0.19 +GIWS_BIN = +GLUEGEN2_RT = /home/shashank/scilab-master_5.5.2/thirdparty/gluegen2-rt.jar +GMSGFMT = /usr/bin/msgfmt +GMSGFMT_015 = /usr/bin/msgfmt +GRAPHICS_ENABLE = yes +GREP = /bin/grep +GUI_ENABLE = yes +HDF5_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +HDF5_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lhdf5 -lhdf5_hl +HELP_ENABLE = yes +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLLIBS = +INTL_MACOSX_LIBS = +JAR = /usr/lib/jvm/java-8-openjdk-amd64/bin/jar +JAVA = /usr/lib/jvm/java-8-openjdk-amd64/bin/java +JAVAC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javac +JAVAC_DEBUG = off +JAVADOC = /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc +JAVAH = /usr/lib/jvm/java-8-openjdk-amd64/bin/javah +JAVASCI_ENABLE = yes +JAVA_ENABLE = yes +JAVA_G = /usr/lib/jvm/java-8-openjdk-amd64/bin/java +JAVA_HOME = /usr/lib/jvm/java-8-openjdk-amd64 +JAVA_JNI_INCLUDE = -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux +JAVA_JNI_LIBS = -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 -ljava -lverify -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm +JDB = /usr/lib/jvm/java-8-openjdk-amd64/bin/jdb +JEUCLID_CORE = /home/shashank/scilab-master_5.5.2/thirdparty/jeuclid-core.jar +JGRAPHX = /home/shashank/scilab-master_5.5.2/thirdparty/jgraphx.jar +JHALL = /home/shashank/scilab-master_5.5.2/thirdparty/jhall.jar +JLATEXMATH = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-1.0.3.jar +JLATEXMATH_FOP = /home/shashank/scilab-master_5.5.2/thirdparty/jlatexmath-fop-1.0.3.jar +JOGL2 = /home/shashank/scilab-master_5.5.2/thirdparty/jogl2.jar +JROSETTA_API = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-API.jar +JROSETTA_ENGINE = /home/shashank/scilab-master_5.5.2/thirdparty/jrosetta-engine.jar +JUNIT4 = /usr/share/java/junit4.jar +LAPACK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -llapack +LCOV = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = -Wl,--no-as-needed +LIBICONV = -liconv +LIBINTL = +LIBM = -lm +LIBOBJS = +LIBS = -lpthread -ldl -lcurses -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LOGGING_LEVEL = SEVERE +LOOKS = /home/shashank/scilab-master_5.5.2/thirdparty/looks-2.1.1.jar +LTLIBICONV = -liconv +LTLIBINTL = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /home/shashank/scilab-master_5.5.2/config/missing makeinfo +MANIFEST_TOOL = : +MATIO_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +MATIO_ENABLE = yes +MATIO_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lm -lz -lmatio -lhdf5 +MKDIR_P = /bin/mkdir -p +MPI_ENABLE = no +MSGCAT = /usr/bin/msgcat +MSGFMT = /usr/bin/msgfmt +MSGFMT_015 = /usr/bin/msgfmt +MSGMERGE = /usr/bin/msgmerge +NM = nm +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OCAMLC = ocamlc +OCAMLDEP = ocamldep +OCAMLLEX = ocamllex +OCAMLOPT = ocamlopt +OCAMLYACC = ocamlyacc +OPENMPI_CC = +OPENMPI_CFLAGS = +OPENMPI_CXX = +OPENMPI_CXXFLAGS = +OPENMPI_LIBS = +OPENMP_CFLAGS = -fopenmp +OPENMP_CXXFLAGS = -fopenmp +OPENMP_ENABLE = yes +OPENMP_LIBS = -lgomp -lstdc++ +OTOOL = +OTOOL64 = +PACKAGE = scilab +PACKAGE_BUGREPORT = http://bugzilla.scilab.org/ +PACKAGE_NAME = Scilab +PACKAGE_STRING = Scilab 5 +PACKAGE_TARNAME = scilab +PACKAGE_URL = +PACKAGE_VERSION = 5 +PATH_SEPARATOR = : +PCRE_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +PCRE_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/pcre-config +PCRE_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lpcreposix -lpcre +PCRE_VERSION = 8.35 +PKG_CONFIG = /usr/bin/pkg-config +POSUB = po +POW_LIB = +PYTHON = +RANLIB = ranlib +RELOCATABLE = no +RT_LIB = -lrt +SAXON = /home/shashank/scilab-master_5.5.2/thirdparty/saxon9he.jar +SCILAB_BINARY_VERSION = 5.5.2 +SCILAB_LIBRARY_VERSION = 5:5:2 +SCILAB_VERSION_MAINTENANCE = 2 +SCILAB_VERSION_MAJOR = 5 +SCILAB_VERSION_MINOR = 5 +SCIRENDERER = ${modules.dir}/scirenderer/${build.jar.dir}/scirenderer.jar +SCIRENDERER_CP = $SCILAB/modules/scirenderer/jar/scirenderer.jar +SCI_CFLAGS = -D_LARGEFILE64_SOURCE -DNDEBUG -m64 -fno-stack-protector +SCI_CXXFLAGS = -DNDEBUG -fno-stack-protector +SCI_FFLAGS = -DNDEBUG -m64 -fPIC +SCI_LDFLAGS = +SED = /bin/sed +SET_MAKE = +SET_RELOCATABLE = +SHELL = /bin/bash +SKINLF = /home/shashank/scilab-master_5.5.2/thirdparty/skinlf.jar +SPLINT = no +STRIP = strip +SWIG_BIN = +SWIG_JAVA = +SWIG_RUNTIME_LIBS_DIR = +SWIG_SCILAB = +TCLTK_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -ltk8.5 -L/home/shashank/scilab-master_5.5.2/usr/lib -ltcl8.5 -ldl +TCL_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include +TK_INC_PATH = -I/home/shashank/scilab-master_5.5.2/usr/include +UMFPACK_CFLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include +UMFPACK_ENABLE = yes +UMFPACK_LIB = -L/home/shashank/scilab-master_5.5.2/usr/lib -lumfpack -lamd +USE_NLS = yes +VERSION = 5 +WITH_OCAML = +WITH_TKSCI = yes +XCOS_ENABLE = yes +XGETTEXT = /usr/bin/xgettext +XGETTEXT_015 = /usr/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +XMKMF = +XMLGRAPHICS_COMMONS = /home/shashank/scilab-master_5.5.2/thirdparty/xmlgraphics-commons-1.4.jar +XML_APIS_EXT = /home/shashank/scilab-master_5.5.2/thirdparty/xml-apis-ext.jar +XML_CONFIG = /home/shashank/scilab-master_5.5.2/usr/bin/xml2-config +XML_FLAGS = -I/home/shashank/scilab-master_5.5.2/usr/include/libxml2 +XML_LIBS = -L/home/shashank/scilab-master_5.5.2/usr/lib -lxml2 -L/home/scilab/work/linux-prerequisites-sources/trunk/Dev-Tools/SE/Prerequirements/linux_x64/usr/lib -lz -lm -ldl +XML_VERSION = 2.9.1 +X_CFLAGS = +X_EXTRA_LIBS = +X_LIBS = +X_PRE_LIBS = +abs_builddir = /home/shashank/scilab-master_5.5.2/modules/randlib +abs_srcdir = /home/shashank/scilab-master_5.5.2/modules/randlib +abs_top_builddir = /home/shashank/scilab-master_5.5.2 +abs_top_srcdir = /home/shashank/scilab-master_5.5.2 +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +ac_ct_F77 = gfortran +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +cxx_present = yes +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/shashank/scilab-master_5.5.2/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. +RANDLIB_C_SOURCES = src/c/fsultra.c \ +src/c/mt.c \ +src/c/igngeom.c \ +src/c/kiss.c \ +src/c/urand.c \ +src/c/clcg2.c \ +src/c/clcg4.c \ +src/c/sexpo.c \ +src/c/ignbin.c \ +src/c/ignpoi.c \ +src/c/sgamma.c \ +src/c/genbet.c + +RANDLIB_FORTRAN_SOURCES = \ +src/fortran/gennf.f \ +src/fortran/genchi.f \ +src/fortran/setgmn.f \ +src/fortran/gengam.f \ +src/fortran/snorm.f \ +src/fortran/gennch.f \ +src/fortran/genmn.f \ +src/fortran/phrtsd.f \ +src/fortran/ignnbn.f \ +src/fortran/genf.f \ +src/fortran/genunf.f \ +src/fortran/genexp.f \ +src/fortran/genmul.f \ +src/fortran/genprm.f \ +src/fortran/gennor.f + +#src/fortran/genbet.f +#src/fortran/sexpo.f +#src/fortran/ignbin.f +#src/fortran/ignpoi.f +#src/fortran/sgamma.f +GATEWAY_C_SOURCES = sci_gateway/c/gw_randlib.c \ +sci_gateway/c/sci_grand.c + +libscirandlib_la_CPPFLAGS = -I$(srcdir)/includes/ \ + -I$(top_srcdir)/modules/api_scilab/includes/ \ + -I$(top_srcdir)/modules/localization/includes/ \ + -I$(top_srcdir)/modules/output_stream/includes/ \ + $(AM_CPPFLAGS) + +pkglib_LTLIBRARIES = libscirandlib.la +noinst_LTLIBRARIES = libscirandlib-algo.la +libscirandlib_algo_la_SOURCES = $(RANDLIB_C_SOURCES) $(RANDLIB_FORTRAN_SOURCES) +libscirandlib_la_SOURCES = $(GATEWAY_C_SOURCES) +libscirandlib_algo_la_CPPFLAGS = $(libscirandlib_la_CPPFLAGS) + +# For the code check (splint) +CHECK_SRC = $(RANDLIB_C_SOURCES) $(GATEWAY_C_SOURCES) +INCLUDE_FLAGS = $(libscirandlib_la_CPPFLAGS) +libscirandlib_la_LIBADD = libscirandlib-algo.la + +#### Target ###### +modulename = randlib + +#### randlib : Conf files #### +libscirandlib_la_rootdir = $(mydatadir) +libscirandlib_la_root_DATA = license.txt + +#### randlib : init scripts #### +libscirandlib_la_etcdir = $(mydatadir)/etc +libscirandlib_la_etc_DATA = etc/randlib.quit etc/randlib.start + +#### randlib : gateway declaration #### +libscirandlib_la_sci_gatewaydir = $(mydatadir)/sci_gateway +libscirandlib_la_sci_gateway_DATA = sci_gateway/randlib_gateway.xml + +# Where all the Scilab stuff is installed (macros, help, ...) +mydatadir = $(pkgdatadir)/modules/$(modulename) + +# Set AM_* SCI detected settings +AM_CPPFLAGS = $(SCI_CPPFLAGS) +AM_CFLAGS = $(SCI_CFLAGS) +AM_CXXFLAGS = $(SCI_CXXFLAGS) +# append includes to AM_FFLAGS to manage fortran includes +AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/ + +# Tag shared libraries with the Scilab version +AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION) + +# splint options +SPLINT_OPTIONS = -weak -booltype BOOL + +########################### JAVA ###################################### +#### We are delegating java compilation to ant... Thanks to that +#### the procedure will be the same with Microsoft Windows (C) +#### and Linux/Unix +####################################################################### +TARGETS_ALL = $(am__append_1) + +################ MACROS ###################### +# Rule to build a macro +# NOT USED AT THE MOMENT +SUFFIXES = .sci + +########### INSTALL DOCUMENTATION ################### + +# Install documentation files into the right target +# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because +# automake needs the html files to be present which is not the case when +# we are building Scilab + +# Where it should be installed +pkgdocdir = $(mydatadir) + +# What is the mask of the help source +DOCMASKXML = *.xml + +# What is the mask of the MathML sources +DOCMASKMML = *.mml + +########### INSTALL DATA ################### +# Install macros, help & demos +# Where it should be installed +pkgmacrosdir = $(mydatadir) +# Which directory we process +MACRODIRS = macros/ +# Mask of the Scilab sources macros +MACROMASK = *.sci +# Mask of the Scilab executable sources macros +MACROBUILDMASK = *.sce +# Mask of the Scilab compiled macros +MACROBINMASK = *.bin +# List of the standard directory for tests +TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java +# Where the demos should be installed +pkgdemosdir = $(mydatadir) +# List of the standard directory for demos +DEMOS_DIR = demos +# List of the standard directory for examples +EXAMPLES_DIR = examples +# Where to export JAVA archives (.jar) +JARDIR = jar/ +# JAR files mask +JARMASK = *.jar +# Chapter file +HELP_CHAPTERDIR = help/ +HELP_CHAPTERFILE = addchapter.sce +HELP_CHAPTERLANG = en_US fr_FR pt_BR +all: all-am + +.SUFFIXES: +.SUFFIXES: .sci .bin .c .f .lo .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/randlib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign modules/randlib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/Makefile.incl.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +src/c/$(am__dirstamp): + @$(MKDIR_P) src/c + @: > src/c/$(am__dirstamp) +src/c/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/c/$(DEPDIR) + @: > src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-fsultra.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-mt.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-igngeom.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-kiss.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-urand.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-clcg2.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-clcg4.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-sexpo.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-ignbin.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-ignpoi.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-sgamma.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-genbet.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/fortran/$(am__dirstamp): + @$(MKDIR_P) src/fortran + @: > src/fortran/$(am__dirstamp) +src/fortran/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/fortran/$(DEPDIR) + @: > src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gennf.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genchi.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/setgmn.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gengam.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/snorm.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gennch.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genmn.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/phrtsd.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/ignnbn.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genf.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genunf.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genexp.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genmul.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genprm.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gennor.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) + +libscirandlib-algo.la: $(libscirandlib_algo_la_OBJECTS) $(libscirandlib_algo_la_DEPENDENCIES) $(EXTRA_libscirandlib_algo_la_DEPENDENCIES) + $(AM_V_F77LD)$(F77LINK) $(libscirandlib_algo_la_OBJECTS) $(libscirandlib_algo_la_LIBADD) $(LIBS) +sci_gateway/c/$(am__dirstamp): + @$(MKDIR_P) sci_gateway/c + @: > sci_gateway/c/$(am__dirstamp) +sci_gateway/c/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) sci_gateway/c/$(DEPDIR) + @: > sci_gateway/c/$(DEPDIR)/$(am__dirstamp) +sci_gateway/c/libscirandlib_la-gw_randlib.lo: \ + sci_gateway/c/$(am__dirstamp) \ + sci_gateway/c/$(DEPDIR)/$(am__dirstamp) +sci_gateway/c/libscirandlib_la-sci_grand.lo: \ + sci_gateway/c/$(am__dirstamp) \ + sci_gateway/c/$(DEPDIR)/$(am__dirstamp) + +libscirandlib.la: $(libscirandlib_la_OBJECTS) $(libscirandlib_la_DEPENDENCIES) $(EXTRA_libscirandlib_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) -rpath $(pkglibdir) $(libscirandlib_la_OBJECTS) $(libscirandlib_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f sci_gateway/c/*.$(OBJEXT) + -rm -f sci_gateway/c/*.lo + -rm -f src/c/*.$(OBJEXT) + -rm -f src/c/*.lo + -rm -f src/fortran/*.$(OBJEXT) + -rm -f src/fortran/*.lo + +distclean-compile: + -rm -f *.tab.c + +include sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Plo +include sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Plo +include src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Plo + +.c.o: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ + $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Plo +# $(AM_V_CC)source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< + +src/c/libscirandlib_algo_la-fsultra.lo: src/c/fsultra.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-fsultra.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Tpo -c -o src/c/libscirandlib_algo_la-fsultra.lo `test -f 'src/c/fsultra.c' || echo '$(srcdir)/'`src/c/fsultra.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Plo +# $(AM_V_CC)source='src/c/fsultra.c' object='src/c/libscirandlib_algo_la-fsultra.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-fsultra.lo `test -f 'src/c/fsultra.c' || echo '$(srcdir)/'`src/c/fsultra.c + +src/c/libscirandlib_algo_la-mt.lo: src/c/mt.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-mt.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Tpo -c -o src/c/libscirandlib_algo_la-mt.lo `test -f 'src/c/mt.c' || echo '$(srcdir)/'`src/c/mt.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Plo +# $(AM_V_CC)source='src/c/mt.c' object='src/c/libscirandlib_algo_la-mt.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-mt.lo `test -f 'src/c/mt.c' || echo '$(srcdir)/'`src/c/mt.c + +src/c/libscirandlib_algo_la-igngeom.lo: src/c/igngeom.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-igngeom.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Tpo -c -o src/c/libscirandlib_algo_la-igngeom.lo `test -f 'src/c/igngeom.c' || echo '$(srcdir)/'`src/c/igngeom.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Plo +# $(AM_V_CC)source='src/c/igngeom.c' object='src/c/libscirandlib_algo_la-igngeom.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-igngeom.lo `test -f 'src/c/igngeom.c' || echo '$(srcdir)/'`src/c/igngeom.c + +src/c/libscirandlib_algo_la-kiss.lo: src/c/kiss.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-kiss.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Tpo -c -o src/c/libscirandlib_algo_la-kiss.lo `test -f 'src/c/kiss.c' || echo '$(srcdir)/'`src/c/kiss.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Plo +# $(AM_V_CC)source='src/c/kiss.c' object='src/c/libscirandlib_algo_la-kiss.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-kiss.lo `test -f 'src/c/kiss.c' || echo '$(srcdir)/'`src/c/kiss.c + +src/c/libscirandlib_algo_la-urand.lo: src/c/urand.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-urand.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Tpo -c -o src/c/libscirandlib_algo_la-urand.lo `test -f 'src/c/urand.c' || echo '$(srcdir)/'`src/c/urand.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Plo +# $(AM_V_CC)source='src/c/urand.c' object='src/c/libscirandlib_algo_la-urand.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-urand.lo `test -f 'src/c/urand.c' || echo '$(srcdir)/'`src/c/urand.c + +src/c/libscirandlib_algo_la-clcg2.lo: src/c/clcg2.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-clcg2.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Tpo -c -o src/c/libscirandlib_algo_la-clcg2.lo `test -f 'src/c/clcg2.c' || echo '$(srcdir)/'`src/c/clcg2.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Plo +# $(AM_V_CC)source='src/c/clcg2.c' object='src/c/libscirandlib_algo_la-clcg2.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-clcg2.lo `test -f 'src/c/clcg2.c' || echo '$(srcdir)/'`src/c/clcg2.c + +src/c/libscirandlib_algo_la-clcg4.lo: src/c/clcg4.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-clcg4.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Tpo -c -o src/c/libscirandlib_algo_la-clcg4.lo `test -f 'src/c/clcg4.c' || echo '$(srcdir)/'`src/c/clcg4.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Plo +# $(AM_V_CC)source='src/c/clcg4.c' object='src/c/libscirandlib_algo_la-clcg4.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-clcg4.lo `test -f 'src/c/clcg4.c' || echo '$(srcdir)/'`src/c/clcg4.c + +src/c/libscirandlib_algo_la-sexpo.lo: src/c/sexpo.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-sexpo.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Tpo -c -o src/c/libscirandlib_algo_la-sexpo.lo `test -f 'src/c/sexpo.c' || echo '$(srcdir)/'`src/c/sexpo.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Plo +# $(AM_V_CC)source='src/c/sexpo.c' object='src/c/libscirandlib_algo_la-sexpo.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-sexpo.lo `test -f 'src/c/sexpo.c' || echo '$(srcdir)/'`src/c/sexpo.c + +src/c/libscirandlib_algo_la-ignbin.lo: src/c/ignbin.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-ignbin.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Tpo -c -o src/c/libscirandlib_algo_la-ignbin.lo `test -f 'src/c/ignbin.c' || echo '$(srcdir)/'`src/c/ignbin.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Plo +# $(AM_V_CC)source='src/c/ignbin.c' object='src/c/libscirandlib_algo_la-ignbin.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-ignbin.lo `test -f 'src/c/ignbin.c' || echo '$(srcdir)/'`src/c/ignbin.c + +src/c/libscirandlib_algo_la-ignpoi.lo: src/c/ignpoi.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-ignpoi.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Tpo -c -o src/c/libscirandlib_algo_la-ignpoi.lo `test -f 'src/c/ignpoi.c' || echo '$(srcdir)/'`src/c/ignpoi.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Plo +# $(AM_V_CC)source='src/c/ignpoi.c' object='src/c/libscirandlib_algo_la-ignpoi.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-ignpoi.lo `test -f 'src/c/ignpoi.c' || echo '$(srcdir)/'`src/c/ignpoi.c + +src/c/libscirandlib_algo_la-sgamma.lo: src/c/sgamma.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-sgamma.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Tpo -c -o src/c/libscirandlib_algo_la-sgamma.lo `test -f 'src/c/sgamma.c' || echo '$(srcdir)/'`src/c/sgamma.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Plo +# $(AM_V_CC)source='src/c/sgamma.c' object='src/c/libscirandlib_algo_la-sgamma.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-sgamma.lo `test -f 'src/c/sgamma.c' || echo '$(srcdir)/'`src/c/sgamma.c + +src/c/libscirandlib_algo_la-genbet.lo: src/c/genbet.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-genbet.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Tpo -c -o src/c/libscirandlib_algo_la-genbet.lo `test -f 'src/c/genbet.c' || echo '$(srcdir)/'`src/c/genbet.c + $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Plo +# $(AM_V_CC)source='src/c/genbet.c' object='src/c/libscirandlib_algo_la-genbet.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-genbet.lo `test -f 'src/c/genbet.c' || echo '$(srcdir)/'`src/c/genbet.c + +sci_gateway/c/libscirandlib_la-gw_randlib.lo: sci_gateway/c/gw_randlib.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libscirandlib_la-gw_randlib.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Tpo -c -o sci_gateway/c/libscirandlib_la-gw_randlib.lo `test -f 'sci_gateway/c/gw_randlib.c' || echo '$(srcdir)/'`sci_gateway/c/gw_randlib.c + $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Tpo sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Plo +# $(AM_V_CC)source='sci_gateway/c/gw_randlib.c' object='sci_gateway/c/libscirandlib_la-gw_randlib.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libscirandlib_la-gw_randlib.lo `test -f 'sci_gateway/c/gw_randlib.c' || echo '$(srcdir)/'`sci_gateway/c/gw_randlib.c + +sci_gateway/c/libscirandlib_la-sci_grand.lo: sci_gateway/c/sci_grand.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libscirandlib_la-sci_grand.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Tpo -c -o sci_gateway/c/libscirandlib_la-sci_grand.lo `test -f 'sci_gateway/c/sci_grand.c' || echo '$(srcdir)/'`sci_gateway/c/sci_grand.c + $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Tpo sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Plo +# $(AM_V_CC)source='sci_gateway/c/sci_grand.c' object='sci_gateway/c/libscirandlib_la-sci_grand.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libscirandlib_la-sci_grand.lo `test -f 'sci_gateway/c/sci_grand.c' || echo '$(srcdir)/'`sci_gateway/c/sci_grand.c + +.f.o: + $(AM_V_F77)$(F77COMPILE) -c -o $@ $< + +.f.obj: + $(AM_V_F77)$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.f.lo: + $(AM_V_F77)$(LTF77COMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf sci_gateway/c/.libs sci_gateway/c/_libs + -rm -rf src/c/.libs src/c/_libs + -rm -rf src/fortran/.libs src/fortran/_libs +install-libscirandlib_la_etcDATA: $(libscirandlib_la_etc_DATA) + @$(NORMAL_INSTALL) + @list='$(libscirandlib_la_etc_DATA)'; test -n "$(libscirandlib_la_etcdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libscirandlib_la_etcdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libscirandlib_la_etcdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscirandlib_la_etcdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libscirandlib_la_etcdir)" || exit $$?; \ + done + +uninstall-libscirandlib_la_etcDATA: + @$(NORMAL_UNINSTALL) + @list='$(libscirandlib_la_etc_DATA)'; test -n "$(libscirandlib_la_etcdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libscirandlib_la_etcdir)'; $(am__uninstall_files_from_dir) +install-libscirandlib_la_rootDATA: $(libscirandlib_la_root_DATA) + @$(NORMAL_INSTALL) + @list='$(libscirandlib_la_root_DATA)'; test -n "$(libscirandlib_la_rootdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libscirandlib_la_rootdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libscirandlib_la_rootdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscirandlib_la_rootdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libscirandlib_la_rootdir)" || exit $$?; \ + done + +uninstall-libscirandlib_la_rootDATA: + @$(NORMAL_UNINSTALL) + @list='$(libscirandlib_la_root_DATA)'; test -n "$(libscirandlib_la_rootdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libscirandlib_la_rootdir)'; $(am__uninstall_files_from_dir) +install-libscirandlib_la_sci_gatewayDATA: $(libscirandlib_la_sci_gateway_DATA) + @$(NORMAL_INSTALL) + @list='$(libscirandlib_la_sci_gateway_DATA)'; test -n "$(libscirandlib_la_sci_gatewaydir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)" || exit $$?; \ + done + +uninstall-libscirandlib_la_sci_gatewayDATA: + @$(NORMAL_UNINSTALL) + @list='$(libscirandlib_la_sci_gateway_DATA)'; test -n "$(libscirandlib_la_sci_gatewaydir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) all-local +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libscirandlib_la_etcdir)" "$(DESTDIR)$(libscirandlib_la_rootdir)" "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f sci_gateway/c/$(DEPDIR)/$(am__dirstamp) + -rm -f sci_gateway/c/$(am__dirstamp) + -rm -f src/c/$(DEPDIR)/$(am__dirstamp) + -rm -f src/c/$(am__dirstamp) + -rm -f src/fortran/$(DEPDIR)/$(am__dirstamp) + -rm -f src/fortran/$(am__dirstamp) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf sci_gateway/c/$(DEPDIR) src/c/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-local distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local install-libscirandlib_la_etcDATA \ + install-libscirandlib_la_rootDATA \ + install-libscirandlib_la_sci_gatewayDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: install-html-local + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf sci_gateway/c/$(DEPDIR) src/c/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libscirandlib_la_etcDATA \ + uninstall-libscirandlib_la_rootDATA \ + uninstall-libscirandlib_la_sci_gatewayDATA \ + uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \ + check-local clean clean-generic clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-local distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-html-local install-info \ + install-info-am install-libscirandlib_la_etcDATA \ + install-libscirandlib_la_rootDATA \ + install-libscirandlib_la_sci_gatewayDATA install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am \ + uninstall-libscirandlib_la_etcDATA \ + uninstall-libscirandlib_la_rootDATA \ + uninstall-libscirandlib_la_sci_gatewayDATA \ + uninstall-pkglibLTLIBRARIES + + +# This target enables tests for Scilab +check-local: $(top_builddir)/scilab-bin test + if test -d $(mydatadir)/tests; then \ + @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \ + fi +check-code: + if test -f build.xml; then \ + $(ANT) checkstyle; \ + fi + if test -x "$(SPLINT)"; then \ + $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \ + fi +java: +# Some configurations needs to export JAVA_HOME in the current env + @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ + if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT); \ + fi + +clean-java: +# Some configurations needs to export JAVA_HOME in the current env + @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ + if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT) clean; \ + fi; + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +#swig: $(SWIG_WRAPPERS) +# @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \ +# SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \ +# if test -n "$(SWIG_WRAPPERS)"; then \ +# for file in $(SWIG_WRAPPERS) ; do \ +# echo "Swig process of $$file (Java) ..."; \ +# $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \ +# done; \ +# fi + +#swig-scilab: $(SWIG_SCILAB_WRAPPERS) +# @SWIG_OUTDIR=src/swig/; \ +# if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \ +# for file in $(SWIG_SCILAB_WRAPPERS) ; do \ +# echo "Swig process of $$file (Scilab) ..."; \ +# $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \ +# done; \ +# fi + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +#giws: $(GIWS_WRAPPERS) +# @GIWS_OUTPUTDIR=src/jni/; \ +# MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \ +# if test -n "$(GIWS_WRAPPERS)"; then \ +# for file in $(GIWS_WRAPPERS) ; do \ +# echo "GIWS process of $$file ..."; \ +# if test -z "$(GIWS_OPTIONS)"; then \ +# $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +# else \ +# echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \ +# $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +# fi \ +# done; \ +# fi + +#giws-exception: +# @GIWS_OUTPUTDIR=src/jni/;\ +# echo "GIWS: Generation of exception class ..."; \ +# $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR + +macros: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been built"; \ + else \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\ + fi) + +# Removes the macros +clean-macros: +# Removes macros (*.bin generated from .sci) + @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \ + rm -f $(builddir)/$$dir/$(MACROBINMASK); \ + done + +test: +# More tests could be added here + @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT) test; \ + fi + +all-local: $(TARGETS_ALL) + +.sci.bin: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been build"; \ + else \ + echo "Creating $@"; \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \ + fi ) + +install-html-local: + +install-data-local-local: +# Mainly for javasci + @if test -d $(srcdir)/javadoc; then \ + cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \ + fi +# If the user wants the help sources to be installed + @echo "-------- Install of XML sources of help files --------"; \ + for lang in $(ALL_LINGUAS); do \ + if test -d $(srcdir)/help/$$lang; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \ + if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \ + for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \ + done ; \ + fi; \ + fi; \ + done; \ + @echo "-------- Install of MathML sources --------"; \ + if test -d $(srcdir)/help/mml/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \ + if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \ + for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \ + done ; \ + fi; \ + fi +install-data-local: +# Install the tests + @echo "-------- Install tests (if any) --------"; \ + for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the help chapter + @echo "-------- Install the help chapter (if any) --------"; \ + for lang in $(HELP_CHAPTERLANG); do \ + HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \ + if test -f $$HELPFILE; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + fi; \ + done +# Install the demos & examples + @echo "-------- Install demos & examples (if any) --------"; \ + for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the macros + @echo "-------- Install macros (if any) --------"; \ + for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + if test -d $(srcdir)/$$dir/; then \ + FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\ + if test -n "$(MACROSSPECIALEXT)"; then \ + specialExtDir=""; \ + for specialExt in $(MACROSSPECIALEXT); do \ + specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \ + done; \ + FILELIST="$$FILELIST $$specialExtDir"; \ + fi; \ + for file in `ls -1 $$FILELIST 2>/dev/null`; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \ + done; \ + fi; \ + done +# Install java files (.jar) + @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \ + echo "-------- Install jar files --------"; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \ + for file in $(srcdir)/$(JARDIR)$(JARMASK); do\ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \ + done ; \ + fi + +########### CLEAN ################### +# Clean help (generated automatically by Scilab) +# It used to clean the macro (clean-macros) but this was causing +# make clean && make to fail Scilab startup +clean-local: clean-java +#clean-local: + +distclean-local: + rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_* + +.PHONY: macros java swig giws + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/modules/randlib/Makefile.am b/modules/randlib/Makefile.am new file mode 100755 index 000000000..54d918be1 --- /dev/null +++ b/modules/randlib/Makefile.am @@ -0,0 +1,85 @@ +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006 - INRIA - Sylvestre LEDRU +# +# This file is distributed under the same license as the Scilab package. + + +RANDLIB_C_SOURCES = src/c/fsultra.c \ +src/c/mt.c \ +src/c/igngeom.c \ +src/c/kiss.c \ +src/c/urand.c \ +src/c/clcg2.c \ +src/c/clcg4.c \ +src/c/sexpo.c \ +src/c/ignbin.c \ +src/c/ignpoi.c \ +src/c/sgamma.c \ +src/c/genbet.c + +RANDLIB_FORTRAN_SOURCES = \ +src/fortran/gennf.f \ +src/fortran/genchi.f \ +src/fortran/setgmn.f \ +src/fortran/gengam.f \ +src/fortran/snorm.f \ +src/fortran/gennch.f \ +src/fortran/genmn.f \ +src/fortran/phrtsd.f \ +src/fortran/ignnbn.f \ +src/fortran/genf.f \ +src/fortran/genunf.f \ +src/fortran/genexp.f \ +src/fortran/genmul.f \ +src/fortran/genprm.f \ +src/fortran/gennor.f +#src/fortran/genbet.f +#src/fortran/sexpo.f +#src/fortran/ignbin.f +#src/fortran/ignpoi.f +#src/fortran/sgamma.f + +GATEWAY_C_SOURCES = sci_gateway/c/gw_randlib.c \ +sci_gateway/c/sci_grand.c + +libscirandlib_la_CPPFLAGS = -I$(srcdir)/includes/ \ + -I$(top_srcdir)/modules/api_scilab/includes/ \ + -I$(top_srcdir)/modules/localization/includes/ \ + -I$(top_srcdir)/modules/output_stream/includes/ \ + $(AM_CPPFLAGS) + +pkglib_LTLIBRARIES = libscirandlib.la +noinst_LTLIBRARIES = libscirandlib-algo.la + + +libscirandlib_algo_la_SOURCES = $(RANDLIB_C_SOURCES) $(RANDLIB_FORTRAN_SOURCES) +libscirandlib_la_SOURCES = $(GATEWAY_C_SOURCES) +libscirandlib_algo_la_CPPFLAGS = $(libscirandlib_la_CPPFLAGS) + +# For the code check (splint) +CHECK_SRC= $(RANDLIB_C_SOURCES) $(GATEWAY_C_SOURCES) +INCLUDE_FLAGS = $(libscirandlib_la_CPPFLAGS) + +libscirandlib_la_LIBADD = libscirandlib-algo.la + + + + +#### Target ###### +modulename=randlib + + +#### randlib : Conf files #### +libscirandlib_la_rootdir = $(mydatadir) +libscirandlib_la_root_DATA = license.txt + + +#### randlib : init scripts #### +libscirandlib_la_etcdir = $(mydatadir)/etc +libscirandlib_la_etc_DATA = etc/randlib.quit etc/randlib.start + +#### randlib : gateway declaration #### +libscirandlib_la_sci_gatewaydir = $(mydatadir)/sci_gateway +libscirandlib_la_sci_gateway_DATA = sci_gateway/randlib_gateway.xml + +include $(top_srcdir)/Makefile.incl.am diff --git a/modules/randlib/Makefile.in b/modules/randlib/Makefile.in new file mode 100755 index 000000000..b8ec0b388 --- /dev/null +++ b/modules/randlib/Makefile.in @@ -0,0 +1,1540 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006 - INRIA - Sylvestre LEDRU +# +# This file is distributed under the same license as the Scilab package. + +# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr> +# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +# +# This file must be used under the terms of the CeCILL. +# This source file is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at +# http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +# + +########## +### Makefile included stuff +### Target, variable, suffixes which are supposed to be useful in every makefile.am +########## + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(top_srcdir)/Makefile.incl.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/mkinstalldirs \ + $(top_srcdir)/config/depcomp +@NEED_JAVA_TRUE@am__append_1 = java +subdir = modules/randlib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \ + $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/curl.m4 \ + $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/doxygen.m4 \ + $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \ + $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \ + $(top_srcdir)/m4/intel_compiler.m4 \ + $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \ + $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/macosx.m4 \ + $(top_srcdir)/m4/mpi.m4 $(top_srcdir)/m4/ocaml.m4 \ + $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \ + $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \ + $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkglibdir)" \ + "$(DESTDIR)$(libscirandlib_la_etcdir)" \ + "$(DESTDIR)$(libscirandlib_la_rootdir)" \ + "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES) +libscirandlib_algo_la_LIBADD = +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = src/c/libscirandlib_algo_la-fsultra.lo \ + src/c/libscirandlib_algo_la-mt.lo \ + src/c/libscirandlib_algo_la-igngeom.lo \ + src/c/libscirandlib_algo_la-kiss.lo \ + src/c/libscirandlib_algo_la-urand.lo \ + src/c/libscirandlib_algo_la-clcg2.lo \ + src/c/libscirandlib_algo_la-clcg4.lo \ + src/c/libscirandlib_algo_la-sexpo.lo \ + src/c/libscirandlib_algo_la-ignbin.lo \ + src/c/libscirandlib_algo_la-ignpoi.lo \ + src/c/libscirandlib_algo_la-sgamma.lo \ + src/c/libscirandlib_algo_la-genbet.lo +am__objects_2 = src/fortran/gennf.lo src/fortran/genchi.lo \ + src/fortran/setgmn.lo src/fortran/gengam.lo \ + src/fortran/snorm.lo src/fortran/gennch.lo \ + src/fortran/genmn.lo src/fortran/phrtsd.lo \ + src/fortran/ignnbn.lo src/fortran/genf.lo \ + src/fortran/genunf.lo src/fortran/genexp.lo \ + src/fortran/genmul.lo src/fortran/genprm.lo \ + src/fortran/gennor.lo +am_libscirandlib_algo_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libscirandlib_algo_la_OBJECTS = $(am_libscirandlib_algo_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libscirandlib_la_DEPENDENCIES = libscirandlib-algo.la +am__objects_3 = sci_gateway/c/libscirandlib_la-gw_randlib.lo \ + sci_gateway/c/libscirandlib_la-sci_grand.lo +am_libscirandlib_la_OBJECTS = $(am__objects_3) +libscirandlib_la_OBJECTS = $(am_libscirandlib_la_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS) +LTF77COMPILE = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) +AM_V_F77 = $(am__v_F77_@AM_V@) +am__v_F77_ = $(am__v_F77_@AM_DEFAULT_V@) +am__v_F77_0 = @echo " F77 " $@; +am__v_F77_1 = +F77LD = $(F77) +F77LINK = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_F77LD = $(am__v_F77LD_@AM_V@) +am__v_F77LD_ = $(am__v_F77LD_@AM_DEFAULT_V@) +am__v_F77LD_0 = @echo " F77LD " $@; +am__v_F77LD_1 = +SOURCES = $(libscirandlib_algo_la_SOURCES) $(libscirandlib_la_SOURCES) +DIST_SOURCES = $(libscirandlib_algo_la_SOURCES) \ + $(libscirandlib_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(libscirandlib_la_etc_DATA) $(libscirandlib_la_root_DATA) \ + $(libscirandlib_la_sci_gateway_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +ALL_LINGUAS_DOC = @ALL_LINGUAS_DOC@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +ANT = @ANT@ +ANTLR = @ANTLR@ +AR = @AR@ +ARPACK_LIBS = @ARPACK_LIBS@ +ASM3 = @ASM3@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AVALON_FRAMEWORK = @AVALON_FRAMEWORK@ +AWK = @AWK@ +BATIK = @BATIK@ +BLAS_LIBS = @BLAS_LIBS@ +CC = @CC@ +CCACHE = @CCACHE@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECKSTYLE = @CHECKSTYLE@ +COBERTURA = @COBERTURA@ +COMMONS_BEANUTILS = @COMMONS_BEANUTILS@ +COMMONS_IO = @COMMONS_IO@ +COMMONS_LOGGING = @COMMONS_LOGGING@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_CONFIG = @CURL_CONFIG@ +CURL_LIBS = @CURL_LIBS@ +CURL_VERSION = @CURL_VERSION@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOCBOOK_ROOT = @DOCBOOK_ROOT@ +DOXYGEN_BIN = @DOXYGEN_BIN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECJ = @ECJ@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FFTW3_LIB = @FFTW3_LIB@ +FFTW_ENABLE = @FFTW_ENABLE@ +FGREP = @FGREP@ +FLEXDOCK = @FLEXDOCK@ +FLIBS = @FLIBS@ +FOP = @FOP@ +FREEHEP_GRAPHICS2D = @FREEHEP_GRAPHICS2D@ +FREEHEP_GRAPHICSIO = @FREEHEP_GRAPHICSIO@ +FREEHEP_GRAPHICSIO_EMF = @FREEHEP_GRAPHICSIO_EMF@ +FREEHEP_IO = @FREEHEP_IO@ +FREEHEP_UTIL = @FREEHEP_UTIL@ +GENHTML = @GENHTML@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GIWS_BIN = @GIWS_BIN@ +GLUEGEN2_RT = @GLUEGEN2_RT@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GRAPHICS_ENABLE = @GRAPHICS_ENABLE@ +GREP = @GREP@ +GUI_ENABLE = @GUI_ENABLE@ +HDF5_CFLAGS = @HDF5_CFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ +HELP_ENABLE = @HELP_ENABLE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JAR = @JAR@ +JAVA = @JAVA@ +JAVAC = @JAVAC@ +JAVAC_DEBUG = @JAVAC_DEBUG@ +JAVADOC = @JAVADOC@ +JAVAH = @JAVAH@ +JAVASCI_ENABLE = @JAVASCI_ENABLE@ +JAVA_ENABLE = @JAVA_ENABLE@ +JAVA_G = @JAVA_G@ +JAVA_HOME = @JAVA_HOME@ +JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@ +JAVA_JNI_LIBS = @JAVA_JNI_LIBS@ +JDB = @JDB@ +JEUCLID_CORE = @JEUCLID_CORE@ +JGRAPHX = @JGRAPHX@ +JHALL = @JHALL@ +JLATEXMATH = @JLATEXMATH@ +JLATEXMATH_FOP = @JLATEXMATH_FOP@ +JOGL2 = @JOGL2@ +JROSETTA_API = @JROSETTA_API@ +JROSETTA_ENGINE = @JROSETTA_ENGINE@ +JUNIT4 = @JUNIT4@ +LAPACK_LIBS = @LAPACK_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOGGING_LEVEL = @LOGGING_LEVEL@ +LOOKS = @LOOKS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MATIO_CFLAGS = @MATIO_CFLAGS@ +MATIO_ENABLE = @MATIO_ENABLE@ +MATIO_LIBS = @MATIO_LIBS@ +MKDIR_P = @MKDIR_P@ +MPI_ENABLE = @MPI_ENABLE@ +MSGCAT = @MSGCAT@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OCAMLC = @OCAMLC@ +OCAMLDEP = @OCAMLDEP@ +OCAMLLEX = @OCAMLLEX@ +OCAMLOPT = @OCAMLOPT@ +OCAMLYACC = @OCAMLYACC@ +OPENMPI_CC = @OPENMPI_CC@ +OPENMPI_CFLAGS = @OPENMPI_CFLAGS@ +OPENMPI_CXX = @OPENMPI_CXX@ +OPENMPI_CXXFLAGS = @OPENMPI_CXXFLAGS@ +OPENMPI_LIBS = @OPENMPI_LIBS@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ +OPENMP_ENABLE = @OPENMP_ENABLE@ +OPENMP_LIBS = @OPENMP_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_CONFIG = @PCRE_CONFIG@ +PCRE_LIBS = @PCRE_LIBS@ +PCRE_VERSION = @PCRE_VERSION@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +POW_LIB = @POW_LIB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELOCATABLE = @RELOCATABLE@ +RT_LIB = @RT_LIB@ +SAXON = @SAXON@ +SCILAB_BINARY_VERSION = @SCILAB_BINARY_VERSION@ +SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@ +SCILAB_VERSION_MAINTENANCE = @SCILAB_VERSION_MAINTENANCE@ +SCILAB_VERSION_MAJOR = @SCILAB_VERSION_MAJOR@ +SCILAB_VERSION_MINOR = @SCILAB_VERSION_MINOR@ +SCIRENDERER = @SCIRENDERER@ +SCIRENDERER_CP = @SCIRENDERER_CP@ +SCI_CFLAGS = @SCI_CFLAGS@ +SCI_CXXFLAGS = @SCI_CXXFLAGS@ +SCI_FFLAGS = @SCI_FFLAGS@ +SCI_LDFLAGS = @SCI_LDFLAGS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SET_RELOCATABLE = @SET_RELOCATABLE@ +SHELL = @SHELL@ +SKINLF = @SKINLF@ +SPLINT = @SPLINT@ +STRIP = @STRIP@ +SWIG_BIN = @SWIG_BIN@ +SWIG_JAVA = @SWIG_JAVA@ +SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@ +SWIG_SCILAB = @SWIG_SCILAB@ +TCLTK_LIBS = @TCLTK_LIBS@ +TCL_INC_PATH = @TCL_INC_PATH@ +TK_INC_PATH = @TK_INC_PATH@ +UMFPACK_CFLAGS = @UMFPACK_CFLAGS@ +UMFPACK_ENABLE = @UMFPACK_ENABLE@ +UMFPACK_LIB = @UMFPACK_LIB@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WITH_OCAML = @WITH_OCAML@ +WITH_TKSCI = @WITH_TKSCI@ +XCOS_ENABLE = @XCOS_ENABLE@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@ +XML_APIS_EXT = @XML_APIS_EXT@ +XML_CONFIG = @XML_CONFIG@ +XML_FLAGS = @XML_FLAGS@ +XML_LIBS = @XML_LIBS@ +XML_VERSION = @XML_VERSION@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cxx_present = @cxx_present@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +RANDLIB_C_SOURCES = src/c/fsultra.c \ +src/c/mt.c \ +src/c/igngeom.c \ +src/c/kiss.c \ +src/c/urand.c \ +src/c/clcg2.c \ +src/c/clcg4.c \ +src/c/sexpo.c \ +src/c/ignbin.c \ +src/c/ignpoi.c \ +src/c/sgamma.c \ +src/c/genbet.c + +RANDLIB_FORTRAN_SOURCES = \ +src/fortran/gennf.f \ +src/fortran/genchi.f \ +src/fortran/setgmn.f \ +src/fortran/gengam.f \ +src/fortran/snorm.f \ +src/fortran/gennch.f \ +src/fortran/genmn.f \ +src/fortran/phrtsd.f \ +src/fortran/ignnbn.f \ +src/fortran/genf.f \ +src/fortran/genunf.f \ +src/fortran/genexp.f \ +src/fortran/genmul.f \ +src/fortran/genprm.f \ +src/fortran/gennor.f + +#src/fortran/genbet.f +#src/fortran/sexpo.f +#src/fortran/ignbin.f +#src/fortran/ignpoi.f +#src/fortran/sgamma.f +GATEWAY_C_SOURCES = sci_gateway/c/gw_randlib.c \ +sci_gateway/c/sci_grand.c + +libscirandlib_la_CPPFLAGS = -I$(srcdir)/includes/ \ + -I$(top_srcdir)/modules/api_scilab/includes/ \ + -I$(top_srcdir)/modules/localization/includes/ \ + -I$(top_srcdir)/modules/output_stream/includes/ \ + $(AM_CPPFLAGS) + +pkglib_LTLIBRARIES = libscirandlib.la +noinst_LTLIBRARIES = libscirandlib-algo.la +libscirandlib_algo_la_SOURCES = $(RANDLIB_C_SOURCES) $(RANDLIB_FORTRAN_SOURCES) +libscirandlib_la_SOURCES = $(GATEWAY_C_SOURCES) +libscirandlib_algo_la_CPPFLAGS = $(libscirandlib_la_CPPFLAGS) + +# For the code check (splint) +CHECK_SRC = $(RANDLIB_C_SOURCES) $(GATEWAY_C_SOURCES) +INCLUDE_FLAGS = $(libscirandlib_la_CPPFLAGS) +libscirandlib_la_LIBADD = libscirandlib-algo.la + +#### Target ###### +modulename = randlib + +#### randlib : Conf files #### +libscirandlib_la_rootdir = $(mydatadir) +libscirandlib_la_root_DATA = license.txt + +#### randlib : init scripts #### +libscirandlib_la_etcdir = $(mydatadir)/etc +libscirandlib_la_etc_DATA = etc/randlib.quit etc/randlib.start + +#### randlib : gateway declaration #### +libscirandlib_la_sci_gatewaydir = $(mydatadir)/sci_gateway +libscirandlib_la_sci_gateway_DATA = sci_gateway/randlib_gateway.xml + +# Where all the Scilab stuff is installed (macros, help, ...) +mydatadir = $(pkgdatadir)/modules/$(modulename) + +# Set AM_* SCI detected settings +AM_CPPFLAGS = $(SCI_CPPFLAGS) +AM_CFLAGS = $(SCI_CFLAGS) +AM_CXXFLAGS = $(SCI_CXXFLAGS) +# append includes to AM_FFLAGS to manage fortran includes +AM_FFLAGS = $(SCI_FFLAGS) -I$(top_srcdir)/modules/core/includes/ + +# Tag shared libraries with the Scilab version +AM_LDFLAGS = $(SCI_LDFLAGS) -version-number $(SCILAB_LIBRARY_VERSION) + +# splint options +SPLINT_OPTIONS = -weak -booltype BOOL + +########################### JAVA ###################################### +#### We are delegating java compilation to ant... Thanks to that +#### the procedure will be the same with Microsoft Windows (C) +#### and Linux/Unix +####################################################################### +TARGETS_ALL = $(am__append_1) + +################ MACROS ###################### +# Rule to build a macro +# NOT USED AT THE MOMENT +SUFFIXES = .sci + +########### INSTALL DOCUMENTATION ################### + +# Install documentation files into the right target +# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because +# automake needs the html files to be present which is not the case when +# we are building Scilab + +# Where it should be installed +pkgdocdir = $(mydatadir) + +# What is the mask of the help source +DOCMASKXML = *.xml + +# What is the mask of the MathML sources +DOCMASKMML = *.mml + +########### INSTALL DATA ################### +# Install macros, help & demos +# Where it should be installed +pkgmacrosdir = $(mydatadir) +# Which directory we process +MACRODIRS = macros/ +# Mask of the Scilab sources macros +MACROMASK = *.sci +# Mask of the Scilab executable sources macros +MACROBUILDMASK = *.sce +# Mask of the Scilab compiled macros +MACROBINMASK = *.bin +# List of the standard directory for tests +TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests tests/java +# Where the demos should be installed +pkgdemosdir = $(mydatadir) +# List of the standard directory for demos +DEMOS_DIR = demos +# List of the standard directory for examples +EXAMPLES_DIR = examples +# Where to export JAVA archives (.jar) +JARDIR = jar/ +# JAR files mask +JARMASK = *.jar +# Chapter file +HELP_CHAPTERDIR = help/ +HELP_CHAPTERFILE = addchapter.sce +HELP_CHAPTERLANG = en_US fr_FR pt_BR +all: all-am + +.SUFFIXES: +.SUFFIXES: .sci .bin .c .f .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/randlib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign modules/randlib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/Makefile.incl.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +src/c/$(am__dirstamp): + @$(MKDIR_P) src/c + @: > src/c/$(am__dirstamp) +src/c/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/c/$(DEPDIR) + @: > src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-fsultra.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-mt.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-igngeom.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-kiss.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-urand.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-clcg2.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-clcg4.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-sexpo.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-ignbin.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-ignpoi.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-sgamma.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/c/libscirandlib_algo_la-genbet.lo: src/c/$(am__dirstamp) \ + src/c/$(DEPDIR)/$(am__dirstamp) +src/fortran/$(am__dirstamp): + @$(MKDIR_P) src/fortran + @: > src/fortran/$(am__dirstamp) +src/fortran/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/fortran/$(DEPDIR) + @: > src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gennf.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genchi.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/setgmn.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gengam.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/snorm.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gennch.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genmn.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/phrtsd.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/ignnbn.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genf.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genunf.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genexp.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genmul.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/genprm.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) +src/fortran/gennor.lo: src/fortran/$(am__dirstamp) \ + src/fortran/$(DEPDIR)/$(am__dirstamp) + +libscirandlib-algo.la: $(libscirandlib_algo_la_OBJECTS) $(libscirandlib_algo_la_DEPENDENCIES) $(EXTRA_libscirandlib_algo_la_DEPENDENCIES) + $(AM_V_F77LD)$(F77LINK) $(libscirandlib_algo_la_OBJECTS) $(libscirandlib_algo_la_LIBADD) $(LIBS) +sci_gateway/c/$(am__dirstamp): + @$(MKDIR_P) sci_gateway/c + @: > sci_gateway/c/$(am__dirstamp) +sci_gateway/c/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) sci_gateway/c/$(DEPDIR) + @: > sci_gateway/c/$(DEPDIR)/$(am__dirstamp) +sci_gateway/c/libscirandlib_la-gw_randlib.lo: \ + sci_gateway/c/$(am__dirstamp) \ + sci_gateway/c/$(DEPDIR)/$(am__dirstamp) +sci_gateway/c/libscirandlib_la-sci_grand.lo: \ + sci_gateway/c/$(am__dirstamp) \ + sci_gateway/c/$(DEPDIR)/$(am__dirstamp) + +libscirandlib.la: $(libscirandlib_la_OBJECTS) $(libscirandlib_la_DEPENDENCIES) $(EXTRA_libscirandlib_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) -rpath $(pkglibdir) $(libscirandlib_la_OBJECTS) $(libscirandlib_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f sci_gateway/c/*.$(OBJEXT) + -rm -f sci_gateway/c/*.lo + -rm -f src/c/*.$(OBJEXT) + -rm -f src/c/*.lo + -rm -f src/fortran/*.$(OBJEXT) + -rm -f src/fortran/*.lo + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +src/c/libscirandlib_algo_la-fsultra.lo: src/c/fsultra.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-fsultra.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Tpo -c -o src/c/libscirandlib_algo_la-fsultra.lo `test -f 'src/c/fsultra.c' || echo '$(srcdir)/'`src/c/fsultra.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-fsultra.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/fsultra.c' object='src/c/libscirandlib_algo_la-fsultra.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-fsultra.lo `test -f 'src/c/fsultra.c' || echo '$(srcdir)/'`src/c/fsultra.c + +src/c/libscirandlib_algo_la-mt.lo: src/c/mt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-mt.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Tpo -c -o src/c/libscirandlib_algo_la-mt.lo `test -f 'src/c/mt.c' || echo '$(srcdir)/'`src/c/mt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-mt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/mt.c' object='src/c/libscirandlib_algo_la-mt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-mt.lo `test -f 'src/c/mt.c' || echo '$(srcdir)/'`src/c/mt.c + +src/c/libscirandlib_algo_la-igngeom.lo: src/c/igngeom.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-igngeom.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Tpo -c -o src/c/libscirandlib_algo_la-igngeom.lo `test -f 'src/c/igngeom.c' || echo '$(srcdir)/'`src/c/igngeom.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-igngeom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/igngeom.c' object='src/c/libscirandlib_algo_la-igngeom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-igngeom.lo `test -f 'src/c/igngeom.c' || echo '$(srcdir)/'`src/c/igngeom.c + +src/c/libscirandlib_algo_la-kiss.lo: src/c/kiss.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-kiss.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Tpo -c -o src/c/libscirandlib_algo_la-kiss.lo `test -f 'src/c/kiss.c' || echo '$(srcdir)/'`src/c/kiss.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-kiss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/kiss.c' object='src/c/libscirandlib_algo_la-kiss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-kiss.lo `test -f 'src/c/kiss.c' || echo '$(srcdir)/'`src/c/kiss.c + +src/c/libscirandlib_algo_la-urand.lo: src/c/urand.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-urand.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Tpo -c -o src/c/libscirandlib_algo_la-urand.lo `test -f 'src/c/urand.c' || echo '$(srcdir)/'`src/c/urand.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-urand.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/urand.c' object='src/c/libscirandlib_algo_la-urand.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-urand.lo `test -f 'src/c/urand.c' || echo '$(srcdir)/'`src/c/urand.c + +src/c/libscirandlib_algo_la-clcg2.lo: src/c/clcg2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-clcg2.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Tpo -c -o src/c/libscirandlib_algo_la-clcg2.lo `test -f 'src/c/clcg2.c' || echo '$(srcdir)/'`src/c/clcg2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-clcg2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/clcg2.c' object='src/c/libscirandlib_algo_la-clcg2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-clcg2.lo `test -f 'src/c/clcg2.c' || echo '$(srcdir)/'`src/c/clcg2.c + +src/c/libscirandlib_algo_la-clcg4.lo: src/c/clcg4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-clcg4.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Tpo -c -o src/c/libscirandlib_algo_la-clcg4.lo `test -f 'src/c/clcg4.c' || echo '$(srcdir)/'`src/c/clcg4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-clcg4.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/clcg4.c' object='src/c/libscirandlib_algo_la-clcg4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-clcg4.lo `test -f 'src/c/clcg4.c' || echo '$(srcdir)/'`src/c/clcg4.c + +src/c/libscirandlib_algo_la-sexpo.lo: src/c/sexpo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-sexpo.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Tpo -c -o src/c/libscirandlib_algo_la-sexpo.lo `test -f 'src/c/sexpo.c' || echo '$(srcdir)/'`src/c/sexpo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-sexpo.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/sexpo.c' object='src/c/libscirandlib_algo_la-sexpo.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-sexpo.lo `test -f 'src/c/sexpo.c' || echo '$(srcdir)/'`src/c/sexpo.c + +src/c/libscirandlib_algo_la-ignbin.lo: src/c/ignbin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-ignbin.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Tpo -c -o src/c/libscirandlib_algo_la-ignbin.lo `test -f 'src/c/ignbin.c' || echo '$(srcdir)/'`src/c/ignbin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-ignbin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/ignbin.c' object='src/c/libscirandlib_algo_la-ignbin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-ignbin.lo `test -f 'src/c/ignbin.c' || echo '$(srcdir)/'`src/c/ignbin.c + +src/c/libscirandlib_algo_la-ignpoi.lo: src/c/ignpoi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-ignpoi.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Tpo -c -o src/c/libscirandlib_algo_la-ignpoi.lo `test -f 'src/c/ignpoi.c' || echo '$(srcdir)/'`src/c/ignpoi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-ignpoi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/ignpoi.c' object='src/c/libscirandlib_algo_la-ignpoi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-ignpoi.lo `test -f 'src/c/ignpoi.c' || echo '$(srcdir)/'`src/c/ignpoi.c + +src/c/libscirandlib_algo_la-sgamma.lo: src/c/sgamma.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-sgamma.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Tpo -c -o src/c/libscirandlib_algo_la-sgamma.lo `test -f 'src/c/sgamma.c' || echo '$(srcdir)/'`src/c/sgamma.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-sgamma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/sgamma.c' object='src/c/libscirandlib_algo_la-sgamma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-sgamma.lo `test -f 'src/c/sgamma.c' || echo '$(srcdir)/'`src/c/sgamma.c + +src/c/libscirandlib_algo_la-genbet.lo: src/c/genbet.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscirandlib_algo_la-genbet.lo -MD -MP -MF src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Tpo -c -o src/c/libscirandlib_algo_la-genbet.lo `test -f 'src/c/genbet.c' || echo '$(srcdir)/'`src/c/genbet.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Tpo src/c/$(DEPDIR)/libscirandlib_algo_la-genbet.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/genbet.c' object='src/c/libscirandlib_algo_la-genbet.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libscirandlib_algo_la-genbet.lo `test -f 'src/c/genbet.c' || echo '$(srcdir)/'`src/c/genbet.c + +sci_gateway/c/libscirandlib_la-gw_randlib.lo: sci_gateway/c/gw_randlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libscirandlib_la-gw_randlib.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Tpo -c -o sci_gateway/c/libscirandlib_la-gw_randlib.lo `test -f 'sci_gateway/c/gw_randlib.c' || echo '$(srcdir)/'`sci_gateway/c/gw_randlib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Tpo sci_gateway/c/$(DEPDIR)/libscirandlib_la-gw_randlib.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sci_gateway/c/gw_randlib.c' object='sci_gateway/c/libscirandlib_la-gw_randlib.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libscirandlib_la-gw_randlib.lo `test -f 'sci_gateway/c/gw_randlib.c' || echo '$(srcdir)/'`sci_gateway/c/gw_randlib.c + +sci_gateway/c/libscirandlib_la-sci_grand.lo: sci_gateway/c/sci_grand.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libscirandlib_la-sci_grand.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Tpo -c -o sci_gateway/c/libscirandlib_la-sci_grand.lo `test -f 'sci_gateway/c/sci_grand.c' || echo '$(srcdir)/'`sci_gateway/c/sci_grand.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Tpo sci_gateway/c/$(DEPDIR)/libscirandlib_la-sci_grand.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sci_gateway/c/sci_grand.c' object='sci_gateway/c/libscirandlib_la-sci_grand.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscirandlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libscirandlib_la-sci_grand.lo `test -f 'sci_gateway/c/sci_grand.c' || echo '$(srcdir)/'`sci_gateway/c/sci_grand.c + +.f.o: + $(AM_V_F77)$(F77COMPILE) -c -o $@ $< + +.f.obj: + $(AM_V_F77)$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.f.lo: + $(AM_V_F77)$(LTF77COMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf sci_gateway/c/.libs sci_gateway/c/_libs + -rm -rf src/c/.libs src/c/_libs + -rm -rf src/fortran/.libs src/fortran/_libs +install-libscirandlib_la_etcDATA: $(libscirandlib_la_etc_DATA) + @$(NORMAL_INSTALL) + @list='$(libscirandlib_la_etc_DATA)'; test -n "$(libscirandlib_la_etcdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libscirandlib_la_etcdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libscirandlib_la_etcdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscirandlib_la_etcdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libscirandlib_la_etcdir)" || exit $$?; \ + done + +uninstall-libscirandlib_la_etcDATA: + @$(NORMAL_UNINSTALL) + @list='$(libscirandlib_la_etc_DATA)'; test -n "$(libscirandlib_la_etcdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libscirandlib_la_etcdir)'; $(am__uninstall_files_from_dir) +install-libscirandlib_la_rootDATA: $(libscirandlib_la_root_DATA) + @$(NORMAL_INSTALL) + @list='$(libscirandlib_la_root_DATA)'; test -n "$(libscirandlib_la_rootdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libscirandlib_la_rootdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libscirandlib_la_rootdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscirandlib_la_rootdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libscirandlib_la_rootdir)" || exit $$?; \ + done + +uninstall-libscirandlib_la_rootDATA: + @$(NORMAL_UNINSTALL) + @list='$(libscirandlib_la_root_DATA)'; test -n "$(libscirandlib_la_rootdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libscirandlib_la_rootdir)'; $(am__uninstall_files_from_dir) +install-libscirandlib_la_sci_gatewayDATA: $(libscirandlib_la_sci_gateway_DATA) + @$(NORMAL_INSTALL) + @list='$(libscirandlib_la_sci_gateway_DATA)'; test -n "$(libscirandlib_la_sci_gatewaydir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)" || exit $$?; \ + done + +uninstall-libscirandlib_la_sci_gatewayDATA: + @$(NORMAL_UNINSTALL) + @list='$(libscirandlib_la_sci_gateway_DATA)'; test -n "$(libscirandlib_la_sci_gatewaydir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) all-local +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libscirandlib_la_etcdir)" "$(DESTDIR)$(libscirandlib_la_rootdir)" "$(DESTDIR)$(libscirandlib_la_sci_gatewaydir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f sci_gateway/c/$(DEPDIR)/$(am__dirstamp) + -rm -f sci_gateway/c/$(am__dirstamp) + -rm -f src/c/$(DEPDIR)/$(am__dirstamp) + -rm -f src/c/$(am__dirstamp) + -rm -f src/fortran/$(DEPDIR)/$(am__dirstamp) + -rm -f src/fortran/$(am__dirstamp) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf sci_gateway/c/$(DEPDIR) src/c/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-local distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-data-local install-libscirandlib_la_etcDATA \ + install-libscirandlib_la_rootDATA \ + install-libscirandlib_la_sci_gatewayDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: install-html-local + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf sci_gateway/c/$(DEPDIR) src/c/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libscirandlib_la_etcDATA \ + uninstall-libscirandlib_la_rootDATA \ + uninstall-libscirandlib_la_sci_gatewayDATA \ + uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am \ + check-local clean clean-generic clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-local distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-html-local install-info \ + install-info-am install-libscirandlib_la_etcDATA \ + install-libscirandlib_la_rootDATA \ + install-libscirandlib_la_sci_gatewayDATA install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am \ + uninstall-libscirandlib_la_etcDATA \ + uninstall-libscirandlib_la_rootDATA \ + uninstall-libscirandlib_la_sci_gatewayDATA \ + uninstall-pkglibLTLIBRARIES + + +# This target enables tests for Scilab +check-local: $(top_builddir)/scilab-bin test + if test -d $(mydatadir)/tests; then \ + @COMMAND="try test_run('$(modulename)');catch exit(-1);end;exit(0)"; export LANG=C; $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"; \ + fi +check-code: + if test -f build.xml; then \ + $(ANT) checkstyle; \ + fi + if test -x "$(SPLINT)"; then \ + $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \ + fi +@NEED_JAVA_TRUE@java: +# Some configurations needs to export JAVA_HOME in the current env +@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ +@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ +@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \ +@NEED_JAVA_TRUE@ $(ANT); \ +@NEED_JAVA_TRUE@ fi + +@NEED_JAVA_TRUE@clean-java: +# Some configurations needs to export JAVA_HOME in the current env +@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \ +@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ +@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \ +@NEED_JAVA_TRUE@ $(ANT) clean; \ +@NEED_JAVA_TRUE@ fi; + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +@SWIG_TRUE@swig: $(SWIG_WRAPPERS) +@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \ +@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \ +@SWIG_TRUE@ if test -n "$(SWIG_WRAPPERS)"; then \ +@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \ +@SWIG_TRUE@ echo "Swig process of $$file (Java) ..."; \ +@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \ +@SWIG_TRUE@ done; \ +@SWIG_TRUE@ fi + +@SWIG_TRUE@swig-scilab: $(SWIG_SCILAB_WRAPPERS) +@SWIG_TRUE@ @SWIG_OUTDIR=src/swig/; \ +@SWIG_TRUE@ if test -n "$(SWIG_SCILAB_WRAPPERS)"; then \ +@SWIG_TRUE@ for file in $(SWIG_SCILAB_WRAPPERS) ; do \ +@SWIG_TRUE@ echo "Swig process of $$file (Scilab) ..."; \ +@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_SCILAB) -outdir $$SWIG_OUTDIR $$file; \ +@SWIG_TRUE@ done; \ +@SWIG_TRUE@ fi + +# If the user request for the SWIG generation of the wrappers Java => C/C++ +# We call the target swig-build on the variable SWIG_WRAPPERS + +@GIWS_TRUE@giws: $(GIWS_WRAPPERS) +@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/; \ +@GIWS_TRUE@ MANDATORY_OPTIONS="--throws-exception-on-error --description-file"; \ +@GIWS_TRUE@ if test -n "$(GIWS_WRAPPERS)"; then \ +@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \ +@GIWS_TRUE@ echo "GIWS process of $$file ..."; \ +@GIWS_TRUE@ if test -z "$(GIWS_OPTIONS)"; then \ +@GIWS_TRUE@ $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +@GIWS_TRUE@ else \ +@GIWS_TRUE@ echo "Custom GIWS call with '$$GIWS_OPTIONS'"; \ +@GIWS_TRUE@ $(GIWS_BIN) $$GIWS_OPTIONS --output-dir $$GIWS_OUTPUTDIR $$MANDATORY_OPTIONS $$file; \ +@GIWS_TRUE@ fi \ +@GIWS_TRUE@ done; \ +@GIWS_TRUE@ fi + +@GIWS_TRUE@giws-exception: +@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\ +@GIWS_TRUE@ echo "GIWS: Generation of exception class ..."; \ +@GIWS_TRUE@ $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR + +macros: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been built"; \ + else \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\ + fi) + +# Removes the macros +clean-macros: +# Removes macros (*.bin generated from .sci) + @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \ + rm -f $(builddir)/$$dir/$(MACROBINMASK); \ + done + +test: +# More tests could be added here + @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \ + if test -f build.xml -a $$USEANT -eq 1; then \ + $(ANT) test; \ + fi + +all-local: $(TARGETS_ALL) + +.sci.bin: + -@( if test ! -x $(top_builddir)/scilab-bin; then \ + echo "Error : Cannot build $< : Scilab has not been build"; \ + else \ + echo "Creating $@"; \ + $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \ + fi ) + +install-html-local: + +install-data-local-local: +# Mainly for javasci + @if test -d $(srcdir)/javadoc; then \ + cp -R $(srcdir)/javadoc $(DESTDIR)/$(mydatadir)/; \ + fi +# If the user wants the help sources to be installed +@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \ +@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \ +@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \ +@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \ +@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \ +@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \ +@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \ +@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \ +@INSTALL_HELP_XML_TRUE@ done ; \ +@INSTALL_HELP_XML_TRUE@ fi; \ +@INSTALL_HELP_XML_TRUE@ fi; \ +@INSTALL_HELP_XML_TRUE@ done; \ +@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \ +@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \ +@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \ +@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \ +@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \ +@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \ +@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \ +@INSTALL_HELP_XML_TRUE@ done ; \ +@INSTALL_HELP_XML_TRUE@ fi; \ +@INSTALL_HELP_XML_TRUE@ fi +install-data-local: +# Install the tests + @echo "-------- Install tests (if any) --------"; \ + for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the help chapter + @echo "-------- Install the help chapter (if any) --------"; \ + for lang in $(HELP_CHAPTERLANG); do \ + HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \ + if test -f $$HELPFILE; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \ + echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \ + fi; \ + done +# Install the demos & examples + @echo "-------- Install demos & examples (if any) --------"; \ + for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \ + if test -d $(srcdir)/$$dir/; then \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \ + for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \ + if test -d "$(srcdir)/$$dir/$$file"; then \ + echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \ + $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \ + else \ + echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \ + fi \ + done; \ + fi; \ + done +# Install the macros + @echo "-------- Install macros (if any) --------"; \ + for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \ + $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \ + if test -d $(srcdir)/$$dir/; then \ + FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\ + if test -n "$(MACROSSPECIALEXT)"; then \ + specialExtDir=""; \ + for specialExt in $(MACROSSPECIALEXT); do \ + specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \ + done; \ + FILELIST="$$FILELIST $$specialExtDir"; \ + fi; \ + for file in `ls -1 $$FILELIST 2>/dev/null`; do \ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \ + done; \ + fi; \ + done +# Install java files (.jar) + @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \ + echo "-------- Install jar files --------"; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \ + for file in $(srcdir)/$(JARDIR)$(JARMASK); do\ + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \ + $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \ + done ; \ + fi + +########### CLEAN ################### +# Clean help (generated automatically by Scilab) +# It used to clean the macro (clean-macros) but this was causing +# make clean && make to fail Scilab startup +@NEED_JAVA_TRUE@clean-local: clean-java +@NEED_JAVA_FALSE@clean-local: + +distclean-local: + rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_* + +.PHONY: macros java swig giws + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/modules/randlib/demos/binomial.dem.sce b/modules/randlib/demos/binomial.dem.sce new file mode 100755 index 000000000..02cc3766c --- /dev/null +++ b/modules/randlib/demos/binomial.dem.sce @@ -0,0 +1,71 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function [zt]=BinomialT(n) + + function [y]=Binomial(m,n,pb,nb) + // Binomial law (p,N) + // P{X=n} = C_N^n p^n (1-p)^(N-n) + //---------------------------------- + res = []; + // we use blocks of size 100 to avoid overflows + ntir = 100; + ntirc = ntir; + y = rand(ntir,nb,"uniform"); + indy = find( y < pb); + y = 0*ones(y); + y(indy) = 1; + y = sum(y,"c") + res = [res;y]; + while ( ntirc < m*n ) + y = rand(ntir,nb,"uniform"); + indy = find(y< pb); + y = 0*ones(y); + y(indy) = 1; + y = sum(y,"c") + res = [res;y]; + ntirc = ntirc + ntir; + end + y = matrix(res(1:m*n),m,n); + endfunction + + + [lhs, rhs] = argn(0) + if rhs <= 0 ; n=10000;end + prb = 0.5; + N = 10; + y = Binomial(1, n, prb, N); + i = 0:10; + z = []; + for i1=i, z=[z,prod(size(find(y==i1)))],end + + drawlater(); + + my_handle = scf(100001); + clf(my_handle, "reset"); + demo_viewCode("binomial.dem.sce"); + plot2d3("onn",i',z'/n,[1,3]); + deff("[y]=fact(n)", "y=prod(1:n)"); + deff("[z]=C(N,n)", "z= fact(N)/(fact(n)*fact(N-n))"); + i = 0:N; + zt = []; + for j=i, zt=[zt, C(N,j)*prb^j*(1-prb)^(N-j)];end + plot2d1("onn",i',zt',[-2,6]); + xtitle(_("Simulation of a binomial random variable")); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + legend([_("Simulation");_("Theory")]); + + drawnow(); + +endfunction + +BinomialT(); +clear BinomialT; + diff --git a/modules/randlib/demos/discrete.dem.sce b/modules/randlib/demos/discrete.dem.sce new file mode 100755 index 000000000..0b174c4bc --- /dev/null +++ b/modules/randlib/demos/discrete.dem.sce @@ -0,0 +1,54 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function [z] = RndDiscT(n) + + function [y] = RndDisc(m,n,x,p) + // discrete law random number + // sum p_i delta_{x_i} + //------------------------------- + p1 = [0, p]; + p1 = cumsum(p1); + y = rand(m, n, "uniform"); + N = prod(size(x)); + res = 0*ones(m*n); + for i=1:N,z=0*ones(m*n,1),id=find( p1(i) <= y & y < p1(i+1) ), + z(id) = x(i)*ones(prod(size(id))),res=res+z; + end + y = matrix(res, m, n); + endfunction + + [lhs,rhs] = argn(0) + if rhs <= 0 ; n = 10000;end + x = [1,3,4,6,10,12]; + pr = [0.1,0.2,0.3,0.2,0.1,0.1]; + y = RndDisc(1,n,x,pr); + i = 0:13 + z = []; + for i1=i, z=[z,prod(size(find(y==i1)))],end + + drawlater(); + + my_handle = scf(100001); + clf(my_handle, "reset"); + demo_viewCode("discrete.dem.sce"); + + plot2d3("onn",i',z'/n,[1,3],,,[0,0,14,0.5]); + plot2d1("onn",x',pr',[-2,6]); + xtitle(_("Simulation of a discrete random variable")); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + legend([_("Simulation"); _("Theory")]); + + drawnow(); +endfunction + +RndDiscT(); +clear RndDiscT; + diff --git a/modules/randlib/demos/discrete_uni.dem.sce b/modules/randlib/demos/discrete_uni.dem.sce new file mode 100755 index 000000000..4e1d3f4dc --- /dev/null +++ b/modules/randlib/demos/discrete_uni.dem.sce @@ -0,0 +1,46 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function [z]=RndIntT(n) + + function [y] = RndInt(m,n,imin,imax) + // discrete uniform random number + //------------------------------- + y = rand(m, n, "uniform"); + y = int(floor(y*(imax+1-imin)+ imin )); + endfunction + + [lhs,rhs] = argn(0) + if rhs <= 0 ; n = 10000;end + imin = -10; + imax = 10; + y = RndInt(1,n,-10,10); + i = imin-2:imax+2; + z = []; + for i1=i, z=[z,prod(size(find(y==i1)))],end + + drawlater(); + my_handle = scf(100001); + clf(my_handle,"reset"); + demo_viewCode("discrete_uni.dem.sce"); + plot2d3("onn",i',z'/n,[1,2],,,[-12,0,12,0.1]); + i1=(imin:imax)'; + plot2d1("onn",i1,ones(i1)/prod(size(imin:imax)),[-2,5]); + + xtitle(_("Simulation of a discrete uniform random variable")); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + legend([_("Simulation");_("Theory")]); + drawnow(); + +endfunction + +RndIntT(); +clear RndIntT; + diff --git a/modules/randlib/demos/erlang.dem.sce b/modules/randlib/demos/erlang.dem.sce new file mode 100755 index 000000000..c50dfa71c --- /dev/null +++ b/modules/randlib/demos/erlang.dem.sce @@ -0,0 +1,54 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function [y]=ErlangT(n) + + function [y] = Erlang(m, n, pMean, pVariance) + k = int( (pMean * pMean ) / pVariance + 0.5 ); + if (k <= 0) then k = 1;end + a = k / pMean; + // we use blocks of size 100 to avoid overflows + res = []; + ntir = 100; + ntirc = ntir; + y = rand(ntir, k, "uniform"); + y = -log(prod(y, "r"))/a; + res = [res; y]; + while ( ntirc < m*n ) + y = rand(ntir, k, "uniform"); + y = -log(prod(y, "r"))/a; + res = [res; y]; + ntirc = ntirc + ntir; + end + y = matrix(res(1:m*n), m, n); + endfunction + + [lhs, rhs] = argn(0); + if rhs <= 0 ; n = 10000;end + y = Erlang(1, n, 10, 1); + + drawlater(); + my_handle = scf(100001); + clf(my_handle, "reset"); + demo_viewCode("erlang.dem.sce"); + histplot(20, y, [1,1], "061"); + xtitle(_("Simulation of a Erlang random variable")); + BackgroundColorId = color(232,230,200); + PolylineFillColorId = color(179,179,0); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + current_axe.children.children.fill_mode = "on"; + current_axe.children.children.background = PolylineFillColorId; + current_axe.grid = [-1 PolylineFillColorId]; + drawnow(); +endfunction + +ErlangT(); +clear Erlang; +clear ErlangT; diff --git a/modules/randlib/demos/exp.dem.sce b/modules/randlib/demos/exp.dem.sce new file mode 100755 index 000000000..ec4d5fe4e --- /dev/null +++ b/modules/randlib/demos/exp.dem.sce @@ -0,0 +1,47 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + + +function [] = ExpT(n) + + function [y]=Exp(m,n,lambda) + // lambda exp(-lambda x) x>=0 + // --------------------------- + y=(-1/lambda)* log(rand(m,n,"uniform")); + endfunction + + // lambda exp(-lambda x) x>=0 + // --------------------------- + [lhs,rhs] = argn(0); + if rhs <= 0 ; n = 1000;end + lambda = 3; + y = Exp(1, n, lambda); + drawlater(); + my_handle = scf(100001); + clf(my_handle, "reset"); + demo_viewCode("exp.dem.sce"); + histplot([0:0.1:10],y,[1,1],"051"," ",[0,0,5,3]); + deff("[y]=f(x)","y=lambda*exp(-lambda*x);"); + x=[0:0.1:10]'; + plot2d(x, f(x), 1, "000"); + titre= _("Simulation of an exponential random variable"); + xtitle(titre,_("Classes"),"N(C)/Nmax"); + PolylineFillColorId = color(179,179,0); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + current_axe.children(2).children.fill_mode = "on"; + current_axe.children(2).children.background = PolylineFillColorId; + current_axe.grid = [-1 PolylineFillColorId]; + legend([_("Simulation");_("Theory")]); + drawnow(); +endfunction + +ExpT(); +clear ExpT; + diff --git a/modules/randlib/demos/geometric.dem.sce b/modules/randlib/demos/geometric.dem.sce new file mode 100755 index 000000000..77b22acdf --- /dev/null +++ b/modules/randlib/demos/geometric.dem.sce @@ -0,0 +1,53 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function []=GeomT(n) + + function [y]=Geom(m,n,p) + // P(0)= 0 P(i) = p*(1-p)^{n-1} P(inf)=0 + // E = 1/p ; sig2= (1-p)/p^2 + //-------------------------------------- + if p >= 1 then disp(_("p must be < 1"));end + y = 0*ones(m, n); + for i=1:m*n, + samples = 1; + z = rand(1,1,"uniform"); + while( z < 1-p) ,z=rand(1,1,"uniform"); samples=samples+1;end + y(i) = samples; + end + y = matrix(y, m, n); + endfunction + + [lhs, rhs] = argn(0); + if rhs <= 0 ; n = 10000;end + pr = 0.2; + y = Geom(1, n, pr); + N = 20; + i = 0:N; + z = []; + for i1 = i, z = [z, prod(size(find(y==i1)))], end + + drawlater(); + + my_handle = scf(100001); + clf(my_handle,"reset"); + demo_viewCode("geometric.dem.sce"); + plot2d3("onn", i', z'/n, [1,3]); + zt = [0]; + for i1=1:N; zt=[zt,pr*(1-pr)^(i1-1)];end + plot2d1("onn", i', zt', [-2,6]); + xtitle(_("Simulation of a geometric random variable")); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + legend([_("Simulation");_("Theory")]); + drawnow(); +endfunction + +GeomT(); +clear GeomT; diff --git a/modules/randlib/demos/hypergeom.dem.sce b/modules/randlib/demos/hypergeom.dem.sce new file mode 100755 index 000000000..69c2efac1 --- /dev/null +++ b/modules/randlib/demos/hypergeom.dem.sce @@ -0,0 +1,45 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function [] = HyperGeomT(n) + + function [y] = HyperGeom(m, n, Mean, var) + z = var / (Mean * Mean); + pP = 0.5 * (1.0 - sqrt((z - 1.0) / ( z + 1.0 ))); + y = rand(m, n, "uniform") + zz = find( y > pP) ; + y = pP * ones(y); + y(zz) = (1-pP) * ones(zz); + y1 = rand(m, n, "uniform") + y = -Mean * log(y1) ./ (2.0 * y) ; + endfunction + + [lhs,rhs]=argn(0) + if rhs <= 0 ; n=10000;end + y=HyperGeom(1,n,1,10) + + drawlater(); + my_handle = scf(100001); + clf(my_handle,"reset"); + demo_viewCode("hypergeom.dem.sce"); + histplot([0:0.25:10], y, [1,1], "061", " ", [0,0,10,0.4]); + xtitle(_("Simulation of a hyper geometric random variable")); + BackgroundColorId = color(232,230,200); + PolylineFillColorId = color(179,179,0); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + current_axe.children.children.fill_mode = "on"; + current_axe.children.children.background = PolylineFillColorId; + current_axe.grid = [-1 PolylineFillColorId]; + drawnow(); + +endfunction + +HyperGeomT(); +clear HyperGeomT; diff --git a/modules/randlib/demos/poisson.dem.sce b/modules/randlib/demos/poisson.dem.sce new file mode 100755 index 000000000..bab33da2b --- /dev/null +++ b/modules/randlib/demos/poisson.dem.sce @@ -0,0 +1,57 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function [z]=PoissonT(n) + + function [y]=Poisson(m,n,pmean) + // P{n} = exp(-lambda)lambda^n/n! + // pmean =lambda + //---------------------------- + y=0*ones(m,n) + bound= exp(-pmean); + for i=1:m*n, + count = 0; + lprod = 1; + while( lprod >= bound), lprod = lprod*rand(1,1,"uniform"); + count = count + 1; + end + y(i) = count - 1; + end + y = matrix(y, m, n); + endfunction + + + [lhs, rhs] = argn(0); + if rhs <= 0 ; n = 1000;end + pmean = 3; + y = Poisson(1, n, pmean); + N = 20; + i = 0:N; + z = []; + for i1=i, z=[z,prod(size(find(y==i1)))],end + + drawlater(); + my_handle = scf(100001); + clf(my_handle, "reset"); + demo_viewCode("poisson.dem.sce"); + + plot2d3("onn",i',z'/n,1); + deff("[y]=fact(n)","if n==0 then y=1;else y=n*fact(n-1);end"); + zt=[];for i1=0:N; zt=[zt, exp(-pmean) *pmean^i1/fact(i1)];end + plot2d1("onn",i',zt',[-2,6]); + xtitle(_("Simulation of a Poisson random variable")); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + legend([_("Simulation");_("Theory")]); + drawnow(); + +endfunction + +PoissonT(); +clear PoissonT; diff --git a/modules/randlib/demos/randlib.dem.gateway.sce b/modules/randlib/demos/randlib.dem.gateway.sce new file mode 100755 index 000000000..d4c530555 --- /dev/null +++ b/modules/randlib/demos/randlib.dem.gateway.sce @@ -0,0 +1,27 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +function subdemolist = demo_gateway() + + demopath = get_absolute_file_path("randlib.dem.gateway.sce"); + add_demo(_("Random"), demopath + "randlib.dem.gateway.sce"); + + subdemolist = [_("binomial random variable") ,"binomial.dem.sce" ; .. + _("discrete random variable") ,"discrete.dem.sce" ; .. + _("discrete uniform random variable"),"discrete_uni.dem.sce" ; .. + _("geometric random variable") ,"geometric.dem.sce" ; .. + _("Poisson random variable") ,"poisson.dem.sce" ; .. + _("Exponential random variable") ,"exp.dem.sce" ; .. + _("Weibull random variable") ,"weibull.dem.sce" ; .. + _("Hyper geometric random variable") ,"hypergeom.dem.sce" ; .. + _("Erlang random variable") ,"erlang.dem.sce" ]; + + subdemolist(:,2) = demopath + subdemolist(:,2); + +endfunction + +subdemolist = demo_gateway(); +clear demo_gateway; diff --git a/modules/randlib/demos/weibull.dem.sce b/modules/randlib/demos/weibull.dem.sce new file mode 100755 index 000000000..335881e01 --- /dev/null +++ b/modules/randlib/demos/weibull.dem.sce @@ -0,0 +1,40 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ENPC +// Copyright (C) ????-2008 - INRIA +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +function [] = WeibullT(n) + + function [y] = Weibull(m, n, Alpha, Beta) + //------------------------------- + y = rand(m, n, "uniform"); + y = (Beta*( - log(1-y))).^(1/Alpha); + endfunction + + [lhs, rhs] = argn(0); + if rhs <= 0 ; n = 10000;end + y = Weibull(1, n, 1, 2); + + drawlater(); + my_handle = scf(100001); + clf(my_handle, "reset"); + demo_viewCode("weibull.dem.sce"); + histplot(20, y, [1,1], "061"); + xtitle(_("Simulation of a Weibull random variable")); + BackgroundColorId = color(232,230,200); + PolylineFillColorId = color(179,179,0); + current_axe = gca(); + current_axe.title.font_size = 3; + current_axe.background = color(232,230,200); + current_axe.children.children.fill_mode = "on"; + current_axe.children.children.background = PolylineFillColorId; + current_axe.grid = [-1 PolylineFillColorId]; + drawnow(); + +endfunction + +WeibullT(); +clear WeibullT; diff --git a/modules/randlib/etc/randlib.quit b/modules/randlib/etc/randlib.quit new file mode 100755 index 000000000..ab83f0c89 --- /dev/null +++ b/modules/randlib/etc/randlib.quit @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2007-2008 - INRIA +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + diff --git a/modules/randlib/etc/randlib.start b/modules/randlib/etc/randlib.start new file mode 100755 index 000000000..a9e3a7b50 --- /dev/null +++ b/modules/randlib/etc/randlib.start @@ -0,0 +1,13 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2006-2008 - INRIA +// Copyright (C) 2011 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +//Load functions libraries +// ============================================================================= + load('SCI/modules/randlib/macros/lib'); diff --git a/modules/randlib/help/en_US/addchapter.sce b/modules/randlib/help/en_US/addchapter.sce new file mode 100755 index 000000000..c13a6f204 --- /dev/null +++ b/modules/randlib/help/en_US/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Randlib",SCI+"/modules/randlib/help/en_US",%T); + diff --git a/modules/randlib/help/en_US/grand.xml b/modules/randlib/help/en_US/grand.xml new file mode 100755 index 000000000..d89819938 --- /dev/null +++ b/modules/randlib/help/en_US/grand.xml @@ -0,0 +1,989 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) Jean-Philippe Chancelier and Bruno Pincon + * Copyright (C) 2010-2011 - DIGITEO - Michael Baudin + * Copyright (C) 2013 - Samuel GOUGEON : extension to hypermatrices + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="grand"> + <refnamediv> + <refname>grand</refname> + <refpurpose>Random numbers</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + Y = grand(m, n, "bet", A, B) + Y = grand(m, n, "bin", N, p) + Y = grand(m, n, "nbn", N, p) + Y = grand(m, n, "chi", Df) + Y = grand(m, n, "nch", Df, Xnon) + Y = grand(m, n, "exp", Av) + Y = grand(m, n, "f", Dfn, Dfd) + Y = grand(m, n, "nf", Dfn, Dfd, Xnon) + Y = grand(m, n, "gam", shape, rate) + Y = grand(m, n, "nor", Av, Sd) + Y = grand(m, n, "geom", p) + Y = grand(m, n, "poi", mu) + Y = grand(m, n, "def") + Y = grand(m, n, "unf", Low, High) + Y = grand(m, n, "uin", Low, High) + Y = grand(m, n, "lgi") + + Y = grand(m, n, o,..,"..",...) + Y = grand(X, ...) + + Y = grand(n, "mn", Mean, Cov) + Y = grand(n, "markov", P, x0) + Y = grand(n, "mul", nb, P) + Y = grand(n, "prm", vect) + + S = grand("getgen") + grand("setgen", gen) + + S = grand("getsd") + grand("setsd", S) + + S = grand("phr2sd", phrase) + + grand("setcgn", G) + S = grand("getcgn") + + grand("initgn", I) + + grand("setall", s1, s2, s3, s4) + + grand("advnst", K) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Arguments</title> + <variablelist> + <varlistentry> + <term>m, n, o</term> + <listitem> + <para> + integers, size of the wanted matrix / hypermatrix <varname>Y</varname>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>X</term> + <listitem> + <para> + a matrix or hypermatrix whom only the dimensions (say <varname>m</varname>-by-<varname>n</varname>) + are used. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Y</term> + <listitem> + <para> + depending on the input, a matrix or hypermatrix, with random entries. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>S</term> + <listitem> + <para>output of the action (a string or a real column vector).</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + This function generates random numbers from various + distributions. + </para> + <para> + The calling sequences: + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(m, n, "bet", A, B) + Y = grand(m, n, "bin", N, p) + Y = grand(m, n, "nbn", N, p) + Y = grand(m, n, "chi", Df) + Y = grand(m, n, "nch", Df, Xnon) + Y = grand(m, n, "exp", Av) + Y = grand(m, n, "f", Dfn, Dfd) + Y = grand(m, n, "nf", Dfn, Dfd, Xnon) + Y = grand(m, n, "gam", shape, rate) + Y = grand(m, n, "nor", Av, Sd) + Y = grand(m, n, "geom", p) + Y = grand(m, n, "poi", mu) + Y = grand(m, n, "def") + Y = grand(m, n, "unf", Low, High) + Y = grand(m, n, "uin", Low, High) + Y = grand(m, n, "lgi") + ]]></programlisting> + </para> + <para> + produce a <varname>m</varname>-by-<varname>n</varname> matrix with random entries. + + All these calling sequences can be extended to create a random hypermatrix with more than + 2 dimensions specified as integers listed before the type of statistical distribution: + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(m, n, o, ..., "..", ...) + ]]></programlisting> + </para> + <para> + The sizes of the expected random vector, matrix or hypermatrix can alternatively be specified with + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(X, ...) + ]]></programlisting> + </para> + <para> + where <varname>X</varname> of sizes <varname>m</varname>-by-<varname>n</varname>... + is a matrix or an hypermatrix only used as template. + </para> + <para> + The calling sequences: + </para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(n, "mn", Mean, Cov) + Y = grand(n, "markov", P, x0) + Y = grand(n, "mul", nb, P) + Y = grand(n, "prm", vect) + ]]></programlisting> + <para> + produce a <varname>m</varname>-by-<varname>n</varname> matrix + with random entries, where <varname>m</varname> is the size of the argument <varname>Mean</varname>, + <varname>Cov</varname>, <varname>P</varname> or <varname>vect</varname> depending + on the case (see below for details). + </para> + <para> + The calling sequences: + </para> + <programlisting role="no-scilab-exec"><![CDATA[ + S = grand("getgen") + grand("setgen", gen) + + S = grand("getsd") + grand("setsd", S) + + grand("setcgn", G) + S = grand("getcgn") + + grand("initgn", I) + + grand("setall", s1, s2, s3, s4) + + grand("advnst", K) + ]]></programlisting> + <para> + configure or quiery the state of the underlying random number + generators. + </para> + </refsection> + <refsection> + <title>Getting random numbers from a given distribution</title> + <variablelist> + <varlistentry> + <term>beta</term> + <listitem> + <para> + <code>Y = grand(m, n, "bet", A, B)</code> generates + random variates from the beta distribution with parameters + <varname>A</varname> and <varname>B</varname>. The density + of the beta distribution is <latex><![CDATA[(0 < x < 1)]]></latex>: + </para> + <para> + <latex> + \dfrac{x^{A-1}(1-x)^{B-1}}{\beta(A,B)} + </latex> + </para> + <para> + <varname>A</varname> and <varname>B</varname> must be + reals <latex><![CDATA[>10^{-37}]]></latex>. Related function: <link linkend="cdfbet">cdfbet</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>binomial</term> + <listitem> + <para> + <code>Y = grand(m, n, "bin", N, p)</code> generates random + variates from the binomial distribution with parameters + <varname>N</varname> (positive integer) and <varname>p</varname> + (<literal>real</literal> in <literal>[0,1]</literal>): number of successes in <varname>N</varname> + independent Bernouilli trials with probability <varname>p</varname> + of success. Related functions: <link linkend="binomial">binomial</link>, + <link linkend="cdfbin">cdfbin</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>negative binomial</term> + <listitem> + <para> + <code>Y = grand(m, n, "nbn", N, p)</code> generates random variates from the + negative binomial distribution with parameters <varname>N</varname> (positive integer) and <varname>p</varname> (<literal>real</literal> + in <literal>(0,1)</literal>) : number of failures occurring before <varname>N</varname> successes + in independent Bernoulli trials with probability <varname>p</varname> of success. + Related function: <link linkend="cdfnbn">cdfnbn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>chi-square</term> + <listitem> + <para> + <code>Y = grand(m, n, "chi", Df)</code> generates random + variates from the chi-square distribution with <varname>Df</varname> + (<literal>real</literal> > <literal>0.0</literal>) degrees of freedom. Related function: + <link linkend="cdfchi">cdfchi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>non-central chi-square</term> + <listitem> + <para> + <code>Y = grand(m, n, "nch", Df, Xnonc)</code> generates + random variates from the non-central chisquare + distribution with <varname>Df</varname> degrees of freedom + (<literal>real</literal> >= <literal>1.0</literal>) and noncentrality parameter + <varname>Xnonc</varname> (<literal>real</literal> >= <literal>0.0</literal>). Related + function: <link linkend="cdfchn">cdfchn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>exponential</term> + <listitem> + <para> + <code>Y = grand(m, n, "exp", Av)</code> generates + random variates from the exponential distribution with mean + <varname>Av</varname> (<literal>real</literal> > <literal>0.0</literal>). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>F variance ratio</term> + <listitem> + <para> + <code>Y = grand(m, n, "f", Dfn, Dfd)</code> generates + random variates from the F (variance ratio) distribution + with <varname>Dfn</varname> (<literal>real</literal> > <literal>0.0</literal>) degrees of + freedom in the numerator and <varname>Dfd</varname> (<literal>real</literal> + > <literal>0.0</literal>) degrees of freedom in the denominator. Related + function : <link linkend="cdff">cdff</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>non-central F variance ratio</term> + <listitem> + <para> + <code>Y = grand(m, n, "nf", Dfn, Dfd, Xnonc)</code> + generates random variates from the noncentral F (variance + ratio) distribution with <varname>Dfn</varname> (<literal>real</literal> + >= <literal>1</literal>) degrees of freedom in the numerator, and + <varname>Dfd</varname> (<literal>real</literal> > <literal>0</literal>) degrees of freedom in + the denominator, and noncentrality parameter + <varname>Xnonc</varname> (<literal>real</literal> >= <literal>0</literal>). Related + function : <link linkend="cdffnc">cdffnc</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>gamma</term> + <listitem> + <para> + <code>Y = grand(m, n, "gam", shape, rate)</code> + generates random variates from the gamma distribution with + parameters <varname>shape</varname> (<literal>real</literal> > <literal>0</literal>) and + <varname>rate</varname> (<literal>real</literal> > <literal>0</literal>). The density of the + gamma distribution is : + </para> + <para> + <latex> + \dfrac{ \textrm{rate}^{\textrm{shape}} x^{\textrm{shape}-1} e^{-\textrm{rate} x}}{\gamma(\textrm{shape}) } + </latex> + </para> + <para> + Related functions : <link linkend="gamma">gamma</link>, + <link linkend="cdfgam">cdfgam</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Gauss Laplace (normal)</term> + <listitem> + <para> + <code>Y = grand(m, n, "nor", Av, Sd)</code> generates + random variates from the normal distribution with mean + <varname>Av</varname> (<literal>real</literal>) and standard deviation + <varname>Sd</varname> (<literal>real</literal> >= <literal>0</literal>). Related function + : <link linkend="cdfnor">cdfnor</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>multivariate gaussian (multivariate normal)</term> + <listitem> + <para> + <code>Y = grand(n, "mn", Mean, Cov)</code> + generates multivariate normal random + variates; <varname>Mean</varname> must be a <literal>m x 1</literal> + column vector and <varname>Cov</varname> a <varname>m</varname>-by-<varname>m</varname> + symmetric positive definite matrix (<varname>Y</varname> is then + a <varname>m</varname>-by-<varname>n</varname> matrix). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>geometric</term> + <listitem> + <para> + <code>Y = grand(m, n, "geom", p)</code> generates + random variates from the geometric distribution with + parameter <varname>p</varname> : number of Bernouilli trials + (with probability succes of <varname>p</varname>) until a + succes is met. <varname>p</varname> must be in + <latex>[p_{min},1]</latex> (with <latex> p_{min} = 1{,}3\times 10^{-307} </latex>). + </para> + <para> + <varname>Y</varname> contains positive real numbers + with integer values, whiсh are the "number of trials to get + a success". + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>markov</term> + <listitem> + <para> + <code>Y = grand(n, "markov", P, x0)</code> generate + <varname>n</varname> successive states of a Markov chain + described by the transition matrix + <varname>P</varname>. A sum of each the rows in <varname>P</varname> is <literal>1</literal>. Initial state is given by <varname>x0</varname>. If <varname>x0</varname> is a + matrix of size <code>m=size(x0,"*")</code> then + <varname>Y</varname> is a matrix of size <varname>m</varname>-by-<varname>n</varname>. <code>Y(i,:)</code> code the sample path + obtained from initial state <code>x0(i)</code>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>multinomial</term> + <listitem> + <para> + <code>Y = grand(n, "mul", nb, P)</code> generates + <varname>n</varname> observations from the Multinomial + distribution : class <varname>nb</varname> events in + <literal>m</literal> categories (put <varname>nb</varname> + "balls" in <literal>m</literal> + "boxes"). <literal>P(i)</literal> is the probability that + an event will be classified into category + <literal>i</literal>. The column vector of probabilities <varname>P</varname> is of + size <literal>m-1</literal> (the probability of category + <literal>m</literal> is <literal>1-sum(P)</literal>). + <varname>Y</varname> is of size <literal>m</literal>-by-<varname>n</varname>. + Each column <literal>Y(:,j)</literal> is an observation + from multinomial distribution and + <literal>Y(i,j)</literal> is the number of events falling in + category <literal>i</literal> (for the + <literal>j</literal>-th observation) (<literal>sum(Y(:,j)) = nb</literal>). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Poisson</term> + <listitem> + <para> + <code>Y = grand(m, n, "poi", mu)</code> generates + random variates from the Poisson distribution with mean + <varname>mu</varname> (<literal>real</literal> >= <literal>0.0</literal>). Related function: + <link linkend="cdfpoi">cdfpoi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>random permutations</term> + <listitem> + <para> + <code>Y = grand(n, "prm", vect)</code> generates + <varname>n</varname> random permutations of <varname>vect</varname>. + <varname>vect</varname> can be a column vector of reals, or a vector, matrix or hypermatrix of + complexes, integers, booleans, polynomials or strings; full or sparse. + Due to the stack structure, <varname>vect</varname> should not and cannot be a row vector. + This feature covers Matlab's <code>randperm()</code> function, + because <code>randperm(n)</code> is equivalent to <code>grand(1,'prm',(1:n)')</code> + and <code>randperm(n, k)</code> can be obtained through + <code>grand(1,'prm',(1:n)'); ans(1:k)</code>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniform (def)</term> + <listitem> + <para> + <code>Y = grand(m, n, "def")</code> generates + random variates from the uniform distribution over + <literal>[0,1)</literal> (<literal>1</literal> is never return). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniform (unf)</term> + <listitem> + <para> + <code>Y = grand(m, n, "unf", Low, High)</code> + generates random reals uniformly distributed in + <literal>[Low, High)</literal> (<varname>High</varname> is never return). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniform (uin)</term> + <listitem> + <para> + <code>Y = grand(m, n, "uin", Low, High)</code> + generates random integers uniformly distributed between + <varname>Low</varname> and <varname>High</varname> + (included). <varname>High</varname> and + <varname>Low</varname> must be integers such that + <literal>(High-Low+1) < 2,147,483,561</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniform (lgi)</term> + <listitem> + <para> + <code>Y = grand(m, n, "lgi")</code> returns the + basic output of the current generator : random integers + following a uniform distribution over : + </para> + <itemizedlist> + <listitem> + <para> + <literal>[0, 2^32 - 1]</literal> for mt, kiss and fsultra; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 87]</literal> for clcg2; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 2]</literal> for clcg4; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 1]</literal> for urand. + </para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Set/get the current generator and its state</title> + <para> + The user has the possibility to choose between different base + generators (which give random integers following the "lgi" distribution, the others + being gotten from it). + </para> + <variablelist> + <varlistentry> + <term>mt</term> + <listitem> + <para> + The Mersenne-Twister of M. Matsumoto and T. Nishimura, period about <literal>2^19937</literal>, + state given by an array of <literal>624</literal> integers (plus an index onto this array); this + is the default generator. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>kiss</term> + <listitem> + <para> + The "Keep It Simple Stupid" of G. Marsaglia, period about <literal>2^123</literal>, + state given by four integers. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg2</term> + <listitem> + <para> + A Combined 2 Linear Congruential Generator of P. L'Ecuyer, + period about <literal>2^61</literal>, state given by <literal>2</literal> integers. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg4</term> + <listitem> + <para> + A Combined 4 Linear Congruential Generator of P. L'Ecuyer, + period about <literal>2^121</literal>, state given by 4 integers ; this one is + split in <literal>101</literal> different virtual (non-overlapping) generators + which may be useful for different tasks (see "Options specific to clcg4" and + "Test example for clcg4"). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>fsultra</term> + <listitem> + <para> + A Subtract-with-Borrow generator mixing with a congruential + generator of Arif Zaman and George Marsaglia, period more than <literal>10^356</literal>, + state given by an array of <literal>37</literal> integers (plus an index onto this array, a flag (<literal>0</literal> or <literal>1</literal>) + and another integer). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>urand</term> + <listitem> + <para> + The generator used by the scilab function <link linkend="rand">rand</link>, state + given by <literal>1</literal> integer, period of <literal>2^31</literal>. + This generator is based on "Urand, A Universal Random Number Generator" By, + Michael A. Malcolm, Cleve B. Moler, Stan-Cs-73-334, January 1973, Computer + Science Department, School Of Humanities And Sciences, Stanford University. + This is the faster of this list but its statistical qualities are less + satisfactory than the other generators. + </para> + </listitem> + </varlistentry> + </variablelist> + <para> + The different actions common to all the generators, are: + </para> + <variablelist> + <varlistentry> + <term>action = "getgen"</term> + <listitem> + <para> + <code>S = grand("getgen")</code> returns the current base generator. + In this case <varname>S</varname> is + a string among <literal>"mt"</literal>, <literal>"kiss"</literal>, <literal>"clcg2"</literal>, <literal>"clcg4"</literal>, <literal>"urand"</literal>, <literal>"fsultra"</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "setgen"</term> + <listitem> + <para> + <code>grand("setgen",gen)</code> sets the current base generator to be <varname>gen</varname> + a string among <literal>"mt"</literal>, <literal>"kiss"</literal>, <literal>"clcg2"</literal>, <literal>"clcg4"</literal>, <literal>"urand"</literal>, <literal>"fsultra"</literal>. + Notice that this call returns the new current generator, i.e. <varname>gen</varname>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "getsd"</term> + <listitem> + <para> + <code>S = grand("getsd")</code> gets the current state (the current seeds) of the current base + generator ; <varname>S</varname> is given as a column vector (of integers) of dimension <literal>625</literal> + for mt (the first being an index in <literal>[1,624]</literal>), <literal>4</literal> for kiss, <literal>2</literal> + for clcg2, <literal>40</literal> for fsultra, <literal>4</literal> for clcg4 + (for this last one you get the current state of the current virtual generator) and <literal>1</literal> + for urand. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "setsd"</term> + <listitem> + <para> + <code>grand("setsd", S)</code> and <code>grand("setsd", s1[, s2, s3, s4])</code> set the state of the current + base generator (the new seeds) : + </para> + <variablelist> + <varlistentry> + <term>for mt</term> + <listitem> + <para> + <varname>S</varname> is a vector of integers of dim <literal>625</literal> (the first component is an index + and must be in <literal>[1,624]</literal>, the <literal>624</literal> last ones must be in + <literal>[0,2^32[</literal>) (but must not be all zeros) ; a simpler initialization may be done + with only one integer <varname>s1</varname> (<varname>s1</varname> must be in <literal>[0,2^32[</literal>) ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>for kiss</term> + <listitem> + <para> + four integers <varname>s1</varname>, <varname>s2</varname>, <varname>s3</varname>, <varname>s4</varname> in <literal>[0,2^32[</literal> must be provided ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>for clcg2</term> + <listitem> + <para> + two integers <varname>s1</varname> in <literal>[1,2^31-86]</literal> and <varname>s2</varname> + in <literal>[1,2^31-250]</literal> must be given ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>for clcg4</term> + <listitem> + <para> + four integers <varname>s1</varname> in <literal>[1,2^31-2]</literal>, <varname>s2</varname> + in <literal>[1,2^31-106]</literal>, <varname>s3</varname> in <literal>[1,2^31-226]</literal>, + <varname>s4</varname> in <literal>[1,2^31-326]</literal> are required ; + </para> + <para> + <caution> + CAUTION : with clcg4 you set the seeds of the current virtual + generator but you may lost the synchronization between this one + and the others virtual generators (i.e. the sequence generated + is not warranty to be non-overlapping with a sequence generated + by another virtual generator) => use instead the "setall" option. + </caution> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>for urand</term> + <listitem> + <para> + <literal>1</literal> integer <varname>s1</varname> in <literal>[0,2^31[</literal> must be given. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>for fsultra</term> + <listitem> + <para> + <varname>S</varname> is a vector of integers of dim <literal>40</literal> (the first component + is an index and must be in <literal>[0,37]</literal>, the 2nd component is a flag (0 or 1), the 3rd component is + an integer in <literal>[1,2^32[</literal> and the 37 others integers are in <literal>[0,2^32[</literal>) ; a simpler (and recommended) + initialization may be done with two integers <varname>s1</varname> and <varname>s2</varname> in + <literal>[0,2^32[</literal>. + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "phr2sd"</term> + <listitem> + <para> + <literal>Sd = grand("phr2sd", phrase)</literal> given a <varname>phrase</varname> (character string) generates + a <literal>1 x 2</literal> vector <literal>Sd</literal> which may be used as seeds to change the state of a + base generator (initially suited for clcg2). + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Options specific to clcg4</title> + <para> + The clcg4 generator may be used as the others generators but it offers the advantage + to be split in several (<literal>101</literal>) virtual generators with non-overlapping + sequences (when you use a classic generator you may change the initial state (seeds) + in order to get another sequence but you are not warranty to get a complete different one). + Each virtual generator corresponds to a sequence of <literal>2^72</literal> values which is + further split into <literal>V=2^31</literal> segments (or blocks) of length <literal>W=2^41</literal>. + For a given virtual generator you have the possibility to return at the beginning of the + sequence or at the beginning of the current segment or to go directly at the next segment. + You may also change the initial state (seed) of the generator <literal>0</literal> with the + <literal>"setall"</literal> option which then change also the initial state of the other virtual generators + so as to get synchronization, i.e. in function of the new initial state of gen <literal>0</literal> + the initial state of gen <literal>1..100</literal> are recomputed so as to get <literal>101</literal> + non-overlapping sequences. + </para> + <variablelist> + <varlistentry> + <term>action = "setcgn"</term> + <listitem> + <para> + <literal>grand("setcgn",G)</literal> sets the current virtual generator for clcg4 (when clcg4 + is set, this is the virtual (clcg4) generator number <literal>G</literal> which is used); the virtual clcg4 + generators are numbered from <literal>0,1,...,100</literal> (and so <literal>G</literal> must be an integer + in <literal>[0,100]</literal>) ; by default the current virtual generator is <literal>0</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "getcgn"</term> + <listitem> + <para> + <code>S = grand("getcgn")</code> returns the number of the current virtual clcg4 generator. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "initgn"</term> + <listitem> + <para> + <code>grand("initgn", I)</code> reinitializes the state of the current virtual generator + </para> + <variablelist> + <varlistentry> + <term>I = -1</term> + <listitem> + <para>sets the state to its initial seed</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 0</term> + <listitem> + <para>sets the state to its last (previous) seed (i.e. to the beginning of the current segment)</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 1</term> + <listitem> + <para> + sets the state to a new seed <literal>W</literal> values from its last seed (i.e. to the beginning + of the next segment) and resets the current segment parameters. + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "setall"</term> + <listitem> + <para> + <code>grand("setall", s1, s2, s3, s4)</code> sets the initial state of generator <literal>0</literal> + to <varname>s1</varname>, <varname>s2</varname>, <varname>s3</varname>, <varname>s4</varname>. The initial seeds of the other generators are set accordingly + to have synchronization. For constraints on <varname>s1</varname>, <varname>s2</varname>, <varname>s3</varname>, <varname>s4</varname> see the <literal>"setsd"</literal> action. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "advnst"</term> + <listitem> + <para> + <code>grand("advnst", K)</code> advances the state of the current generator by <literal>2^K</literal> values + and resets the initial seed to that value. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Examples</title> + <para> + In the following example, we generate random numbers from various distributions and + plot the associated histograms. + </para> + <programlisting role="example"><![CDATA[ +// Returns a 400-by-800 matrix of random doubles, +// with normal distribution and average 0 and standard deviation 1. +R = grand(400,800,"nor",0,1); +scf(); +histplot(10,R); +xtitle("Normal random numbers from grand","X","Frequency"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400,800,"nor",0,1); + histplot(10,R); + xtitle("Normal random numbers from grand","X","Frequency"); + </scilab:image> + + <programlisting role="example"><![CDATA[ +// Returns a 400-by-800 matrix of random doubles, +// uniform in [0,1). +R = grand(400,800,"def"); +scf(); +histplot(10,R); +xtitle("Uniform random numbers from grand","X","Frequency"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400,800,"def"); + histplot(10,R); + xtitle("Uniform random numbers from grand","X","Frequency"); + </scilab:image> + + <programlisting role="example"><![CDATA[ +// Returns a 400-by-800 matrix of random doubles, +// with Poisson distribution and average equal to 5. +R = grand(400,800,"poi",5); +scf(); +histplot(10,R); +xtitle("Poisson random numbers from grand","X","Frequency"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400,800,"poi",5); + histplot(10,R); + xtitle("Poisson random numbers from grand","X","Frequency"); + </scilab:image> + + <para> + In the following example, we generate random numbers from the exponential distribution and + then compare the empirical with the theoretical distribution. + </para> + <programlisting role="example"><![CDATA[ +lambda=1.6; +N=100000; +X = grand(1,N,"exp",lambda); +scf(); +classes = linspace(0,12,25); +histplot(classes,X) +x=linspace(0,12,25); +y = (1/lambda)*exp(-(1/lambda)*x); +plot(x,y,"ro-"); +legend(["Empirical" "Theory"]); +xtitle("Exponential random numbers from grand","X","Frequency"); + ]]></programlisting> + <scilab:image localized="true"> + lambda=1.6; + N=100000; + X = grand(1,N,"exp",lambda); + classes = linspace(0,12,25); + histplot(classes,X) + x=linspace(0,12,25); + y = (1/lambda)*exp(-(1/lambda)*x); + plot(x,y,"ro-"); + legend(["Empirical" "Theory"]); + xtitle("Exponential random numbers from grand","X","Frequency"); + </scilab:image> + <para> + In the following example, we generate random numbers from the gamma distribution and + then compare the empirical with the theoretical distribution. + </para> + <programlisting role="example"><![CDATA[ +N=10000; +A=10; +B=4; +R=grand(1,N,"gam",A,B); +XS=gsort(R,"g","i")'; +PS=(1:N)'/N; +P=cdfgam("PQ",XS,A*ones(XS),B*ones(XS)); +scf(); +plot(XS,PS,"b-"); // Empirical distribution +plot(XS,P,"r-"); // Theoretical distribution +legend(["Empirical" "Theory"]); +xtitle("Cumulative distribution function of Gamma random numbers","X","F"); + ]]></programlisting> + <scilab:image localized="true"> + N=10000; + A=10; + B=4; + R=grand(1,N,"gam",A,B); + XS=gsort(R,"g","i")'; + PS=(1:N)'/N; + P=cdfgam("PQ",XS,A*ones(XS),B*ones(XS)); + scf(); + plot(XS,PS,"b-"); // Empirical distribution + plot(XS,P,"r-"); // Theoretical distribution + legend(["Empirical" "Theory"]); + xtitle("Cumulative distribution function of Gamma random numbers","X","F"); + </scilab:image> + <para> + In the following example, we generate 10 random integers in the [1,365] interval. + </para> + <programlisting role="example"><![CDATA[ +grand(10,1,"uin",1,365) + ]]></programlisting> + <para> + In the following example, we generate 12 permutations of the [1,2,...,7] set. + The 12 permutations are stored column-by-column. + </para> + <programlisting role="example"><![CDATA[ +grand(12,"prm",(1:7)') + ]]></programlisting> + <para> + In the following example, we generate a <varname>10</varname>-by-<varname>10</varname>-by-<varname>10</varname> + hypermatrix of random numbers from the "normal" distribution and plot the associated histograms. + Showing the first and last layers. + </para> + <programlisting role="example"><![CDATA[ +// Returns a 10-by-10-by-10 hypermatrix of random doubles, +// with normal distribution, average 0 and standard deviation 1. +// Showing the first and last layers. +R = grand(10,10,10,"nor",0,1); +subplot(1,2,1) +hist3d(R(:,:,1)); +xtitle("Layer 1"); +subplot(1,2,2) +hist3d(R(:,:,10)); +xtitle("Layer 10"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(10,10,10,"nor",0,1); + subplot(1,2,1) + hist3d(R(:,:,1)); + xtitle("Layer 1"); + subplot(1,2,2) + hist3d(R(:,:,10)); + xtitle("Layer 10"); + </scilab:image> + </refsection> + <refsection> + <title>Get predictible or less predictible numbers</title> + <para> + The pseudo random number generators are based on deterministic sequences. + In order to get reproducible simulations, the initial seed of the generator is constant, + such that the sequence will remain the same from a session to the other. + Hence, by default, the first numbers produced by <function>grand</function> are always the same. + </para> + <para> + In some situations, we may want to initialize the seed of the generator in + order to produce less predictable numbers. + In this case, we may initialize the seed with the output of the <function>getdate</function> function: + </para> + <programlisting role="example"><![CDATA[ +n=getdate("s"); +grand("setsd",n) + ]]></programlisting> + </refsection> + <refsection> + <title>Test example for clcg4</title> + <para> + An example of the need of the splitting capabilities of clcg4 is as follows. + Two statistical techniques are being compared on data of different sizes. The first + technique uses bootstrapping and is thought to be as accurate using less data + than the second method which employs only brute force. For the first method, a data + set of size uniformly distributed between 25 and 50 will be generated. Then the data set + of the specified size will be generated and analyzed. The second method will choose a + data set size between 100 and 200, generate the data and analyze it. This process will + be repeated 1000 times. For variance reduction, we want the random numbers used in the + two methods to be the same for each of the 1000 comparisons. But method two will use more + random numbers than method one and without this package, synchronization might be difficult. + With clcg4, it is a snap. Use generator 0 to obtain the sample size for method one and + generator 1 to obtain the data. Then reset the state to the beginning of the current block + and do the same for the second method. This assures that the initial data for method two is + that used by method one. When both have concluded, advance the block for both generators. + </para> + </refsection> + <refsection role="see also"> + <title>See Also</title> + <simplelist type="inline"> + <member> + <link linkend="rand">rand</link> + </member> + <member> + <link linkend="sprand">sprand</link> + </member> + <member> + <link linkend="ssrand">ssrand</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/randlib/help/fr_FR/addchapter.sce b/modules/randlib/help/fr_FR/addchapter.sce new file mode 100755 index 000000000..890bfbc2f --- /dev/null +++ b/modules/randlib/help/fr_FR/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Randlib",SCI+"/modules/randlib/help/fr_FR",%T); + diff --git a/modules/randlib/help/fr_FR/grand.xml b/modules/randlib/help/fr_FR/grand.xml new file mode 100755 index 000000000..9444f5f55 --- /dev/null +++ b/modules/randlib/help/fr_FR/grand.xml @@ -0,0 +1,971 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) Jean-Philippe Chancelier and Bruno Pincon + * Copyright (C) 2011 - DIGITEO - Michael Baudin + * Copyright (C) 2013 - Samuel GOUGEON : extension aux hypermatrices + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="grand"> + <refnamediv> + <refname>grand</refname> + <refpurpose>Générateur de nombres pseudo-aléatoires</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Séquence d'appel</title> + <synopsis> + Y = grand(m, n, "bet", A, B) + Y = grand(m, n, "bin", N, p) + Y = grand(m, n, "nbn", N, p) + Y = grand(m, n, "chi", Df) + Y = grand(m, n, "nch", Df, Xnon) + Y = grand(m, n, "exp", Av) + Y = grand(m, n, "f", Dfn, Dfd) + Y = grand(m, n, "nf", Dfn, Dfd, Xnon) + Y = grand(m, n, "gam", shape, rate) + Y = grand(m, n, "nor", Av, Sd) + Y = grand(m, n, "geom", p) + Y = grand(m, n, "poi", mu) + Y = grand(m, n, "def") + Y = grand(m, n, "unf", Low, High) + Y = grand(m, n, "uin", Low, High) + Y = grand(m, n, "lgi") + + Y = grand(m, n, o,..,"..",...) + Y = grand(X,...) + + Y = grand(n, "mn", Mean, Cov) + Y = grand(n, "markov", P, x0) + Y = grand(n, "mul", nb, P) + Y = grand(n, "prm", vect) + + S = grand("getgen") + grand("setgen", gen) + + S = grand("phr2sd", phrase) + + S = grand("getsd") + grand("setsd", S) + + grand("setcgn", G) + S = grand("getcgn") + + grand("initgn", I) + + grand("setall", s1, s2, s3, s4) + + grand("advnst", K) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Paramètres</title> + <variablelist> + <varlistentry> + <term>m, n, o</term> + <listitem> + <para> + entiers, dimensions de la matrice de nombres aléatoires à obtenir <literal>Y</literal> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>X </term> + <listitem> + <para> + un vecteur, une matrice ou une hypermatrice dont seules les dimensions (<literal>m</literal> x <literal>n</literal> x ...) sont utilisées + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Y</term> + <listitem> + <para> + Vecteur, matrice ou hypermatrice des nombres aléatoires générés, de taille <literal>m</literal> x <literal>n</literal> x ... (encodage décimal) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>S</term> + <listitem> + <para> + résultat de l'action (une chaîne ou un vecteur colonne) + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Description</title> + <para> + Cette fonction produit des nombres aléatoires selon différentes distributions. + </para> + <para> + Les séquences d'appel : + </para> + <screen> + Y = grand(m, n, "bet", A, B) + Y = grand(m, n, "bin", N, p) + Y = grand(m, n, "nbn", N, p) + Y = grand(m, n, "chi", Df) + Y = grand(m, n, "nch", Df, Xnon) + Y = grand(m, n, "exp", Av) + Y = grand(m, n, "f", Dfn, Dfd) + Y = grand(m, n, "nf", Dfn, Dfd, Xnon) + Y = grand(m, n, "gam", shape, rate) + Y = grand(m, n, "nor", Av, Sd) + Y = grand(m, n, "geom", p) + Y = grand(m, n, "poi", mu) + Y = grand(m, n, "def") + Y = grand(m, n, "unf", Low, High) + Y = grand(m, n, "uin", Low, High) + Y = grand(m, n, "lgi") + </screen> + <para> + produisent une matrice de taille <literal>m</literal>-par-<literal>n</literal> de nombres aléatoires. + + Toutes ces séquences peuvent être étendues pour créer une hypermatrice à plus de 2 dimensions, les + tailles (m, n, o,...) étant spécifiées avant le mot ".." indiquant le type de distribution statistique + souhaitée : + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(m, n, o, ..., "..", ...) + ]]></programlisting> + </para> + <para> + Le format du vecteur ou matrice ou hypermatrice aléatoire attendue peut également être spécifié par + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(X, ...) + ]]></programlisting> + </para> + <para> + où <literal>X</literal> de taille <literal>m</literal>-par-<literal>n</literal>... est une matrice + ou une hypermatrice dont seul le format est exploité et sert de modèle. + </para> + <para> + Les séquences d'appel : + </para> + <screen> + Y = grand(n, "mn", Mean, Cov) + Y = grand(n, "markov", P, x0) + Y = grand(n, "mul", nb, P) + Y = grand(n, "prm", vect) + </screen> + <para> + produisent une matrice de taille <literal>m</literal>-par-<literal>n</literal> + avec des entrées aléatoires. + </para> + <para> + Les séquences d'appel : + </para> + <screen> + S = grand("getgen") + grand("setgen", gen) + + S = grand("getsd") + grand("setsd", S) + + S = grand("phr2sd", phrase) + + grand("setcgn", G) + S = grand("getcgn") + + grand("initgn", I) + + grand("setall", s1, s2, s3, s4) + + grand("advnst", K) + </screen> + <para> + configurent ou interrogent les générateurs aléatoires. + </para> + </refsection> + <refsection> + <title>Générer des nombres aléatoires selon une loi donnée</title> + <variablelist> + <varlistentry> + <term>beta</term> + <listitem> + <para> + <literal>Y = grand(m, n, "bet", A, B)</literal> génère des nombres aléatoires suivant + la loi beta de paramètres <literal>A</literal> and <literal>B</literal>. + La densité de cette loi est <latex><![CDATA[(0 < x < 1)]]></latex> : + </para> + <para> + <latex> + \dfrac{x^{A-1}(1-x)^{B-1}}{\beta(A,B)} + </latex> + </para> + <para> + <literal>A</literal> et <literal>B</literal> devant être des réels <latex><![CDATA[>10^{-37}]]></latex>. + Fonction(s) associée(s) : <link linkend="cdfbet">cdfbet</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>binomiale</term> + <listitem> + <para> + <literal>Y = grand(m, n, "bin", N, p)</literal> génère des nombres aléatoires suivant la loi + binomiale de paramètres <literal>N</literal> (entier str. positif) et <literal>p</literal> + (réel de [0,1]) : nombre de succès au cours de <literal>N</literal> épreuves de Bernouilli + de probabilité de succès <literal>p</literal>. + Fonctions associées : <link linkend="binomial">binomial</link>, <link linkend="cdfbin">cdfbin</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>binomiale négative</term> + <listitem> + <para> + <literal>Y = grand(m, n, "nbn", N, p)</literal> génère des nombres aléatoires suivant la loi binomiale + négative de paramètres <literal>N</literal> (entier str. positif) et <literal>p</literal> (réel + de ]0,1[) : nombre d'échecs avant d'obtenir <literal>N</literal> succès dans des épreuves + de Bernouilli de probabilité de succès <literal>p</literal>. + Fonction associée : <link linkend="cdfnbn">cdfnbn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>chi 2</term> + <listitem> + <para> + <literal>Y = grand(m, n, "chi", Df)</literal> génère des nombres aléatoires suivant la loi du chi 2 + à <literal>Df</literal> (réel > 0.0) degrés de liberté. + Fonction associée : <link linkend="cdfchi">cdfchi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>chi 2 non centrée</term> + <listitem> + <para> + <literal>Y = grand(m, n, "nch", Df, Xnon)</literal> génère des nombres aléatoires suivant la loi du chi 2 + non centrée à <literal>Df</literal> degrés de liberté (réel >= 1.0) + le paramètre de décentrage étant <literal>Xnonc</literal> (réel >= 0.0). + Fonction associée : <link linkend="cdfchn">cdfchn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>exponentielle</term> + <listitem> + <para> + <literal>Y = grand(m, n, "exp", Av)</literal> génère des nombres aléatoires suivant la loi exponentielle + de moyenne <literal>Av</literal> (réel >= 0.0). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>F variance ratio</term> + <listitem> + <para> + <literal>Y = grand(m, n, "f", Dfn, Dfd)</literal> génère des nombres aléatoires suivant la loi F + (variance ratio) à <literal>Dfn</literal> (réel > 0.0) degrés de liberté au numérateur et + <literal>Dfd</literal> (réel > 0.0) degrés de liberté au dénominateur. + Fonction associée : <link linkend="cdff">cdff</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>non central F variance ratio</term> + <listitem> + <para> + <literal>Y = grand(m, n, "nf", Dfn, Dfd, Xnon)</literal> génère des nombres aléatoires suivant la loi + F (variance ratio) non centrée à <literal>Dfn</literal> (réel >= 1) degrés de liberté + au numérateur, et <literal>Dfd</literal> (réel > 0) degrés de liberté au dénominateur, + <literal>Xnonc</literal> (réel >= 0) étant le paramètre de décentrage. + Fonction associée : <link linkend="cdffnc">cdffnc</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>gamma</term> + <listitem> + <para> + <literal>Y = grand(m, n, "gam", shape, rate)</literal> génère des nombres aléatoires suivant la loi + gamma de paramètres <literal>shape</literal> (réel > 0) et <literal>scale</literal> + (réel > 0). La densité est : + </para> + <para> + <latex> + \dfrac{ \textrm{rate}^{\textrm{shape}} x^{\textrm{shape}-1} e^{-\textrm{rate} x}}{\gamma(\textrm{shape}) } + </latex> + </para> + <para> + Fonctions associées : <link linkend="gamma">gamma</link>, <link linkend="cdfgam">cdfgam</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Gauss Laplace (normale)</term> + <listitem> + <para> + <literal>Y = grand(m, n, "nor", Av, Sd)</literal> génère des nombres aléatoires suivant la loi normale + de moyenne <literal>Av</literal> (réel) et d'écart type <literal>Sd</literal> + (réel >= 0). + Fonctions associées : <link linkend="cdfnor">cdfnor</link>, <link linkend="erf">erf</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>multi normale</term> + <listitem> + <para> + <literal>Y = grand(n, "mn", Mean, Cov)</literal> génère <literal>n</literal> réalisations indépendantes de la + loi multi-normale ; <literal>Mean</literal> doit être un vecteur <literal>m</literal>-par-<literal>1</literal> et <literal>Cov</literal> + une matrice <literal>m</literal>-par-<literal>m</literal> symétrique et définie positive, (<literal>Y</literal> est alors une + matrice <literal>m</literal>-par-<literal>n</literal>). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>geometrique</term> + <listitem> + <para> + <literal>Y = grand(m, n, "geom", p)</literal> + génère des nombres aléatoires suivant la loi + geométrique de paramètre <literal>p</literal> : nombre + d'épreuves de Bernouilli (de probabilité de succès + <literal>p</literal>) jusqu'à obtenir un succès + (<literal>p</literal> doit appartenir à l'intervalle + <latex>[p_{min},1]</latex> (avec <latex> p_{min} = 1{,}3\times 10^{-307} </latex>). + </para> + <para> + <literal>Y</literal> contient des nombres réels + positifs à valeur entière qui sont "le nombre de + tentatives nécessaire pour obtenir un succès" pour + chaque tirage. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>markov</term> + <listitem> + <para> + <literal>Y = grand(n, "markov", P, x0)</literal> génère <literal>n</literal> états successifs d'une chaîne + Markov décrite par la matrice de transition <literal>P</literal>. L'état initial est donné par + <literal>x0</literal>. Si <literal>x0</literal> est une matrice de taille + <literal>m = size(x0, "*")</literal> + alors <literal>Y</literal> est une matrice de taille <literal>m x n</literal>. <literal>Y(i,:)</literal> étant le + chemin à partir de l'état initial <literal>x0(i)</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>multinomiale</term> + <listitem> + <para> + <literal>Y = grand(n, "mul", nb, P)</literal> génère <literal>n</literal> réalisations indépendantes de la loi + Multinomiale : classer <literal>nb</literal> éventualités dans <literal>m</literal> catégories (mettre + <literal>nb</literal> "boules" dans <literal>m</literal> "boites"). <literal>P(i)</literal> + étant la probabilité qu'une éventualité soit de categorie i. <literal>P</literal> le vecteur des + probabilités est de taille <literal>m-1</literal> (la probabilté de la catégorie <literal>m</literal> + étant <literal>1-sum(P)</literal>). <literal>Y</literal> est alors de dimensions <literal>m x n</literal>, + chaque colonne <literal>Y(:,j)</literal> étant une réalisation de cette loi : <literal>Y(i,j)</literal> + est le nombre d'éventualités classées en catégorie <literal>i</literal> pour la <literal>j</literal> ème + réalisation (<literal>sum(Y(:,j)) = nb</literal>). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Poisson</term> + <listitem> + <para> + <literal>Y = grand(m, n, "poi", mu)</literal> génère des nombres aléatoires suivant la loi de Poisson + de moyenne <literal>mu</literal> (réel >= 0.0). + Fonction associée : <link linkend="cdfpoi">cdfpoi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>permutations aléatoires</term> + <listitem> + <para> + <literal>Y = grand(n, "prm", vect)</literal> génère <literal>n</literal> permutations aléatoire du + vecteur colonne (<literal>m x 1</literal>) <literal>vect</literal>. + <varname>vect</varname> peut être un scalaire, vecteur, matrices ou hypermatrice de réels, + complexes, entiers, booléens, polynômes ou chaînes de caractères; plein ou creux. + A cause de la structure de la pile, <varname>vect</varname> ne doit pas et ne peut pas être un vecteur ligne. + Cette fonctionnalité couvre la fonction Matlab <code>randperm()</code>, + car <code>randperm(n)</code> est équivalent à <code>grand(1,'prm',(1:n)')</code> + et <code>randperm(n, k)</code> s'obtient grâce à + <code>grand(1,'prm',(1:n)'); ans(1:k)</code>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniforme (def)</term> + <listitem> + <para> + <literal>Y = grand(m, n, "def")</literal> génère des nombres aléatoires suivant la loi uniforme + sur <literal>[0,1[</literal> (1 n'est jamais retourné). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniforme (unf)</term> + <listitem> + <para> + <literal>Y = grand(m, n, "unf", Low, High)</literal> génère des nombres aléatoires suivant la loi + uniforme sur <literal>[Low, High[</literal> (<literal>High</literal> is never return). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniforme (uin)</term> + <listitem> + <para> + <literal>Y = grand(m, n, "uin", Low, High)</literal> génère des entiers aléatoires suivant la loi uniforme + sur <literal>[Low, High]</literal>. <literal>High</literal> + et <literal>Low</literal> doivent être des entiers tels que <literal> + (High-Low+1) + < 2147483561 + </literal> + . + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>uniforme (lgi)</term> + <listitem> + <para> + <literal>Y = grand(m, n, "lgi")</literal> retourne la sortie du générateur de base courant : des entiers + aléatoires suivant une loi uniforme sur : + </para> + <itemizedlist> + <listitem> + <para> + <literal>[0, 2^32 - 1]</literal> for mt, kiss and fsultra; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2147483561]</literal> for clcg2; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 2]</literal> for clcg4; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 1]</literal> for urand. + </para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Actions sur le(s) générateur(s) de base</title> + <para> + Depuis Scilab-2.7 vous avez la possibilité de choisir parmi plusieurs générateurs de base + (donnant des entiers aléatoires suivant la loi "lgi") : + </para> + <variablelist> + <varlistentry> + <term>mt</term> + <listitem> + <para> + Le Mersenne-Twister de M. Matsumoto and T. Nishimura, période d'environ <literal>2^19937</literal>, + état interne donné par <literal>624</literal> entiers (plus un index); c'est le générateur + par défaut. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>kiss</term> + <listitem> + <para> + Le Keep It Simple Stupid de G. Marsaglia, période d'environ <literal>2^123</literal>, + état interne donné par <literal>4</literal> entiers. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg2</term> + <listitem> + <para> + Une combinaison de 2 générateurs linéaires congruentiels de P. L'Ecuyer, + période d'environ <literal>2^61</literal>, état interne donné par <literal>2</literal> entiers ; + c'était le seul générateur de base utilisé auparavent par grand (cette + version est cependant légèrement différente de l'ancienne). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg4</term> + <listitem> + <para> + Une combinaison de 4 générateurs linéaires congruentiels de P. L'Ecuyer, + période d'environ <literal>2^121</literal>, état interne donné par 4 entiers ; ce générateur + peut être partagé en <literal>101</literal> générateur virtuels (en fait la suite de + longueur <literal>2^121</literal> peut être découpée en <literal>101</literal> sous-suites) ce qui peut + être utile dans certains cas (voir 'Actions specifiques à clcg4' et + 'Exemple d'utilisation de clcg4'). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>fsultra</term> + <listitem> + <para> + Un générateur SWB (subtract-with-borrow) mixé avec un générator congruentiel + concu par Arif Zaman et George Marsaglia. Sa période est supérieure à <literal>10^356</literal>, + et son état interne est constitué d'un tableau de 37 entiers, d'un index sur + ce tableau et d'un drapeau (0 ou 1) ainsi qu'un autre entier donnant l'état interne + du générateur congruentiel. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>urand</term> + <listitem> + <para> + Le générateur de base utilisé par la fonction + <link linkend="rand">rand</link>, état interne constitué d'un entier, période de + <literal>2^31</literal>. + Ce generateur est fondé sur "Urand, A Universal Random Number Generator" By, + Michael A. Malcolm, Cleve B. Moler, Stan-Cs-73-334, January 1973, Computer + Science Department, School Of Humanities And Sciences, Stanford University. + C'est le plus rapide de cette liste, mais ses qualités statistiques + sont inférieures aux autres générateurs. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Actions</title> + <variablelist> + <varlistentry> + <term>action = "getgen"</term> + <listitem> + <para> + <literal>S = grand("getgen")</literal> retourne le nom du générateur de base actuel (<literal>S</literal> est + l'une des chaînes de caractères "mt", "kiss", "clcg2", "clcg4", "urand", "fsultra"). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "setgen"</term> + <listitem> + <para> + <literal>grand("setgen", gen)</literal> permet de changer le générateur de base : <literal>gen</literal> + doit être l'une des chaînes de caractères "mt", "kiss", "clcg2", "clcg4", "urand", "fsultra". + En cas de succès la fonction retourne cette même chaîne. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "getsd"</term> + <listitem> + <para> + <literal>S = grand("getsd")</literal> retourne l'état interne actuel (les 'germes' dans l'ancienne + appelation quoique ce terme désigne plutôt l'état initial) du générateur de base courant ; + <literal>S</literal> est un vecteur colonne (d'entiers) de dimension <literal>625</literal> + pour mt (la première composante étant un 'index' sur l'état, c-a-d un entier de l'intervalle + <literal>[1,624]</literal>), <literal>4</literal> + pour kiss, <literal>2</literal> pour clcg2 , <literal>40</literal>pour fsultra, <literal>4</literal> pour clcg4 + (pour ce dernier vous obtenez l'état interne du générateur virtuel courant), et <literal>1</literal> + pour urand. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "setsd"</term> + <listitem> + <para> + <literal>grand("setsd", S), grand("setsd", s1[, s2, s3, s4])</literal> impose l'état interne du générateur de + base courant : + </para> + <variablelist> + <varlistentry> + <term>pour mt</term> + <listitem> + <para> + <literal>S</literal> est un vecteur d'entiers de dimension <literal>625</literal> (la première composante + étant un index sur <literal>[1,624]</literal>), les <literal>624</literal> dernières composantes doivent + être dans <literal>[0,2^32[</literal>) (mais ne doivent pas être toutes nulles) ; une initialisation + plus simple est possible (et recommandée) en donnant un seul entier <literal>s1</literal> (<literal>s1</literal> appartenant + à <literal>[0,2^32[</literal>) ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>pour kiss</term> + <listitem> + <para> + <literal>4</literal> entiers <literal>s1, s2, s3, s4</literal> dans <literal>[0,2^32[</literal> doivent être + fournis ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>pour clcg2</term> + <listitem> + <para> + <literal>2</literal> entiers <literal>s1</literal> dans <literal>[1, 2147483562]</literal> et <literal>s2</literal> + dans <literal>[1, 2147483398]</literal> doivent être fournis ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>pour clcg4</term> + <listitem> + <para> + <literal>4</literal> entiers <literal>s1</literal> dans <literal>[1, 2147483646]</literal>, <literal>s2</literal> + dans <literal>[1, 2147483542]</literal>, <literal>s3</literal> dans <literal>[1, 2147483422]</literal>, + <literal>s4</literal> dans <literal>[1, 2147483322]</literal> sont requis ; + <literal>ATTENTION</literal> : avec clcg4 vous positionnez l'état interne du générateur virtuel + courant mais vous perdez alors la synchronisation avec les autres générateurs virtuels. + (=> si vous utilisez clcg4 avec différents générateurs virtuels, il faut utiliser + l'option "setall" qui permet de changer l'état interne (du générateur numéro 0) tout en + recalculant l'état initial des 100 autres générateurs virtuels). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>pour urand</term> + <listitem> + <para> + <literal>1</literal> entier <literal>s1</literal> appartenant à + <literal>[0, 2^31[</literal> est requis. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>for fsultra</term> + <listitem> + <para> + <literal>S</literal> est un vecteur de <literal>40</literal> entiers (son premier élément doit être dans + l'intervalle<literal>[0, 37]</literal>, son deuxième (drapeau) doit être 0 ou 1, le troisième un + entier de <literal>[1, 2^32[</literal> et les 37 composantes suivantes, des entiers de <literal>[0, 2^32[</literal>) ; il est recommandé + d'utiliser l'autre procédure d'initialisation (plus simple) avec deux entiers <literal>s1</literal> et + <literal>s2</literal> de <literal>[0, 2^32[</literal>. + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "phr2sd"</term> + <listitem> + <para> + <literal>Sd = grand("phr2sd", phrase)</literal> étant donnée une chaîne de caractères <literal>phrase</literal> + cet appel retourne un vecteur <literal>1 x 2</literal> qui peut être utilisé comme + état interne pour un générateur de base (initialement adapté pour clcg2). + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Options specifiques à clcg4</title> + <para> + Le générateur clcg4 peut être utilisé comme les autres mais il offre l'avantage de pouvoir être + découpé en (<literal>101</literal>) générateurs virtuels différents, c-a-d avec des séquences sans + intersection (quand vous utilisez un générateur classique vous pouvez changer l'état initial + de façon à obtenir une autre séquence mais vous n'êtes pas complètement sûr d'obtenir une + séquence complètement différente). Chaque générateur virtuel correspond à une séquence de + longueur <literal>2^72</literal> qui est de plus découpée en <literal>V = 2^31</literal> segments de longueur + <literal>W = 2^41</literal>. Pour un générateur virtuel donné vous pouvez retourner au début de la séquence + ou au début du segment ou bien au début du segment suivant. + Vous pouvez aussi changer l'état initial du générateur <literal>0</literal> avec l'option + "setall" qui recalcule l'état initial des autres générateurs virtuels de sorte à obtenir + la synchronisation entre les générateurs (c-a-d qu'en fonction du nouvel état initial du générateur + <literal>0</literal> l'état initial des générateurs <literal>1..100</literal> sont recalculés de façon à + obtenir <literal>101</literal> séquences qui ne s'intersectent pas). + </para> + <variablelist> + <varlistentry> + <term>action = "setcgn"</term> + <listitem> + <para> + <literal>grand("setcgn", G)</literal> sélectionne le générateur virtuel numéro <literal>G</literal> : + lorsque le générateur de base courant est clcg4, c'est le générateur virtuel <literal>G</literal> + qui sera alors utilisé ; les <literal>101</literal> générateurs virtuels sont numérotés + <literal>0,1,...,100</literal> (ainsi <literal>G</literal> doit être un entier de l'intervalle + <literal>[0, 100]</literal>) ; par défaut le générateur virtuel courant est celui de numéro + <literal>0</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "getcgn"</term> + <listitem> + <para> + <literal>S = grand("getcgn")</literal> retourne le numéro du générateur + virtuel courant. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "initgn"</term> + <listitem> + <para> + <literal>grand("initgn", I)</literal> réinitialise l'état du générateur virtuel courant : + </para> + <variablelist> + <varlistentry> + <term>I = -1</term> + <listitem> + <para>remet l'état à sa valeur initiale</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 0</term> + <listitem> + <para>remet l'état au début du segment courant</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 1</term> + <listitem> + <para> + positionne l'état au début du segment suivant et met à jour les valeurs définissant + le segment courant (vous ne pouvez pas revenir au début du segment précédent). + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "setall"</term> + <listitem> + <para> + <literal>grand("setall", s1, s2, s3, s4)</literal> impose l'état interne du générateur virtuel + de numéro <literal>0</literal> à <literal>s1, s2, s3, s4</literal>. L'état initial des autres générateurs est + alors reconstruit (de façon à obtenir 101 séquences qui ne s'intersectent pas). Voir + l'action "setsd" pour les contraintes sur <literal>s1, s2, s3, s4</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action = "advnst"</term> + <listitem> + <para> + <literal>grand("advnst", K)</literal> avance l'état du générateur virtuel courant de <literal>2^K</literal> + valeurs et réinitialise l'état initial (du générateur virtuel courant) à + ce nouvel état. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Exemples</title> + <para> + Dans l'exemple suivant, nous produisons des nombres aléatoires + associés à différentes lois de distribution et dessinons les histogrammes + associés. + </para> + <programlisting role="example"><![CDATA[ +// Renvoie une matrice de taille 400-par-800 de doubles aléatoires, +// avec une distribution normale de moyenne 0 et d'écart-type 1. +R = grand(400, 800, "nor", 0, 1); +scf(); +histplot(10, R); +xtitle("Nombres aléatoires (loi normale) par grand", "X", "Fréquence"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400, 800, "nor", 0, 1); + histplot(10, R); + xtitle("Nombres aléatoires (loi normale) par grand", "X", "Fréquence"); + </scilab:image> + <programlisting role="example"><![CDATA[ +// Renvoie une matrice de taille 400-par-800 de doubles aléatoires, +// uniformes dans [0, 1). +R = grand(400, 800, "def"); +scf(); +histplot(10, R); +xtitle("Nombres aléatoires uniformes par grand", "X", "Fréquence"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400, 800, "def"); + histplot(10, R); + xtitle("Nombres aléatoires uniformes par grand", "X", "Fréquence"); + </scilab:image> + <programlisting role="example"><![CDATA[ +// Renvoie une matrice de taille 400-par-800 de doubles aléatoires, +// avec une distribution de Poisson de moyenne 5. +R = grand(400, 800, "poi", 5); +scf(); +histplot(10, R); +xtitle("Nombres aléatoires (loi de Poisson) par grand", "X", "Fréquence"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400, 800, "poi", 5); + histplot(10, R); + xtitle("Nombres aléatoires (loi de Poisson) par grand", "X", "Fréquence"); + </scilab:image> + <para> + Dans l'exemple suivant, nous produisons des nombres aléatoires + suivant la loi exponentielle et comparons ensuite la distribution empirique + et la fonction de distribution théorique. + </para> + <programlisting role="example"><![CDATA[ +lambda = 1.6; +N = 100000; +X = grand(1, N, "exp", lambda); +scf(); +classes = linspace(0, 12, 25); +histplot(classes, X) +x = linspace(0, 12, 25); +y = (1/lambda)*exp(-(1/lambda)*x); +plot(x, y, "ro-"); +legend(["Empirique" "Theorique"]); +xtitle("Loi exponentielle par grand", "X", "Fréquence"); + ]]></programlisting> + <scilab:image localized="true"> + lambda = 1.6; + N = 100000; + X = grand(1, N, "exp", lambda); + classes = linspace(0, 12, 25); + histplot(classes, X) + x = linspace(0, 12, 25); + y = (1/lambda)*exp(-(1/lambda)*x); + plot(x, y, "ro-"); + legend(["Empirique" "Theorique"]); + xtitle("Loi exponentielle par grand", "X", "Fréquence"); + </scilab:image> + <para> + Dans l'exemple suivant, nous générons des nombres aléatoires selon la distribution + gamma et comparons la distribution empirique et la loi de distribution théorique. + </para> + <programlisting role="example"><![CDATA[ +N = 10000; +A = 10; +B = 4; +R = grand(1, N, "gam", A, B); +XS = gsort(R, "g", "i")'; +PS = (1:N)'/N; +P = cdfgam("PQ", XS, A*ones(XS), B*ones(XS)); +scf(); +plot(XS, PS, "b-"); // Empirical distribution +plot(XS, P, "r-"); // Theoretical distribution +legend(["Empirique" "Théorique"]); +xtitle("Fonction de distribution cumulée de nombres aléatoires selon la loi Gamma", "X", "F"); + ]]></programlisting> + <scilab:image localized="true"> + N = 10000; + A = 10; + B = 4; + R = grand(1, N, "gam", A, B); + XS = gsort(R, "g", "i")'; + PS = (1:N)'/N; + P = cdfgam("PQ", XS, A*ones(XS), B*ones(XS)); + plot(XS, PS, "b-"); + plot(XS, P, "r-"); + legend(["Empirique" "Théorique"]); + xtitle("Fonction de distribution cumulée de nombres aléatoires selon la loi Gamma", "X", "F"); + </scilab:image> + <para> + Dans l'exemple suivant, nous générons 10 entiers aléatoires dans l'intervalle [1, 365]. + </para> + <programlisting role="example"><![CDATA[ +grand(10, 1, "uin", 1, 365) + ]]></programlisting> + <para> + Dans l'exemple suivant, nous générons 12 permutations de l'ensemble [1,2,...,7]. + Les 12 permutations sont stockées colonne par colonne. + </para> + <programlisting role="example"><![CDATA[ +grand(12, "prm", (1:7)') + ]]></programlisting> + <para> + L'exemple suivant génère une hypermatrice <varname>10</varname>-par-<varname>10</varname>-par-<varname>10</varname> + de nombre aléatoires provenant de la distribution "normale" et affiche les histogrammes associés. + Le graphes montrent les première et dernière couches de la matrice. + </para> + <programlisting role="example"><![CDATA[ +// Retounrne une hypermatrice 400-par-800-par-10 de nombre aléatoires, +// avec la distribution normale, une moyenne de 0 et un écart-type de 1. +// Affichage de la première et dernière couches. +R = grand(10,10,10,"nor",0,1); +subplot(1,2,1) +hist3d(R(:,:,1)); +xtitle("Couche 1"); +subplot(1,2,2) +hist3d(R(:,:,10)); +xtitle("Couche 10"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(10,10,10,"nor",0,1); + subplot(1,2,1) + hist3d(R(:,:,1)); + xtitle("Couche 1"); + subplot(1,2,2) + hist3d(R(:,:,10)); + xtitle("Couche 10"); + </scilab:image> + </refsection> + <refsection> + <title>Produire des nombres prévisibles ou moins prévisibles</title> + <para> + Les générateurs pseudo aléatoires sont fondés sur des séquences déterministes. + Pour produire des simulations reproductibles, la graine du générateur est constante, + de telle sorte que la séquence est la même d'une session à l'autre. + En conséquence, par défaut, les premiers nombres produis par <literal>grand</literal> + sont toujours les mêmes. + </para> + <para> + Dans certaines situations, nous peut vouloir initialiser la graine du générateur + dans le but de produire des nombres moins prédictibles. + Dans ce cas, on peut initialiser la graine avec la sortie de la fonction <literal>getdate</literal> : + </para> + <programlisting role="example"><![CDATA[ +n = getdate("s"); +grand("setsd", n) + ]]></programlisting> + </refsection> + <refsection> + <title>Exemple d'utilisation de clcg4</title> + <para> + On cherche à comparer deux techniques statistiques sur des données de tailles différentes. + La première, utilisant le 'bootstrapping' est supposée a priori aussi précise que + la deuxième technique (utilisant uniquement la force brute) tout en utilisant moins + de données. Pour la première méthode, un ensemble de données de taille n1, uniformément + distribuée entre 25 et 50 devra être généré puis analysé par la méthode. Pour la + seconde méthode, on procède de même avec une taille n2 à choisir entre 100 et 200. Ce processus + est répété 1000 fois. Pour la réduction de la variance, on veut que les nombres aléatoires + utilisés dans les deux méthodes soient les mêmes pour chacune des 1000 comparaisons. + Comme la deuxième méthode utilise plus de nombres aléatoires, la synchronisation + peut être difficile si l'on utilise un générateur classique. Avec un générateur + comme clcg4 c'est par contre très simple : utilisez le générateur 0 pour obtenir + la taille n1 du jeux de données et le générateur 1 pour obtenir les données. + Avec le générateur 0 tirer la taille n2 puis resélectionner le générateur 1 et revenez + au début du segment courant pour obtenir les n2 données pour la deuxième méthode : ainsi + les données initiales (les n1 premieres) sont les mêmes pour les deux méthodes. + Pour la comparaison suivante, il suffit d'avancer le générateur 1 au segment suivant, + etc... + </para> + </refsection> + <refsection role="see also"> + <title>Voir aussi</title> + <simplelist type="inline"> + <member> + <link linkend="rand">rand</link> + </member> + <member> + <link linkend="sprand">sprand</link> + </member> + <member> + <link linkend="ssrand">ssrand</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/randlib/help/ja_JP/addchapter.sce b/modules/randlib/help/ja_JP/addchapter.sce new file mode 100755 index 000000000..be3d1b5e7 --- /dev/null +++ b/modules/randlib/help/ja_JP/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Randlib",SCI+"/modules/randlib/help/ja_JP",%T); + diff --git a/modules/randlib/help/ja_JP/grand.xml b/modules/randlib/help/ja_JP/grand.xml new file mode 100755 index 000000000..1f69b61a5 --- /dev/null +++ b/modules/randlib/help/ja_JP/grand.xml @@ -0,0 +1,776 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="grand"> + <refnamediv> + <refname>grand</refname> + <refpurpose>乱数生成器</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>呼び出し手順</title> + <synopsis>Y=grand(m, n, dist_type [,p1,...,pk]) + Y=grand(X, dist_type [,p1,...,pk]) + Y=grand(n, dist_type [,p1,...,pk]) + S=grand(action [,q1,....,ql]) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>パラメータ</title> + <variablelist> + <varlistentry> + <term>m, n</term> + <listitem> + <para> + 整数, 出力行列 <literal>Y</literal>の大きさ + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>X</term> + <listitem> + <para> + 次元(つまり<literal>mx n</literal>) のみ使用される行列 + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>dist_type</term> + <listitem> + <para>生成する変量の分布の種類('bin', 'nor', 'poi', ...)を指定する文字列</para> + </listitem> + </varlistentry> + <varlistentry> + <term>p1, ..., pk</term> + <listitem> + <para> + 分布<literal>dist_type</literal>を完全に定義するために必要なパラメータ (実数または整数) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Y</term> + <listitem> + <para> + <literal>mx n</literal> ランダム出力行列 + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action</term> + <listitem> + <para> + 基底生成器に指定する処理を記述する文字列 + (カレントの基底生成器を変更するには'setgen', + カレントの基底生成器の名前を取得するには 'getgen', + カレントの基底生成器の状態(シード)を取得するには + 'getsd',など...) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>q1, ..., ql</term> + <listitem> + <para>処理を定義するためにひるようなパラメータ (通常は1つの文字列)</para> + </listitem> + </varlistentry> + <varlistentry> + <term>S</term> + <listitem> + <para>処理の出力 (通常は文字列または実数の列ベクトル)</para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>説明</title> + <para>警告: シードを指定しない場合,系列はあるセッションと別のセッションで + 同一のままとなります. + </para> + <para>rand関数を使用する各スクリプトの初めに, + 以下を実行する必要があります: + </para> + <programlisting role="example"><![CDATA[rand('seed',getdate('s'))]]></programlisting> + <para> + この関数は種々の分布により乱数を生成する際に使用することができます. + この場合,<literal>m x n</literal>行列を得るには + 最初の形式が異なる3種類の呼び出し手順のどれかを適用する必要があります. + <literal>X</literal> が <literal>m x n</literal>行列の + 場合,最初の2つの形式は等価で,3番目の形式は + '多値'分布(例えば,多項分布,多変量分布,ガウス分布, etc...)に対応します. + この際,サンプルは列ベクトル(つまり,次元<literal>m</literal>)で, + そのような<literal>n</literal>個の乱数ベクトル + (つまり<literal> m x n</literal> 行列)が得られます. + </para> + <para> + 最後の形式は基底生成器を変更(v2.7以降基底生成器を選択できます) + したり,内部の状態(シード)を変更または取得したり,... + といった基底生成器への + 種々の操作を行う際に使用されます. + これらの基底生成器はランダムな整数を + 大きな整数区間(lgi)上の一様分布に従い, + 他の全ての分布はそこから取得されます. + (一般にはあるスキーム lgi -> U([0,1)) -> 指定する分布) + </para> + </refsection> + <refsection> + <title>指定された分布から乱数を取得する</title> + <variablelist> + <varlistentry> + <term>ベータ分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'bet',A,B)</literal> は + パラメータ<literal>A</literal> およびd <literal>B</literal> + を指定したベータ分布からランダム変量を生成します. + ベータ分布の密度は <latex><![CDATA[(0 < x < 1)]]></latex> です: + </para> + <latex> + \dfrac{x^{A-1}(1-x)^{B-1}}{\beta(A,B)} + </latex> + <para> + <literal>A</literal> および <literal>B</literal> は + 実数で <latex><![CDATA[>10^{-37}]]></latex>とします. 関係する関数は + : <link linkend="cdfbet">cdfbet</link>です. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>二項分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'bin',N,p)</literal> は + パラメータ<literal>N</literal> (正の整数) および <literal>p</literal> + ([0,1]の範囲の実数)を指定した二項分布に基づきランダム変量を生成します. + この分布では,成功する確率が<literal>p</literal>の + <literal>N</literal>回の独立なベルヌーイ試行における + 成功回数となります. + 関係する関数: <link linkend="binomial">binomial</link>, + <link linkend="cdfbin">cdfbin</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>負の二項分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'nbn',N,p)</literal> は + パラメータ<literal>N</literal> (正の整数) および<literal>p</literal> ( + (0,1)の実数)を指定した負の二項分布に基づきランダム変量を生成します + : + 成功確率 <literal>p</literal>の独立なベルヌーイ試行において + <literal>N</literal>回成功する前に発生する失敗の回数. + 関係する関数 : <link linkend="cdfnbn">cdfnbn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>カイ二乗分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'chi', Df)</literal> は,自由度 + <literal>Df</literal>(実数 > 0.0)を指定した + カイ二乗分布に基づくランダム変量を生成します. + 関係する関数: <link linkend="cdfchi">cdfchi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>非心カイ二乗分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'nch',Df,Xnon)</literal> は, + 自由度<literal>Df</literal>(実数 > 0.0)および + 非心度パラメータ<literal>Xnonc</literal> (実数 >= 0.0) + を指定した非心カイ二乗分布に基づくランダム変量を生成します. + 関係する関数 : <link linkend="cdfchn">cdfchn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>指数分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'exp',Av)</literal> は + 平均<literal>Av</literal>(実数 >= 0.0) + を指定した指数分布に基づくランダム変量を生成します. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>F分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'f',Dfn,Dfd)</literal> は, + 分子の自由度<literal>Dfn</literal> (実数 > 0.0) および + 分母の自由度<literal>Dfd</literal> (実数 + > 0.0) を指定した + F(分散比)分布に基づくランダム変量を生成します. + 関係する関数 : <link linkend="cdff">cdff</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>非心F分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'nf',Dfn,Dfd,Xnon)</literal>は, + 分子の自由度<literal>Dfn</literal> (実数 + >= 1), および + 分母の自由度<literal>Dfd</literal> (実数 > 0) , + および非心パラメータ + <literal>Xnonc</literal> (実数 >= 0)を指定して + 非心F分布に基づくランダム変量を生成します. + 関係する関数 : <link linkend="cdffnc">cdffnc</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ガンマ分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'gam',shape,rate)</literal> + は,パラメータ<literal>shape</literal> (実数 > 0)および + <literal>rate</literal> (実数 > 0)を指定して + ガンマ分布に基づくランダム変量を生成します. + ガンマの密度は以下となります : + </para> + <latex> + \dfrac{ \textrm{rate}^{\textrm{shape}} x^{\textrm{shape}-1} e^{-\textrm{rate} x}}{\gamma(\textrm{shape}) } + </latex> + <para> + 関係する関数 : <link linkend="gamma">gamma</link>, + <link linkend="cdfgam">cdfgam</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ガウスラプラス(正規)分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'nor',Av,Sd)</literal> は + 平均<literal>Av</literal> (実数) および標準偏差 + <literal>Sd</literal> (実数 >= 0)の + 正規分布に基づくランダム変量を生成します. + 関係する関数 + : <link linkend="cdfnor">cdfnor</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>多変量ガウス(多変量正規)分布</term> + <listitem> + <para> + <literal>Y=grand(n,'mn',Mean,Cov)</literal>は, + <literal>n</literal>次の多変量正規ランダム変量を + 生成します; + <literal>Mean</literal> は <literal>m x + 1 + </literal> + 行列, <literal>Cov</literal>は <literal>m x + m + </literal> + 対称正定行列です + (<literal>Y</literal> はこの場合 <literal>m x n</literal> + 行列となります). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>幾何分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'geom', p)</literal> は, + パラメータ<literal>p</literal>を指定した + 幾何分布に基づくランダム変量を生成します: + (成功率<literal>p</literal>の)ベルヌーイ試行に1回成功するまでの回数. + <literal>p</literal> は + <latex>[p_{min},1]</latex> (<latex> p_{min} = 1{,}3\times 10^{-307} </latex>)の範囲とします. + </para> + <para> + <literal>Y</literal> は整数の値を有する正の実数となり, + これらは "1回の成功を得る時の試行回数"です. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>マルコフ分布</term> + <listitem> + <para> + <literal>Y=grand(n,'markov',P,x0)</literal> は, + 推移行列 <literal>P</literal>で記述されたマルコフ連鎖の + <literal>n</literal>個の一連の状態量を生成します. + 状態量の初期値は<literal>x0</literal>で指定されます. + <literal>x0</literal>が大きさ<literal>m=size(x0,'*')</literal>の + 行列の場合,<literal>Y</literal>は大きさ<literal>m x n</literal> + の行列となります. + <literal>Y(i,:)</literal> は初期状態量<literal>x0(i)</literal> + から得られるサンプルパスです. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>多項分布</term> + <listitem> + <para> + <literal>Y=grand(n,'mul',nb,P)</literal> は, + 多項分布に基づき<literal>n</literal>個の観測量を生成します: + <literal>m</literal>個のカテゴリの中に + <literal>nb</literal>個の分類のイベント + (<literal>m</literal>個の"boxes"の中に<literal>nb</literal>個の"balls"). + <literal>P(i)</literal>はあるイベントがカテゴリ i に分類される確率です. + 確率ベクトル<literal>P</literal>の大きさは<literal>m-1</literal>です + (カテゴリ<literal>m</literal>の確率は<literal>1-sum(P)</literal>となります). + <literal>Y</literal> の大きさは <literal>m x n</literal>で, + 各列 <literal>Y(:,j)</literal> は多項分布の観測量, + <literal>Y(i,j)</literal>は( + <literal>j</literal>番目の観測値に関する)カテゴリ<literal>i</literal>に + 分類されるイベントの数です(<literal>sum(Y(:,j)) + = nb + </literal> + ). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ポワソン分布</term> + <listitem> + <para> + <literal>Y=grand(m,n,'poi',mu)</literal>は, + 平均 <literal>mu (実数 >= 0.0)</literal>のポワソン分布に基づき + 乱数を生成します. 関係する機能 + : <link linkend="cdfpoi">cdfpoi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>ランダム置換</term> + <listitem> + <para> + <literal>Y=grand(n,'prm',vect)</literal> は, + 列ベクトル (<literal>m x 1</literal>) + <literal>vect</literal>の<literal>n</literal>個の + ランダム置換を生成します. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>一様分布 (def)</term> + <listitem> + <para> + <literal>Y=grand(m,n,'def')</literal> は, + は,<literal>[0,1)</literal> (1は含まれません) の範囲の + 一様分布に基づきランダム変量を生成します. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>一様分布 (unf)</term> + <listitem> + <para> + <literal>Y=grand(m,n,'unf',Low,High)</literal> + は <literal>[Low, High)</literal> の範囲の一様分布に基づく + の実数のランダム変量を生成します. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>一様分布 (uin)</term> + <listitem> + <para> + <literal>Y=grand(m,n,'uin',Low,High)</literal>は, + <literal>Low</literal> および <literal>High</literal> (含む) + の範囲の一様分布に基づく + の整数のランダム変量を生成します. + <literal>High</literal> および + <literal>Low</literal> は + <latex><![CDATA[(\textrm{High}-\textrm{Low}+1) < 2\,147\,483\,561]]></latex>の + 範囲の整数とする必要があります. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>一様分布 (lgi)</term> + <listitem> + <para> + <literal>Y=grand(m,n,'lgi')</literal> は + カレントの生成器の基底出力として + 以下の範囲の一様分布に基づくランダムな整数を返します: + </para> + <itemizedlist> + <listitem> + <para> + mt, kiss および fsultra の場合は <literal>[0, 2^32 - 1]</literal> + </para> + </listitem> + <listitem> + <para> + clcg2 の場合は <literal>[0, 2147483561]</literal> + </para> + </listitem> + <listitem> + <para> + clcg4の場合は <literal>[0, 2^31 - 2]</literal> + </para> + </listitem> + <listitem> + <para> + urandの場合は <literal>[0, 2^31 - 1]</literal>. + </para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>カレントの生成器およびその状態を設定/取得</title> + <para> Scilab-2.7以降,異なる('lgi'分布に基づくランダムな整数,もしくは + その整数に基づき得られたもの)基底生成器を選択することが + 可能となっています: + </para> + <variablelist> + <varlistentry> + <term>mt</term> + <listitem> + <para> + 周期<literal>2^19937</literal>の + M. Matsumoto および T. NishimuraのMersenne-Twister, + 状態は + <literal>624</literal>個の整数の配列(およびこの配列のインデックス)により + 指定されます; これがデフォルトの生成器です. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>kiss</term> + <listitem> + <para> + 周期<literal>2^123</literal>のG. MarsagliaのKeep It Simple Stupid, + 状態は<literal>4</literal>個の整数により指定されます. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg2</term> + <listitem> + <para> + 周期 <literal>2^61</literal>のP. L'Ecuyerの2線形共役合同生成器, + 状態は<literal>2</literal>個の整数により指定されます; + grandにより以前に(若干修正された)使用されていた生成器です. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg4</term> + <listitem> + <para> + 周期 <literal>2^121</literal>のP. L'Ecuyerの4線形合同生成器, + 状態は<literal>4</literal>個の整数により指定されます; + この生成器は<literal>101</literal>個の(重ならない)異なる生成器に + 分割することができ,異なるタスクの場合に有用です + ('clcg4に固有の動作'および 'clcg4のテスト例'を参照). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>urand</term> + <listitem> + <para> + scilab 関数 <link linkend="rand">rand</link>で使用される生成器, + <literal>1</literal>個の整数で状態が定義され, + 周期は<literal>2^31</literal> + (d.e. knuth (1969), vol 2. State に示された理論と提案に基づく). + これはこの一覧の中では高速ですが, + やや古臭くなっています (重要なシミュレーションでは使用しないでください). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>fsultra</term> + <listitem> + <para> + Arif Zaman および George Marsagliaの合同生成器に基づく + Subtract-with-Borrow 生成器, + 周期は <literal>10^356</literal>以上, + 状態は37個の整数の配列(およびこの配列へのインデックス, + フラグ (0または1)および他の整数)により指定されます. + </para> + </listitem> + </varlistentry> + </variablelist> + <para>全ての生成器に共通なアクションの動作を以下に示します: + </para> + <variablelist> + <varlistentry> + <term>action= 'getgen'</term> + <listitem> + <para> + <literal>S=grand('getgen')</literal> はカレントの基底生成器を返します + ( <literal>S</literal> は以下の文字列のどれかです: + 'mt', 'kiss', 'clcg2', 'clcg4', 'urand', 'fsultra'. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'setgen'</term> + <listitem> + <para> + <literal>grand('setgen',gen)</literal>は + カレントの基底生成器を<literal>gen</literal>に設定します. + この文字列には 'mt', 'kiss', 'clcg2', 'clcg4', 'urand', 'fsultra' + のどれかを指定します( + このコールは新しいカレントの生成器を返すことに注意してください). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'getsd'</term> + <listitem> + <para> + <literal>S=grand('getsd')</literal> はカレントの基底生成器の + カレントの状態 (カレントのシード)を返します ; + <literal>S</literal> には, mt の場合は<literal>625</literal>次 + (先頭は<literal>[1,624]</literal>の範囲のインデックスです), + kiss の場合は <literal>4</literal> 次, clcg2の場合は <literal>2</literal>次, + fsultraの場合は <literal>40</literal> , clcg4 の場合は <literal>4</literal>次 + (最後の1つについてはカレントの仮想生成器のカレントの状態が取得されます), + および urand の場合は <literal>1</literal>次 + の(整数)列ベクトルが出力されます. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'setsd'</term> + <listitem> + <para> + <literal>grand('setsd',S), grand('setsd',s1[,s2,s3,s4])</literal> は + カレントの基底生成器の状態(新しいシード)を設定します: + </para> + <variablelist> + <varlistentry> + <term>mtの場合</term> + <listitem> + <para> + <literal>S</literal>は<literal>625</literal>次の整数ベクトル + (最初の要素はインデックスで<literal>[1,624]</literal>の範囲とする + 必要があります, 続く<literal>624</literal>個の要素は + <literal>[0,2^32[</literal>)の範囲とします) + (しかし,全てをゼロにするすることはできません); + 整数<literal>s1</literal>を1つだけ指定することで,より簡単に初期化を + 行うことができます. + (<literal>s1</literal> は <literal>[0,2^32[</literal>の範囲とします) ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>kissの場合</term> + <listitem> + <para> + <literal>[0,2^32[</literal>の範囲の + <literal>4</literal> 個の整数 <literal>s1,s2, s3,s4</literal> を指定します ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg2の場合</term> + <listitem> + <para> + <literal>2</literal> 個の整数 <literal>s1</literal> (範囲:<literal>[1,2147483562]</literal>) および <literal>s2</literal> + (範囲: <literal>[1,2147483398]</literal>) を指定します ; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg4の場合</term> + <listitem> + <para> + <literal>4</literal> 個の整数 <literal>s1</literal> (範囲: <literal>[1,2147483646]</literal>), <literal>s2</literal> + (範囲: <literal>[1,2147483542]</literal>), <literal>s3</literal> (範囲: <literal>[1,2147483422]</literal>), + <literal>s4</literal> (範囲: <literal>[1,2147483322]</literal> ) を指定します ; + <literal>注意</literal> : clcg4の場合, + カレントの仮想生成器のシードを設定しますが, + この生成器と他の仮想生成器との間の同期が失われる可能性があります. + すなわち,生成されるデータ列は他の生成器により生成されるデータ列と + オーバーラップしていないということは保証されません) => + 代わりに 'setall' オプションを使用してください. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>urandの場合</term> + <listitem> + <para> + <literal>[0,2^31</literal>[の範囲の<literal>1</literal> + 個の整数 <literal>s1</literal> を指定します. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>fsultraの場合</term> + <listitem> + <para> + <literal>S</literal> は<literal>40</literal>次の整数ベクトルで, + (最初の要素はインデックスで<literal>[0,37]</literal>の範囲とします, + 2番目の要素はフラグ (0または1),3番目は[1,2^32[ の範囲の整数, + 367個のその他の整数(範囲: [0,2^32[))); + <literal>[0,2^32[</literal>の範囲の + 整数を2つだけ (<literal>s1</literal> および <literal>s2</literal>) + 指定することでより簡単に(そして推奨される)初期化を行うことができます. + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'phr2sd'</term> + <listitem> + <para> + <literal>Sd=grand('phr2sd', phrase)</literal> は, + 基底生成器(clcg2に適しています)の状態を変更するシードとして使用可能な + <literal>1 x 2</literal> ベクトル <literal>Sd</literal>を生成する + <literal>phrase</literal> (文字列)を指定します. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>clcg4の固有のオプション</title> + <para> + clcg4 生成器は他の生成器と同時に使用することができますが, + 系列がオーバーラップしない + 複数(<literal>101</literal>個)の仮想生成器に分割できるという利点があります. + (古典的な生成器を使用する場合,異なる系列を得るために + 初期状態量(シード)を別のものに変更できますが,完全に異なる系列となることは + 保証されません) + 各仮想生成器は<literal>2^72</literal> 個の値の系列に対応します. + これらはさらに長さ<literal>W=2^41</literal>の<literal>V=2^31</literal>個の + セグメント(またはブロック)に分割されます. + 指定した仮想生成器について,系列の先頭またはカレントのセグメントの先頭に戻るか + 次のセグメントに直接移動するかを選択できます. + 'setall'オプションにより生成器 <literal>0</literal> の初期状態(シード)を + 変更することも可能です. + これにより,同期をとるために他の仮想生成器の初期状態量を変更することも可能です. + (すなわち, gen <literal>0</literal> の新しい初期状態の関数として, + gen <literal>1..100</literal> の初期状態量は<literal>101</literal>個の + 重複しない系列が得られるように再計算されます.) + </para> + <variablelist> + <varlistentry> + <term>action= 'setcgn'</term> + <listitem> + <para> + <literal>grand('setcgn',G)</literal> は clcg4 のカレントの仮想生成器を設定します + (clcg4 が設定された時, この値は使用される仮想 (clcg4)生成器の数<literal>G</literal>となります); + 仮想 clcg4 生成器は<literal>0,1,..,100</literal>と番号付けられます + (そして, <literal>G</literal>は<literal>[0,100]</literal>の範囲の整数となります); + デフォルトで,カレントの仮想生成器は<literal>0</literal>です. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'getcgn'</term> + <listitem> + <para> + <literal>S=grand('getcgn')</literal> はカレントの仮想 clcg4 生成器の数を返します. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'initgn'</term> + <listitem> + <para> + <literal>grand('initgn',I)</literal> はカレントの仮想生成器の状態を再度初期化します + </para> + <variablelist> + <varlistentry> + <term>I = -1</term> + <listitem> + <para>初期シードの状態を設定します</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 0</term> + <listitem> + <para>直近の(前の)シードを設定します (つまり,カレントのセグメントの先頭)</para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 1</term> + <listitem> + <para> + 直近のシード(すなわち,次のセグメントの先頭)から新しいシード<literal>W</literal>に + 状態量を設定し,カレントのセグメントのパラメータをリセットします. + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'setall'</term> + <listitem> + <para> + <literal>grand('setall',s1,s2,s3,s4)</literal> は + 生成器<literal>0</literal>の初期状態を<literal>s1,s2,s3,s4</literal>に設定します. + 他の生成器の初期シードは同期がとれるように設定されます. + <literal>s1, s2, s3, s4</literal>に関する制約については,'setsd'アクションを参照ください. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>action= 'advnst'</term> + <listitem> + <para> + <literal>grand('advnst',K)</literal> はカレントの生成器の状態を + <literal>2^K</literal>だけ前に進め,初期シードをその値でリセットします. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>clcg4のテスト例</title> + <para> + clcg4 の分割機能の適用例を以下に示します. + 2つの統計上のテクニックを異なるデータの大きさで比較します. + 最初の手法では,ブートストラップ手法を使用し,しらみつぶし法のみを適用する + 2番目の手法よりも少ないデータで同等の精度が得られると考えられます. + 最初の方法の場合,25および50の間に一様分布する大きさのデータ集合が生成されます. + その後,指定した大きさのデータ集合が生成され,解析されます. + 2番目の方法は, + 100および200の間の大きさのデータ集合を選択し,データを生成し,解析します. + この過程を1000回繰り返します. + 分散を減少させるために,2つの手法で使用される乱数を1000回の比較の各回で + 同じとすることが望まれます. + しかし,2番目の手法は1番目の手法よりも多くの乱数を使用し, + このパッケージなしでは同期は困難となります. + clcg4 ではこれは容易です. + 生成器 0 を使用し最初の手法のサンプルの大きさを取得し, + 生成器 1 をデータを得る際に使用します. + 次にカレントのブロックの先頭に状態をリセットし, + 2番目の手法にも同様のことをします. + これにより,2番目の手法で使用される初期データが1番目の手法で使用されることが + 保証されます. + 両方の処理が完了した時,両方の生成器のブロックを前に進めます. + </para> + </refsection> + <refsection role="see also"> + <title>参照</title> + <simplelist type="inline"> + <member> + <link linkend="rand">rand</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/randlib/help/pt_BR/addchapter.sce b/modules/randlib/help/pt_BR/addchapter.sce new file mode 100755 index 000000000..0fef4a1de --- /dev/null +++ b/modules/randlib/help/pt_BR/addchapter.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Randlib",SCI+"/modules/randlib/help/pt_BR",%T); + diff --git a/modules/randlib/help/ru_RU/addchapter.sce b/modules/randlib/help/ru_RU/addchapter.sce new file mode 100755 index 000000000..355f0f8b3 --- /dev/null +++ b/modules/randlib/help/ru_RU/addchapter.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +add_help_chapter("Библиотека генераторов случайных чисел",SCI+"/modules/randlib/help/ru_RU",%T); diff --git a/modules/randlib/help/ru_RU/grand.xml b/modules/randlib/help/ru_RU/grand.xml new file mode 100755 index 000000000..fbe74eaa6 --- /dev/null +++ b/modules/randlib/help/ru_RU/grand.xml @@ -0,0 +1,1007 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) Jean-Philippe Chancelier and Bruno Pincon + * Copyright (C) 2010-2011 - DIGITEO - Michael Baudin + * Copyright (C) 2013 - Samuel GOUGEON : extension to hypermatrices + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> +<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ru" xml:id="grand"> + <refnamediv> + <refname>grand</refname> + <refpurpose>Случайные числа</refpurpose> + </refnamediv> + <refsynopsisdiv> + <title>Последовательность вызова</title> + <synopsis> + Y = grand(m, n, "bet", A, B) + Y = grand(m, n, "bin", N, p) + Y = grand(m, n, "nbn", N, p) + Y = grand(m, n, "chi", Df) + Y = grand(m, n, "nch", Df, Xnon) + Y = grand(m, n, "exp", Av) + Y = grand(m, n, "f", Dfn, Dfd) + Y = grand(m, n, "nf", Dfn, Dfd, Xnon) + Y = grand(m, n, "gam", shape, rate) + Y = grand(m, n, "nor", Av, Sd) + Y = grand(m, n, "geom", p) + Y = grand(m, n, "poi", mu) + Y = grand(m, n, "def") + Y = grand(m, n, "unf", Low, High) + Y = grand(m, n, "uin", Low, High) + Y = grand(m, n, "lgi") + + Y = grand(m, n, o,..,"..",...) + Y = grand(X, ...) + + Y = grand(n, "mn", Mean, Cov) + Y = grand(n, "markov", P, x0) + Y = grand(n, "mul", nb, P) + Y = grand(n, "prm", vect) + + S = grand("getgen") + grand("setgen", gen) + + S = grand("getsd") + grand("setsd", S) + + S = grand("phr2sd", phrase) + + grand("setcgn", G) + S = grand("getcgn") + + grand("initgn", I) + + grand("setall", s1, s2, s3, s4) + + grand("advnst", K) + </synopsis> + </refsynopsisdiv> + <refsection> + <title>Аргументы</title> + <variablelist> + <varlistentry> + <term>m, n, o</term> + <listitem> + <para> + целые числа, определяющие размеры матрицы/гиперматрицы <varname>Y</varname>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>X</term> + <listitem> + <para> + матрица, у которой используются только её размеры (скажем <varname>m</varname> на <varname>n</varname>). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Y</term> + <listitem> + <para> + матрица или гиперматрица со случайными элементами, зависящая от входных аргументов. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>S</term> + <listitem> + <para> + выходное значение действия (строка или вещественный вектор-столбец). + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Описание</title> + <para> + Эта функция формирует случайные числа по различным законам + распределения. + </para> + <para> + Последовательности вызова: + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(m, n, "bet", A, B) + Y = grand(m, n, "bin", N, p) + Y = grand(m, n, "nbn", N, p) + Y = grand(m, n, "chi", Df) + Y = grand(m, n, "nch", Df, Xnon) + Y = grand(m, n, "exp", Av) + Y = grand(m, n, "f", Dfn, Dfd) + Y = grand(m, n, "nf", Dfn, Dfd, Xnon) + Y = grand(m, n, "gam", shape, rate) + Y = grand(m, n, "nor", Av, Sd) + Y = grand(m, n, "geom", p) + Y = grand(m, n, "poi", mu) + Y = grand(m, n, "def") + Y = grand(m, n, "unf", Low, High) + Y = grand(m, n, "uin", Low, High) + Y = grand(m, n, "lgi") + ]]></programlisting> + </para> + <para> + формируют матрицу размером <varname>m</varname> на <varname>n</varname>, + элементы которой являются случайными числами. + + Все эти последовательности вызова могут быть расширены для создания гиперматрицы случайных чисел, у которой более двух размерностей, определённых в виде целых чисел, перечисленных перед типом статистического распределения: + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(m, n, o, ..., "..", ...) + ]]></programlisting> + </para> + <para> + Другой способ указать размеры ожидаемого вектора, матрицы или гиперматрицы случайных чисел: + </para> + <para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(X, ...) + ]]></programlisting> + </para> + <para> + где <varname>X</varname> - матрица или гиперматрица размером + <varname>m</varname> на <varname>n</varname> на ... . В + данном случае используются + только размеры матрицы <varname>X</varname>. + </para> + <para> + Последовательности вызова: + </para> + <programlisting role="no-scilab-exec"><![CDATA[ + Y = grand(n, "mn", Mean, Cov) + Y = grand(n, "markov", P, x0) + Y = grand(n, "mul", nb, P) + Y = grand(n, "prm", vect) + ]]></programlisting> + <para> + формируют матрицу размером <varname>m</varname> на <varname>n</varname> со + случайными элементами, где <varname>m</varname> - размер аргумента + <varname>Mean</varname>, <varname>Cov</varname>, <varname>P</varname> или + <varname>vect</varname> в зависимости от ситуации (подробности ниже). + </para> + <para> + Последовательности вызова: + </para> + <programlisting role="no-scilab-exec"><![CDATA[ + S = grand("getgen") + grand("setgen", gen) + + S = grand("getsd") + grand("setsd", S) + + grand("setcgn", G) + S = grand("getcgn") + + grand("initgn", I) + + grand("setall", s1, s2, s3, s4) + + grand("advnst", K) + ]]></programlisting> + <para> + настраивают или запрашивают состояние имеющихся генераторов случайных чисел. + </para> + </refsection> + <refsection> + <title>Получение случайных чисел по заданному закону распределения</title> + <variablelist> + <varlistentry> + <term>бета-распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "bet", A, B)</code> формирует случайные + реализации по бета-распределению с параметрами + <varname>A</varname> и <varname>B</varname>. Плотность бета-распределения лежит на интервале <latex><![CDATA[(0 < x < 1)]]></latex>: + </para> + <para> + <latex> + \dfrac{x^{A-1}(1-x)^{B-1}}{\beta(A,B)} + </latex> + </para> + <para> + <varname>A</varname> и <varname>B</varname> должны быть вещественными числами <latex><![CDATA[>10^{-37}]]></latex>. С этой функцией связана + функция <link linkend="cdfbet">cdfbet</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>биномиальное распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "bin", N, p)</code> формирует случайные реализации по биномиальному закону распределения с параметрами + <varname>N</varname> (положительное целое) и <varname>p</varname> (вещественное число на интервале <literal>[0,1]</literal>): число + "успехов" в серии из <varname>N</varname> независимых случайных (распределение Бернулли) экспериментов с вероятностью "успеха" в + каждом из них <varname>p</varname>. С этой функцией связаны + функции: <link linkend="binomial">binomial</link>, <link linkend="cdfbin">cdfbin</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>отрицательное биномиальное распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "nbn", N, p)</code> формирует случайные реализации по отрицательному биномиальному распределению с + параметрами <varname>N</varname> (положительное целое) и <varname>p</varname> (вещественное число на интервале + <literal>(0,1)</literal>): число "неудач" случившихся до <varname>N</varname>-го "успеха" в последовательности испытаний с + вероятностью "успеха" <varname>p</varname>. С этой функцией + связана функция <link linkend="cdfnbn">cdfnbn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>хи-квадрат распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "chi", Df)</code> формирует случайные + реализации по распределению хи-квадрат с <varname>Df</varname> + степенями свободы. Число степеней свободы должно быть + вещественным, строго больше нуля. С этой функцией связана функция: <link linkend="cdfchi">cdfchi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>нецентральное хи-квадрат распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "nch", Df, Xnonc)</code> формирует случайные реализации по нецентральному хи-квадрат распределению с + <varname>Df</varname> степенями свободы (вещественное значение >= <literal>1.0</literal>) и параметром нецентральности + <varname>Xnonc</varname> (вещественное число, больше либо равно + нулю). С этой функцией связана функция: <link linkend="cdfchn">cdfchn</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>экспоненциальное распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "exp", Av)</code> формирует случайные реализации по экспоненциальному распределению с математическим + ожиданием <varname>Av</varname> (вещественное значение, строго больше нуля). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>F-распределение (отношение дисперсий, распределение Фишера)</term> + <listitem> + <para> + <code>Y = grand(m, n, "f", Dfn, Dfd)</code> формирует случайные реализации по F-распределению (отношение дисперсий, распределение + Фишера) с <varname>Dfn</varname> (вещественное значение, строго больше нуля) в числителе и <varname>Dfd</varname> степенями + свободы (вещественное значение, строго больше нуля) в знаменателе. + С этой функцией связана функция: <link linkend="cdff">cdff</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>нецентральное F-распределение (отношение дисперсий)</term> + <listitem> + <para> + <code>Y = grand(m, n, "nf", Dfn, Dfd, Xnonc)</code> формирует случайные реализации по нецентральному F-распределению (отношению + дисперсий) с <varname>Dfn</varname> степенями свободы (вещественное значение, больше либо равно <literal>1</literal>) в + числителе, и <varname>Dfd</varname> степенями свободы (вещественное значение, строго больше нуля) в знаменателе и + параметром нецентральности <varname>Xnonc</varname> (вещественное число, больше либо равно нулю). С этой функцией связана функция: + <link linkend="cdffnc">cdffnc</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>гамма-распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "gam", shape, rate)</code> формирует + случайные реализации по гамма-распределению с параметрами + <varname>shape</varname> (вещественное значение, строго + больше нуля) и <varname>rate</varname> (вещественное + значение, строго больше нуля) (<literal>real</literal> + > <literal>0</literal>). Плотность гамма-распределения + равна: + </para> + <para> + <latex> + \dfrac{ \textrm{rate}^{\textrm{shape}} x^{\textrm{shape}-1} e^{-\textrm{rate} x}}{\gamma(\textrm{shape}) } + </latex> + </para> + <para> + С этой функцией связаны: <link linkend="gamma">gamma</link>, + <link linkend="cdfgam">cdfgam</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>распределение Гаусса-Лапласа (нормальное)</term> + <listitem> + <para> + <code>Y = grand(m, n, "nor", Av, Sd)</code> формирует случайные реализации по нормальному распределению с математическим ожиданием + <varname>Av</varname> (вещественное значение), среднеквадратичным отклонением <varname>Sd</varname> (вещественное значение, больше + либо равно нулю). С этой функцией связана: <link linkend="cdfnor">cdfnor</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>многомерное гауссовское (многомерное нормальное) распределение</term> + <listitem> + <para> + <code>Y = grand(n, "mn", Mean, Cov)</code> формирует случайные реализации по многомерному гауссовскому распределению; среднее + значение <varname>Mean</varname> должно быть вектор-столбцом размером <literal>m</literal> на <literal>1</literal>, а + ковариация <varname>Cov</varname> должна быть симметричной положительно определённой матрицей размером <literal>m</literal> + на <literal>m</literal> (тогда <varname>Y</varname> будет матрицей размером <literal>m</literal> на <literal>n</literal>). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>геометрическое распределение</term> + <listitem> + <para> + <code>Y = grand(m, n, "geom", p)</code> формирует случайные реализации по геометрическому распределению с параметром + <varname>p</varname>: количество независимых экспериментов (с вероятностью "успеха" <varname>p</varname>) до тех пор пока не + будет "успех". Вероятность <varname>p</varname> должна быть в интервале <latex>[p_{min},1]</latex> (с <latex> p_{min} = 1{,}3\times 10^{-307} </latex>). + </para> + <para> + <varname>Y</varname> состоит из положительных целочисленных вещественных чисел, которые означают "число экспериментов, + проведённых до первого успешного". + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>цепь Маркова</term> + <listitem> + <para> + <code>Y = grand(n, "markov", P, x0)</code> формирует <varname>n</varname> последовательных состояний цепи Маркова, + описанных матрицей переходных состояний <varname>P</varname>. Сумма элементов в каждой строке в <varname>P</varname> равна + <literal>1</literal>. Исходное состояние задаётся через <varname>x0</varname>. Если <varname>x0</varname> является + матрицей размером <code>m=size(x0,"*")</code>, то <varname>Y</varname> является матрицей размером + <varname>m</varname> на <varname>n</varname>. <code>Y(i,:)</code> является выборочной траекторией, полученной из исходного состояния + <code>x0(i)</code>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>мультиномиальное (полиномиальное) распределение</term> + <listitem> + <para> + <code>Y = grand(n, "mul", nb, P)</code> формирует <varname>n</varname> случайных реализаций по мультиномиальному + распределению: совокупность <varname>nb</varname> событий в <literal>m</literal> категориях (положить <varname>nb</varname> + "шаров" в <literal>m</literal> "ящиков"). <literal>P(i)</literal> является вероятностью того, что событие будет классифицировано в + категории <literal>i</literal>. Вектор-столбец вероятностей <varname>P</varname> размером <literal>m-1</literal> (вероятность + категории <literal>m</literal> равна <literal>1-sum(P)</literal>). <varname>Y</varname> имеет размер <literal>m</literal> на + <literal>n</literal>. Каждый столбец <literal>Y(:,j)</literal> является случайной реализацией по мультиномиальному распределению, + а <literal>Y(i,j)</literal> является количеством событий, попавших в категорию <literal>i</literal> (для + <literal>j</literal>-того наблюдения) (<literal>sum(Y(:,j)) = nb</literal>). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>распределение Пуассона</term> + <listitem> + <para> + <code>Y = grand(m, n, "poi", mu)</code> формирует случайные + реализации по распределению Пуассона с математическим ожиданием <varname>mu</varname> (вещественное значение, больше либо равно + нулю). С этой функцией связана: <link linkend="cdfpoi">cdfpoi</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>случайные перестановки</term> + <listitem> + <para> + <code>Y = grand(n, "prm", vect)</code> формирует <varname>n</varname> случайных перестановок <varname>vect</varname>. + <varname>vect</varname> может быть вектор-столбцов вещественных чисел или вектором, матрицей или гиперматрицей комплексных, целых, логических, полиномиальных или строковых значений; полной или разрежённой. + Из-за стековой структуры, <varname>vect</varname> не должен и не может быть вектор-строкой. + Эта возможность перекрывает Matlab'овскую функцию <code>randperm()</code> поскольку + <code>randperm(n)</code> эквивалентно <code>grand(1,'prm',(1:n)')</code>, + а <code>randperm(n, k)</code> может быть получено через + <code>grand(1,'prm',(1:n)'); ans(1:k)</code>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>непрерывное равномерное распределение (def)</term> + <listitem> + <para> + <code>Y = grand(m, n, "def")</code> формирует случайные реализации по равномерному распределению на интервале + <literal>[0,1)</literal> (<literal>1</literal> в интервал не входит). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>непрерывное равномерное распределение (unf)</term> + <listitem> + <para> + <code>Y = grand(m, n, "unf", Low, High)</code> формирует случайные вещественные значения равномерно распределённые на интервале + <literal>[Low, High)</literal> (<varname>High</varname> в интервал не входит). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>дискретное равномерное распределение (uin)</term> + <listitem> + <para> + <code>Y = grand(m, n, "uin", Low, High)</code> формирует случайные целые числа, равномерно распределённые между значениями + <varname>Low</varname> и <varname>High</varname> (включительно). <varname>High</varname> и <varname>Low</varname> должны быть + такими целыми числами, что <latex><![CDATA[(\textrm{High}-\textrm{Low}+1) < 2\,147\,483\,561]]></latex>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>равномерное распределение (lgi)</term> + <listitem> + <para> + <code>Y = grand(m, n, "lgi")</code> возвращает базовый выход текущего генератора: случайные целые числа по равномерному + распределению на интервалах: + </para> + <itemizedlist> + <listitem> + <para> + <literal>[0, 2^32 - 1]</literal> для mt, kiss и fsultra; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 87]</literal> для clcg2; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 2]</literal> для clcg4; + </para> + </listitem> + <listitem> + <para> + <literal>[0, 2^31 - 1]</literal> для urand. + </para> + </listitem> + </itemizedlist> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Установка/получение текущего генератора и его состояния</title> + <para> + У пользователя есть возможность выбирать между основными генераторами (которые + дают случайные целые числа по распределению <literal>"lgi"</literal>, другие + получаются из него). + </para> + <variablelist> + <varlistentry> + <term>mt</term> + <listitem> + <para> + Вихрь Марсенна (Mersenne-Twister), разработанный японскими учёными + Макото Мацумото и Такудзи Нисимурой, период около + <literal>2^19937</literal>, состояние задаётся массивом из + <literal>624</literal> целых чисел (плюс индекс на этот массив). + Этот генератор используется по умолчанию. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>kiss</term> + <listitem> + <para> + "Keep It Simple Stupid" ("придерживайся простоты"), разработанный + Джорджем Марсальи, период около <literal>2^123</literal>, + состояние задаётся четырьмя целыми числами. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg2</term> + <listitem> + <para> + Комбинация двух линейных конгруэнтных генераторов П. Л'Экюйера (P. L'Ecuyer) с периодом около <literal>2^61</literal>, состояние + задаётся двумя целыми числами. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>clcg4</term> + <listitem> + <para> + Комбинация четырёх линейных конгруэнтных генераторов П. Л'Экюйера + (P. L'Ecuyer) с периодом около <literal>2^121</literal>, состояние + задаётся четырьмя целыми числами. Этот генератор разделён на разные + виртуальные (неперекрывающиеся) генераторы (<literal>101</literal> + генератор), которые могут быть полезными для разных задач (см. + "Опции, специфичные для "clcg4"" и "Тестовый пример для "clcg4""). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>fsultra</term> + <listitem> + <para> + Генератор вычитания с займом (Subtract-with-Borrow), смешанный с + конгруэнтным генератором Арифа Замана (Arif Zaman) и Джорджа + Марсальи (George Marsaglia), с периодом свыше + <literal>10^356</literal>, состояние задаётся массивом из + <literal>37</literal> целых чисел (плюс индекс на этот массив, + флаг (<literal>0</literal> или <literal>1</literal>) и другое + целое число). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>urand</term> + <listitem> + <para> + Генератор, используемый функцией Scilab'а <link linkend="rand">rand</link>, состояние задаётся одним целым числом, + период <literal>2^31</literal>. Этот генератор основан на "Urand, + A Universal Random Number Generator" By, Michael A. Malcolm, Cleve + B. Moler, Stan-Cs-73-334, January 1973, Computer Science + Department, School Of Humanities And Sciences, Stanford + University. Это самый быстрый генератор из данного списка, однако + его статистические качества менее удовлетворительны по сравнению с + другими генераторами. + </para> + </listitem> + </varlistentry> + </variablelist> + <para> + Различные действия, общие для всех генераторов: + </para> + <variablelist> + <varlistentry> + <term>действие = "getgen"</term> + <listitem> + <para> + <code>S = grand("getgen")</code> возвращает текущий основной + генератор. В данном случае <varname>S</varname> является одной + строкой из <literal>"mt"</literal>, <literal>"kiss"</literal>, + <literal>"clcg2"</literal>, <literal>"clcg4"</literal>, + <literal>"urand"</literal>, <literal>"fsultra"</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "setgen"</term> + <listitem> + <para> + <code>grand("setgen",gen)</code> устанавливает текущий основной + генератор. В данном случае <varname>gen</varname> может быть одной + строкой из <literal>"mt"</literal>, <literal>"kiss"</literal>, + <literal>"clcg2"</literal>, <literal>"clcg4"</literal>, + <literal>"urand"</literal>, <literal>"fsultra"</literal>. + Заметьте, что этот вызов возвращает новый текущий генератор, т.е. + <varname>gen</varname>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "getsd"</term> + <listitem> + <para> + <code>S = grand("getsd")</code> получает текущее состояние + (текущие семена) текущего основного генератора. + <varname>S</varname> задаётся в виде вектор-столбца (целочисленных + значений) с количеством элементов <literal>625</literal> для + <literal>"mt"</literal> (первое значение является индексом в + интервале <literal>[1,624]</literal>), <literal>4</literal> для + <literal>"kiss"</literal>, <literal>2</literal> для + <literal>"clcg2"</literal>, <literal>40</literal> для + <literal>"fsultra"</literal>, <literal>4</literal> для + <literal>"clcg4"</literal> (для последнего вы получите текущее + состояние текущего виртуального генератора) и + <literal>1</literal> для <literal>"urand"</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "setsd"</term> + <listitem> + <para> + <code>grand("setsd", S)</code> и <code>grand("setsd", s1[, s2, s3, s4])</code> устанавливают состояние текущего основного генератора + (несколько семян): + </para> + <variablelist> + <varlistentry> + <term>для mt</term> + <listitem> + <para> + <varname>S</varname>является вектор-столбцом целых чисел с количеством элементов <literal>625</literal> + (значение первого элемента вектора является индексом и должно быть в интервале <literal>[1,624]</literal>, а + значения остальных <literal>624</literal> элементов должны лежать в интервале + <literal>[0,2^32)</literal>), но не должны быть все нулями); более простая инициализация может быть + сделана с помощью только одного целого числа <varname>s1</varname> (<varname>s1</varname> должно + лежать в интервале <literal>[0,2^32)</literal>); + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>для kiss</term> + <listitem> + <para> + должны быть указаны четыре целых числа <varname>s1</varname>, <varname>s2</varname>, + <varname>s3</varname>, <varname>s4</varname> на интервале <literal>[0,2^32)</literal>; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>для clcg2</term> + <listitem> + <para> + должны быть указаны два целых числа <varname>s1</varname> на интервале + <literal>[1,2^31-86]</literal> и <varname>s2</varname> на интервале <literal>[1,2^31-250]</literal>; + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>для clcg4</term> + <listitem> + <para> + требуются четыре целых числа <varname>s1</varname> на + интервале <literal>[1,2^31-2]</literal>, <varname>s2</varname> на интервале <literal>[1,2^31-106]</literal>, <varname>s3</varname> + на интервале <literal>[1,2^31-226]</literal>, <varname>s4</varname> на интервале + <literal>[1,2^31-326]</literal>; + </para> + <para> + <caution> + Предостережение: с clcg4 вы устанавливаете семена текущего виртуального генератора, но вы можете + потерять синхронизацию между ним и другими виртуальными генераторами (т.е. не гарантируется, + что генерируемая последовательность не перекрывается с генерируемой последовательностью + другого виртуального генератора) => вместо этого используйте опцию "setall". + </caution> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>для urand</term> + <listitem> + <para> + должно быть указано одно целое число <varname>s1</varname> на интервале <literal>[0,2^31)</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>для fsultra</term> + <listitem> + <para> + <varname>S</varname> является вектором целых чисел, состоящий из 40 элементов (первый элемент является + индексом и должен быть на интервале <literal>[0,37]</literal>, второй элемент является + флагом (0 или 1), третий элемент является целым числом на интервале <literal>[1,2^32[</literal>, а 37 + остальных целых чисел должны быть на интервале <literal>[0,2^32[</literal>. Более простая (и + рекомендованная) инициализация может быть сделана с помощью двух целых чисел <varname>s1</varname> и + <varname>s2</varname> на интервале <literal>[0,2^32[</literal>. + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "phr2sd"</term> + <listitem> + <para> + для заданной фразы <varname>phrase</varname> (символьной строки) + <code>Sd = grand("phr2sd", phrase)</code> генерирует вектор + <varname>Sd</varname> размером 1 на 2, который может + использоваться в качестве семени для изменения состояния + основного генератора (изначально подходил для clcg2). + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Опции, специфичные для clcg4</title> + <para> + Генератор clcg4 может использоваться как и остальные генераторы, но у него + есть то преимущество, что он может быть разделён на несколько + (<literal>101</literal>) виртуальных генераторов последовательности которых не + перекрываются (когда вы используете классический генератор, то вы можете + изменить исходное состояние (семена) для того, чтобы получить другую + последовательность, но не гарантируется, что вы получите абсолютно другую + последовательность). Каждому виртуальному генератору соответствует + последовательность из <literal>2^72</literal> значений, которая далее делится + на <literal>V=2^31</literal> сегментов (или блоков) длиной + <literal>W=2^41</literal>. Есть возможность вернуть заданный виртуальный + генератор в начало последовательности или в начало текущего сегмента или + перейти прямо к следующему сегменту. Можно также изменить исходное состояние + (семя) генератора <literal>0</literal> с помощью опции + <literal>"setall"</literal>, которая затем изменит также исходное состояние + остальных виртуальных генераторов так, чтобы получить синхронизацию, т.е. в + функции нескольких исходных состояний генератора <literal>0</literal> исходные + состояния генераторов <literal>1...100</literal> пересчитываются так, чтобы + получить <literal>101</literal> неперекрывающуюся последовательность. + </para> + <variablelist> + <varlistentry> + <term>действие = "setcgn"</term> + <listitem> + <para> + <code>grand("setcgn",G)</code> устанавливает текущий виртуальный + генератор для clcg4 (когда clcg4 установлен, то есть используется + виртуальный генератор (clcg4) номер <varname>G</varname>); + виртуальные генераторы clcg4 пронумерованы <literal>0, 1, ..., 100</literal> (а поэтому <varname>G</varname> должно быть целым + числом на интервале <literal>[0,100]</literal>); по умолчанию + текущим виртуальным генератором является <literal>0</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "getcgn"</term> + <listitem> + <para> + <code>S = grand("getcgn")</code> возвращает номер текущего виртуального генератора clcg4. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "initgn"</term> + <listitem> + <para> + <code>grand("initgn", I)</code> заново инициализирует состояние текущего виртуального генератора. + </para> + <variablelist> + <varlistentry> + <term>I = -1</term> + <listitem> + <para> + устанавливает состояние в его исходное семя. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 0</term> + <listitem> + <para> + устанавливает состояние в его последнее (предыдущее) семя (т. е. в начало текущего сегмента). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>I = 1</term> + <listitem> + <para> + устанавливает состояние на <literal>W</literal> значений нового семени от его последнего семени (т.е. + в начало следующего сегмента) и сбрасывает параметры текущего сегмента. + </para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "setall"</term> + <listitem> + <para> + <code>grand("setall", s1, s2, s3, s4)</code> устанавливает + исходное состояние генератора <literal>0</literal> в + <varname>s1</varname>, <varname>s2</varname>, + <varname>s3</varname>, <varname>s4</varname>. Исходные семена + других генераторов устанавливаются так, чтобы была синхронизация. + Об ограничениях на <varname>s1</varname>, <varname>s2</varname>, + <varname>s3</varname>, <varname>s4</varname> смотри действие + <literal>"setsd"</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>действие = "advnst"</term> + <listitem> + <para> + <code>grand("advnst", K)</code> перемещает состояние текущего + генератора вперёд на <literal>2^K</literal> значений и сбрасывает + исходное семя в это значение. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsection> + <refsection> + <title>Примеры</title> + <para> + В следующем примере мы генерируем случайные числа по различным законам + распределения и строим соответствующие гистограммы. + </para> + <programlisting role="example"><![CDATA[ +// Возвращает матрицу размером 400 на 800 случайных чисел +// по нормальному распределению, с матожиданием 0 и дисперсией 1. +R = grand(400,800,"nor",0,1); +scf(); +histplot(10,R); +xtitle("Случайные числа по нормальному закону распределения из функции grand","X","Частота"); +]]></programlisting> + <scilab:image localized="true"> + R = grand(400,800,"nor",0,1); + histplot(10,R); + xtitle("Случайные числа по нормальному закону распределения из функции grand","X","Частота"); + </scilab:image> + + <programlisting role="example"><![CDATA[ +// Возвращает матрицу размером 400 на 800 случайных чисел +// с равномерным распределением в [0,1). +R = grand(400,800,"def"); +scf(); +histplot(10,R); +xtitle("Случайные числа с равномерным распределением из функции grand","X","Частота"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400,800,"def"); + histplot(10,R); + xtitle("Случайные числа с равномерным распределением из функции grand","X","Частота"); + </scilab:image> + + <programlisting role="example"><![CDATA[ +// Возвращает матрицу размером 400 на 800 случайных чисел +// по распределению Пуассона и матожиданием, равным 5. +R = grand(400,800,"poi",5); +scf(); +histplot(10,R); +xtitle("Случайные числа по закону распределения Пуассона из grand","X","Частота"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(400,800,"poi",5); + histplot(10,R); + xtitle("Случайные числа по закону распределения Пуассона из grand","X","Частота"); + </scilab:image> + + <para> + В следующем примере мы генерируем случайные числа по экспоненциальному распределению, а затем сравниваем эмпирическое распределение с теоретическим. + </para> + <programlisting role="example"><![CDATA[ +lambda=1.6; +N=100000; +X = grand(1,N,"exp",lambda); +scf(); +classes = linspace(0,12,25); +histplot(classes,X) +x=linspace(0,12,25); +y = (1/lambda)*exp(-(1/lambda)*x); +plot(x,y,"ro-"); +legend(["Эксперимент" "Теория"]); +xtitle("Случайные числа по экспоненциальному закону распределения из функции grand","X","Частота"); + ]]></programlisting> + <scilab:image localized="true"> + lambda=1.6; + N=100000; + X = grand(1,N,"exp",lambda); + classes = linspace(0,12,25); + histplot(classes,X) + x=linspace(0,12,25); + y = (1/lambda)*exp(-(1/lambda)*x); + plot(x,y,"ro-"); + legend(["Эксперимент" "Теория"]); + xtitle("Случайные числа по экспоненциальному закону распределения из функции grand","X","Частота"); + </scilab:image> + <para> + В следующем примере мы генерируем случайные числа по закону гамма- + распределения, а затем сравниваем эмпирическое распределение с теоретическим. + </para> + <programlisting role="example"><![CDATA[ +N=10000; +A=10; +B=4; +R=grand(1,N,"gam",A,B); +XS=gsort(R,"g","i")'; +PS=(1:N)'/N; +P=cdfgam("PQ",XS,A*ones(XS),B*ones(XS)); +scf(); +plot(XS,PS,"b-"); // Эмпирическое распределение +plot(XS,P,"r-"); // Теоретическое распределение +legend(["Эксперимент" "Теория"]); +xtitle("Интегральная функция распределения случайных чисел по закону гамма-распределения","X","F"); +]]></programlisting> + <scilab:image localized="true"> + N=10000; + A=10; + B=4; + R=grand(1,N,"gam",A,B); + XS=gsort(R,"g","i")'; + PS=(1:N)'/N; + P=cdfgam("PQ",XS,A*ones(XS),B*ones(XS)); + scf(); + plot(XS,PS,"b-"); // Эмпирическое распределение + plot(XS,P,"r-"); // Теоретическое распределение + legend(["Эксперимент" "Теория"]); + xtitle("Интегральная функция распределения случайных чисел по закону гамма-распределения","X","F"); + </scilab:image> + <para> + В следующем примере мы генерируем 10 случайных целых чисел в интервале + <literal>[1,365]</literal>. + </para> + <programlisting role="example"><![CDATA[ +grand(10,1,"uin",1,365) + ]]></programlisting> + <para> + В следующем примере мы генерируем <literal>12</literal> перестановок набора + чисел <literal>[1, 2, ..., 7]</literal>. Эти <literal>12</literal> + перестановок сохраняются столбец за столбцом. + </para> + <programlisting role="example"><![CDATA[ +grand(12,"prm",(1:7)') + ]]></programlisting> + <para> + В следующем примере мы формируем гиперматрицу случайных чисел с "нормальным" распределением размерами <varname>10</varname> на <varname>10</varname> на <varname>10</varname> и строим гистограммы. Показываются первый и последний слои. + </para> + <programlisting role="example"><![CDATA[ +// Возвращает гиперматрицу случайных чисел с нормальным +// распределением, мат. ожидание 0 и среднеквадратичное отклонение 1, // размерами 10 на 10 на 10. +// Показаны только первый и последний слои. +R = grand(10,10,10,"nor",0,1); +subplot(1,2,1) +hist3d(R(:,:,1)); +xtitle("Слой 1"); +subplot(1,2,2) +hist3d(R(:,:,10)); +xtitle("Слой 10"); + ]]></programlisting> + <scilab:image localized="true"> + R = grand(10,10,10,"nor",0,1); + subplot(1,2,1) + hist3d(R(:,:,1)); + xtitle("Слой 1"); + subplot(1,2,2) + hist3d(R(:,:,10)); + xtitle("Слой 10"); + </scilab:image> + </refsection> + <refsection> + <title>Получение более или менее предсказуемых чисел</title> + <para> + Генераторы псевдослучайных чисел основаны на детерминированных + последовательностях. Для того, чтобы получить повторное воспроизведение + моделирования, исходное семя генератора равно такой константе, что + последовательность будет оставаться одной и той же от одной сессии к другой. + Следовательно, по умолчанию, первые числа, производимые функцией + <function>grand</function>, всегда одни и те же. + </para> + <para> + В некоторых ситуациях мы можем захотеть инициализировать семя генератора для + того, чтобы получить менее предсказуемые числа. В этом случае мы можем + инициализировать семя с помощью выходного значения функции + <function>getdate</function>: + </para> + <programlisting role="example"><![CDATA[ +n=getdate("s"); +grand("setsd",n) + ]]></programlisting> + </refsection> + <refsection> + <title>Тестовый пример для clcg4</title> + <para> + Пример необходимости возможности разделения clcg4 следующий. Сравниваются два + статистических метода по данным разного размера. Первый является + бутстреп-методом и считается точным при использовании меньшего количества данных, + чем второй метод, который использует только грубую силу. Для первого метода будет + генерироваться набор данных размером равномерно распределённым между + <literal>25</literal> и <literal>50</literal>. Затем будет генерироваться и + анализироваться набор данных определённого размера. Второй метод будет + выбирать размер набора данных между <literal>100</literal> и + <literal>200</literal>, генерировать данные и анализировать их. Этот процесс + будет повторяться <literal>1000</literal> раз. Для уменьшения разброса мы + хотим, чтобы числа, используемые в этих двух методах были одинаковыми для + каждого из <literal>1000</literal> сравнений. Но второй метод будет + использовать больше случайных чисел, чем первый метод и без этого пакета + синхронизация была бы затруднительна. С clcg4 это легко. Используем генератор + <literal>0</literal> для получения размера выборки для метода один и генератор + <literal>1</literal> для получения данных. Затем сбрасываем состояние к + начальному текущего блока и делаем то же самое для второго метода. Это + гарантирует, что исходные данные для второго метода те же, что использовались + в первом методе. Когда они оба закончатся, передвигаем вперёд блок для обоих + генераторов. + </para> + </refsection> + <refsection role="see also"> + <title>Смотрите также</title> + <simplelist type="inline"> + <member> + <link linkend="rand">rand</link> + </member> + <member> + <link linkend="sprand">sprand</link> + </member> + <member> + <link linkend="ssrand">ssrand</link> + </member> + </simplelist> + </refsection> +</refentry> diff --git a/modules/randlib/includes/clcg4.h b/modules/randlib/includes/clcg4.h new file mode 100755 index 000000000..575319cea --- /dev/null +++ b/modules/randlib/includes/clcg4.h @@ -0,0 +1,35 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef H_CLCG4_H +#define H_CLCG4_H + +#include "dynlib_randlib.h" + +#define Maxgen 100 + +typedef enum {InitialSeed, LastSeed, NewSeed} SeedType; + +RANDLIB_IMPEXP int set_seed_clcg4(int g, double s0, double s1, double s2, double s3); + +RANDLIB_IMPEXP void get_state_clcg4(int g, double s[4]); + +RANDLIB_IMPEXP void init_generator_clcg4(int g, SeedType Where); + +RANDLIB_IMPEXP void advance_state_clcg4(int g, int k); + +RANDLIB_IMPEXP int set_initial_seed_clcg4(double s0, double s1, double s2, double s3); + +RANDLIB_IMPEXP unsigned int clcg4(int g); + +#endif diff --git a/modules/randlib/includes/dynlib_randlib.h b/modules/randlib/includes/dynlib_randlib.h new file mode 100755 index 000000000..9ca961b68 --- /dev/null +++ b/modules/randlib/includes/dynlib_randlib.h @@ -0,0 +1,28 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) DIGITEO - 2009 - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +*/ + +/*--------------------------------------------------------------------------*/ +#ifndef __DYNLIB_RANDLIB_H__ +#define __DYNLIB_RANDLIB_H__ + +#ifdef _MSC_VER +#ifdef RANDLIB_EXPORTS +#define RANDLIB_IMPEXP __declspec(dllexport) +#else +#define RANDLIB_IMPEXP __declspec(dllimport) +#endif +#else +#define RANDLIB_IMPEXP +#endif + +#endif /* __DYNLIB_RANDLIB_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/randlib/includes/grand.h b/modules/randlib/includes/grand.h new file mode 100755 index 000000000..8bd5e363c --- /dev/null +++ b/modules/randlib/includes/grand.h @@ -0,0 +1,47 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef SCI_GRAND +#define SCI_GRAND + +#include "dynlib_randlib.h" +#include "machine.h" + +RANDLIB_IMPEXP int C2F(setgmn) (double *meanv, double *covm, int *ldcovm, int *p, double *parm, int *ierr); +RANDLIB_IMPEXP double C2F(genbet) (double *aa, double *bb); +RANDLIB_IMPEXP double C2F(genchi) (double *df); +RANDLIB_IMPEXP double C2F(genexp) (double *av); +RANDLIB_IMPEXP double C2F(genf) (double *dfn, double *dfd); +RANDLIB_IMPEXP double C2F(gengam) (double *a, double *r__); +RANDLIB_IMPEXP double C2F(gennch) (double *df, double *xnonc); +RANDLIB_IMPEXP double C2F(gennf) (double *dfn, double *dfd, double *xnonc); +RANDLIB_IMPEXP double C2F(gennor) (double *av, double *sd); +RANDLIB_IMPEXP double C2F(sdot) (int *n, double *sx, int *incx, double *sy, int *incy); +RANDLIB_IMPEXP double C2F(sexpo) (void); +RANDLIB_IMPEXP double C2F(sgamma) (double *a); +RANDLIB_IMPEXP double C2F(snorm) (void); +RANDLIB_IMPEXP double igngeom(double p); +RANDLIB_IMPEXP int C2F(genmn) (double *parm, double *x, double *work); +RANDLIB_IMPEXP int C2F(genmul) (int *n, double *p, int *ncat, int *ix); +RANDLIB_IMPEXP int C2F(genprm) (double *array, int *larray); +RANDLIB_IMPEXP int C2F(ignbin) (int *n, double *pp); +RANDLIB_IMPEXP int C2F(ignnbn) (int *n, double *p); +RANDLIB_IMPEXP int C2F(ignpoi) (double *mu); +RANDLIB_IMPEXP int C2F(phrtsd) (char *phrase, int *phrasel, int *seed1, int *seed2, int phrase_len); +RANDLIB_IMPEXP int C2F(spofa) (double *a, int *lda, int *n, int *info); +RANDLIB_IMPEXP double C2F(ranf)(void); +RANDLIB_IMPEXP double ignlgi(void); +RANDLIB_IMPEXP double C2F(ignuin)(double *a, double *b); + +#endif /** SCI_GRAND **/ + diff --git a/modules/randlib/includes/gw_randlib.h b/modules/randlib/includes/gw_randlib.h new file mode 100755 index 000000000..6b9ca650e --- /dev/null +++ b/modules/randlib/includes/gw_randlib.h @@ -0,0 +1,24 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Allan CORNET <allan.cornet@inria.fr> + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __GW_RANDLIB_H__ +#define __GW_RANDLIB_H__ +/*--------------------------------------------------------------------------*/ +#include "dynlib_randlib.h" +/*--------------------------------------------------------------------------*/ +RANDLIB_IMPEXP int gw_randlib(void); +/*--------------------------------------------------------------------------*/ +RANDLIB_IMPEXP int sci_Rand(char *fname, unsigned long fname_len); +/*--------------------------------------------------------------------------*/ +#endif /* __GW_RANDLIB_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/randlib/includes/others_generators.h b/modules/randlib/includes/others_generators.h new file mode 100755 index 000000000..54f756e77 --- /dev/null +++ b/modules/randlib/includes/others_generators.h @@ -0,0 +1,50 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef SCI_OTHER_GEN +#define SCI_OTHER_GEN + +#include "dynlib_randlib.h" + +/* header for the Mersenne Twister */ +RANDLIB_IMPEXP unsigned long int randmt(void); +RANDLIB_IMPEXP int set_state_mt_simple(double s); +RANDLIB_IMPEXP int set_state_mt(double seed_array[]); +RANDLIB_IMPEXP void get_state_mt(double state[]); + +/* header for kiss */ +RANDLIB_IMPEXP unsigned long int kiss(void); +RANDLIB_IMPEXP int set_state_kiss(double g1, double g2, double g3, double g4); +RANDLIB_IMPEXP void get_state_kiss(double g[]); + +/* header for clcg2 */ +RANDLIB_IMPEXP unsigned long int clcg2(void); +RANDLIB_IMPEXP int set_state_clcg2(double g1, double g2); +RANDLIB_IMPEXP void get_state_clcg2(double g[]); + +/* header for scilab urand */ +RANDLIB_IMPEXP unsigned long int urandc(void); +RANDLIB_IMPEXP int set_state_urand(double g); +RANDLIB_IMPEXP void get_state_urand(double g[]); + +/* header for scilab fsultra */ +RANDLIB_IMPEXP unsigned long int fsultra(void); +RANDLIB_IMPEXP int set_state_fsultra(double g[]); +RANDLIB_IMPEXP int set_state_fsultra_simple(double g1, double g2); +RANDLIB_IMPEXP void get_state_fsultra(double g[]); + +#endif /** SCI_OTHER_GEN **/ + + + + diff --git a/modules/randlib/libscirandlib-algo.la b/modules/randlib/libscirandlib-algo.la new file mode 100755 index 000000000..7689ab5a8 --- /dev/null +++ b/modules/randlib/libscirandlib-algo.la @@ -0,0 +1,41 @@ +# libscirandlib-algo.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='' + +# The name of the static archive. +old_library='libscirandlib-algo.a' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' -lpthread -ldl -lcurses -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libscirandlib-algo. +current= +age= +revision= + +# Is this an already installed library? +installed=no + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='' diff --git a/modules/randlib/libscirandlib.la b/modules/randlib/libscirandlib.la new file mode 100755 index 000000000..eeaccf5e3 --- /dev/null +++ b/modules/randlib/libscirandlib.la @@ -0,0 +1,41 @@ +# libscirandlib.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libscirandlib.so.5' + +# Names of this library. +library_names='libscirandlib.so.5.5.2 libscirandlib.so.5 libscirandlib.so' + +# The name of the static archive. +old_library='' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' -lpthread -ldl -lcurses -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libscirandlib. +current=10 +age=5 +revision=2 + +# Is this an already installed library? +installed=no + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib/scilab' diff --git a/modules/randlib/license.txt b/modules/randlib/license.txt new file mode 100755 index 000000000..6915f0067 --- /dev/null +++ b/modules/randlib/license.txt @@ -0,0 +1,61 @@ +Copyright: +Copyright (c) 2008 - DIGITEO +Copyright (c) 1989-2008 - INRIA +Copyright (c) 1989-2007 - ENPC +Copyright (c) Bruno Pincon + +License: +This module must be used under the terms of the CeCILL. +This module file is licensed as described in the file COPYING, which +you should have received as part of this distribution. The terms +are also available at +http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + + +mt: +=== + +File: src/c/mt.c + +Copyright: +1997, 1999 Makoto Matsumoto and Takuji Nishimura. + +License: +Artistic license + +Freemat: +======== + +File: src/c/{ignbin.c, genbet.c, ignpoi.c, sgamma.c, sexpo.c} + +Copyright: +2002-2004 Samit Basu +1997-2002, Makoto Matsumoto and Takuji Nishimura + +License: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +kiss: +===== + +File: src/c/kiss.c + +Copyright: +G. Marsaglia + +License: +Public domain + diff --git a/modules/randlib/locales/ca_ES.po b/modules/randlib/locales/ca_ES.po new file mode 100755 index 000000000..394160449 --- /dev/null +++ b/modules/randlib/locales/ca_ES.po @@ -0,0 +1,508 @@ +# Catalan translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-04-19 18:15+0000\n" +"Last-Translator: Marc Coll Carrillo <Unknown>\n" +"Language-Team: Catalan <ca@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: ca\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: El nombre d'arguments d'entrada és incorrecte: N'hi ha d'haver %d per a " +"l'opció '%s'.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: El nombre d'arguments de sortida és incorrecte: N'hi ha d'haver %d per a " +"l'opció '%s'.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "L'opció %s afecta només al generador clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: El nombre d'arguments d'entrada és incorrecte: N'hi ha d'haver %d per a " +"l'opció '%s'.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: El nombre d'arguments d'entrada és incorrecte: N'hi ha d'haver %d per a " +"'%s' amb el generador %s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: L'argument d'entrada té valors incorrectes: Ha de ser un vector de %d o " +"%d valors per a %s.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: El nombre d'arguments d'entrada és incorrecte: Han de ser %d o %d per a " +"l'opció '%s' amb el generador %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: El nombre d'arguments d'entrada és incorrecte: Han de ser %d per a " +"l'opció '%s' amb el generador %s o %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: El nombre d'arguments d'entrada és incorrecte: Han de ser %d per a " +"l'opció '%s' amb el generador %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: El nombre d'arguments de sortida és incorrecte: Han de ser %d per a " +"l'opció '%s'.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: L'opció %s només afecta al generador %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "L'opció %s només afecta al generador %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Aquesta informació només té a veure amb el generador clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +msgid "Missing A and B for beta law\n" +msgstr "Falten la A i la B per a la llei beta\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" +"%s: L'argument d'entrada té una mida incorrecta: Ha de ser un escalar per a " +"%s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A o B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Falten el Dfn i el Dfd per a la llei F\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Els graus de llibertat no són positius\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Falten la N i la P per a la llei Multinomial\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s: L'argument d'entrada té una mida incorrecta: Ha de ser un vector " +"columna.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Sum of P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Falten el Av i el Sd per a la llei Normal\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "Falten el Low i el High per a la llei Uniforme Real\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "" +"%s: L'argument d'entrada és d'un tipus incorrecte: Ha de ser un escalar.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Falten el Low i el High per a la llei Uniforme entera\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a i b han de ser enters amb (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: L'argument d'entrada té un valor incorrecte: Hi ha d'haver un número de " +"simulació aleatòria.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Falta el vector per a la permutació aleatòria\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Falten la N i la P per a la llei Binomial Negativa\n" + +msgid "P is not in [0,1]\n" +msgstr "P no és al rang [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Falten la N i la P per a la llei Binomial\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Falten el Mean i el Cov per a la llei Normal multivariant\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" +"%s: L'argument d'entrada és d'un tipus incorrecte: Ha de ser un vector " +"columna.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s: L'argument d'entrada és d'un tipus incorrecte: Ha de ser una matriu " +"quadrada.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: Els arguments d'entrada són d'un tipus incorrecte: El Mean i el Cov " +"tenen dimensions incompatibles\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "%s: Els arguments d'entrada: El Mean i el Cov estan buits.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Falta la matriu P i la X0 per a la cadena de Markov\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +msgid "X0 is empty\n" +msgstr "X0 és buida\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "La suma de P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: El nombre d'arguments d'entrada és incorrecte.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Falten el Df i el Xnonc per a la llei chi-quadrada no-central\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 o XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Falten el Dfn, el Dfd i el Xnonc per a la llei F no-central\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 o DF <= 0.0 o Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Falta el Df per a la llei chi-quadrada\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Falta el Av per a la llei de Poisson\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Falta la p per a la llei geomètrica\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s: L'argument d'entrada té un valor incorrecte: Ha de ser entre '%s' i %d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Falta el Av per a la llei exponencial\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: L'argument d'entrada %s té un valor incorrecte.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Valors incorrectes per a clcg2, han de ser enters amb s1 al rang [1, " +"2147483562]\n" +" i s2 al rang [1, 2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" Valors incorrectes per a clcg4, han de ser enters amb s1 al rang [1, " +"2147483646]\n" +" s2 al rang [1, 2147483542]\n" +" s3 al rang [1, 2147483422]\n" +" s4 al rang [1, 2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Valors incorrectes per a fsultra, han de ser enters dins el rang [0, 2^32-" +"1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"El primer component de l'estat fsultra, ha de ser un enter dins el rang [0, " +"%d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"El segon component de l'estat fsultra, ha de ser 0 o 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"El tercer component de l'estat fsultra, ha de ser un enter dins el rang [1, " +"2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "" +"Valors incorrectes per a kiss, han de ser enters dins el rang [0,2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "" +"Valors incorrectes per a mt, ha de ser un enter dins el rang [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "" +"El primer component de l'estat mt, ha de ser un enter dins el rang [0, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Valor incorrecte per a urand, ha de ser un enter dins el rang [0, " +"2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "La interfície randlib del Scilab no està instal·lada.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Simulació d'una variable aleatòria binomial" + +msgid "Simulation" +msgstr "Simulació" + +msgid "Theory" +msgstr "Teoria" + +msgid "Simulation of a discrete random variable" +msgstr "Simulació d'una variable aleatòria discreta" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +msgid "Simulation of a Erlang random variable" +msgstr "" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "" + +msgid "p must be < 1" +msgstr "" + +msgid "Simulation of a geometric random variable" +msgstr "" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "Aleatori" + +msgid "binomial random variable" +msgstr "variable aleatòria binomial" + +msgid "discrete random variable" +msgstr "variable aleatòria discreta" + +msgid "discrete uniform random variable" +msgstr "variable aleatòria discreta uniforme" + +msgid "geometric random variable" +msgstr "variable aleatòria geomètrica" + +msgid "Poisson random variable" +msgstr "Variable aleatòria de Poisson" + +msgid "Exponential random variable" +msgstr "Variable aleatòria exponencial" + +msgid "Weibull random variable" +msgstr "Variable aleatòria de Weibull" + +msgid "Hyper geometric random variable" +msgstr "Variable aleatòria hipergeomètrica" + +msgid "Erlang random variable" +msgstr "Variable aleatòria d'Erlang" + +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/locales/cs_CZ.po b/modules/randlib/locales/cs_CZ.po new file mode 100755 index 000000000..98e4995f9 --- /dev/null +++ b/modules/randlib/locales/cs_CZ.po @@ -0,0 +1,493 @@ +# Czech translation for scilab +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2013-06-30 20:12+0000\n" +"Last-Translator: Zbyněk Schwarz <Unknown>\n" +"Language-Team: Czech <cs@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Špatný počet vstupních argumentů: očekáváno %d s možností '%s'.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "%s: Špatný počet vstupních argumentů: Očekáváno %d možnost '%s'.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "Možnost %s ovlivňuje pouze generátor clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: Špatný počet vstupních argumentů: Očekáváno %d s možností '%s'.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "%s: Špatný typ vstupního argumentu #%d: Očekáván skalár.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: Špatný počet vstupních argumentů: Očekáváno %d pro '%s' s generátorem " +"%s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: Špatné hodnoty pro vstupní argument: Očekáván vektor hodnot %d nebo %d " +"pro %s.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "%s: Špatná velikost vstupního argumentu #%d: Očekáváno %dx%d.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: Špatný počet vstupních argumentů: Očekáváno %d nebo %d pro možnost '%s' " +"s generátorem %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: Špatný počet vstupních argumentů: Očekáváno %d pro možnost '%s' s " +"generátorem %s nebo %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: Špatný počet vstupních argumentů: Očekáváno %d pro možnost '%s' s " +"generátorem %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Špatný počet vstupních argumentů: Očekáváno %d s možností '%s'.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: Možnost %s ovlivňuje pouze generátor %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" +"%s: Špatná hodnota vstupního argumentu #%d: Očekáváno %d, %d nebo %d.\n" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "Možnost %s ovlivňuje pouze generátor %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "%s: Špatná hodnota vstupního argumentu #%d: Musí být mezi %d a %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: Špatná hodnota vstupního argumentu #%d: Musí být > %d.\n" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Tato informace se týká pouze generátoru clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" +"%s: Špatná hodnota vstupního argumentu #%d: očekáváno '%s', '%s', '%s', " +"'%s', '%s' nebo '%s'.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "%s: Špatný typ vstupního argumentu #%d: Očekáván řetězec.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" +"%s: Špatná hodnota vstupního argumentu #%d: Očekáván kladný skalár.\n" + +msgid "Missing A and B for beta law\n" +msgstr "Chybí A a B pro beta zákon\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "%s: Špatná velikost vstupního argumentu: Očekáván skalár pro %s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A nebo B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Chybí Dfn a Dfd pro F zákon\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Stupně volnosti nekladné\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" +"%s: Špatná hodnota vstupního argumentu #%d: Musí být číslo náhodné " +"odchylky.\n" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Chybí N a P pro MULtinomický zákon\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s: Špatná velikost vstupního argumentu: Očekáván sloupcový vektor.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Suma P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "Chybí tvar a sazba pro Gammův zákon\n" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 nebo R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Chybí Av a Sd pro Normální zákon\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "Chybí Low a High pro Rovnoměrný Reálný zákon\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s: Špatný typ vstupního argumentu: Očekáván skalár.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "%s: Špatný typ vstupního argumentu. Očekáváno Low < High.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Chybí Low a High pro Rovnoměrný celočíselný zákon\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a a b musí být celá čísla s (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: Špatná hodnota vstupního argumentu: Očekáván počet náhodných simulací.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Chybí vektor pro náhodnou permutaci\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Chybí N a P pro Záporný Binomický zákon\n" + +msgid "P is not in [0,1]\n" +msgstr "P není ve [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Chybí N a P pro Binomický zákon\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" +"%s: Špatná hodnota vstupního argumentu #%d: Musí být číslo náhodné " +"simulace.\n" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Chybí Mean a Cov pro Vícerozměrný Normální zákon\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "%s: Špatný typ vstupního argumentu: Očekáván sloupcový vektor.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "%s: Špatný typ vstupního argumentu: Očekávána čtvercová matice.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: Špatný typ vstupních argumentů: Mean a Cov mají nekompatibilní rozměry\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: Špatná velikost vstupních argumentů: Mean a Cov mají prázdnou velkost.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Chybějící matice P a X0 pro Markovův řetězec\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" +"%s: Špatný typ vstupního argumentu #%d: Očekávána čtvercová matice nebo " +"vektor řádku.\n" + +msgid "X0 is empty\n" +msgstr "X0 je prázdné\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "%s: X0(%d) musí být v rozsahu [1,%d[\n" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Suma P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: Špatný počet vstupních argumentů.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Chybí Df a Xnonc pro nestředový zákon chi kvadrátu\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 nebo XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Chybí Dfn, Dfd a Xnonc pro nestředový F zákon\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 nebo DF <= 0.0 nebo Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Chybí DF pro zákon chi kvadrátu\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Chybí Av pro Poissonův zákon\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Chybí p pro Geometrický zákon\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "%s: Špatná hodnota vstupního argumentu: Musí být mezi '%s' a %d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Chybí Av pro exponenciální zákon\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: Špatná hodnota vstupního argumentu %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Špatná semínka pro clcg2, musí být celá čísla se s1 ve [1, 2147483647]\n" +" a s2 ve [1, 2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" špatné semínko pro clcg4, musí být celá čísla s s1 ve [1, 2147483646]\n" +" s2 ve [1, 2147483542]\n" +" s3 ve [1, 2147483422]\n" +" s4 ve [1, 2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "VAROVÁNÍ: %s\n" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Špatné semínko pro fsultra, musí být celá čísla ve [0, 2^32-1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"První komponenta stavu fsultra musí být celé číslo ve [0, %d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"Druhá komponenta stavu fsultra musí být 0 nebo 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"Třetí komponenta stavu fsultra musí být celé číslo ve [1, 2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "Špatné semínko pro kiss, musí být celá čísla ve [0,2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "Špatné semínko pro mt, musí být celé číslo ve [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "První komponenta mt stavu mt musí být celé číslo ve [1, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Špatné semínko pro urand, musí být celá čísla ve [0, 2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "Rozhraní Scilab randlib není nainstalováno.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Simulace náhodné dvojčlenné proměnné" + +msgid "Simulation" +msgstr "Simulace" + +msgid "Theory" +msgstr "Teorie" + +msgid "Simulation of a discrete random variable" +msgstr "Simulace diskrétní náhodné proměnné" + +msgid "Simulation of a discrete uniform random variable" +msgstr "Simulace diskrétní jednotné náhodné veličiny" + +msgid "Simulation of a Erlang random variable" +msgstr "Simulace Erlangovy náhodné proměnné" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "Třídy" + +msgid "p must be < 1" +msgstr "p musí být < 1" + +msgid "Simulation of a geometric random variable" +msgstr "Simulace geometrické náhodné proměnné" + +msgid "Simulation of a hyper geometric random variable" +msgstr "Simulace hyper geometrické náhodné proměnné" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "Náhodně" + +msgid "binomial random variable" +msgstr "náhodná dvojčlenná proměnná" + +msgid "discrete random variable" +msgstr "náhodná diskrétní proměnná" + +msgid "discrete uniform random variable" +msgstr "náhodná diskrétní jednotná proměnná" + +msgid "geometric random variable" +msgstr "náhodná geometrická proměnná" + +msgid "Poisson random variable" +msgstr "Náhodná poissonova proměnná" + +msgid "Exponential random variable" +msgstr "Náhodná exponenciální proměnná" + +msgid "Weibull random variable" +msgstr "Náhodná weibullova proměnná" + +msgid "Hyper geometric random variable" +msgstr "Náhodná hyper geometrická proměnná" + +msgid "Erlang random variable" +msgstr "Náhodná proměnná Erlang" + +msgid "Simulation of a Weibull random variable" +msgstr "Simulace Weibullovy náhodné proměnné" diff --git a/modules/randlib/locales/de_DE.po b/modules/randlib/locales/de_DE.po new file mode 100755 index 000000000..91c8647ae --- /dev/null +++ b/modules/randlib/locales/de_DE.po @@ -0,0 +1,486 @@ +# German translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-06-10 14:27+0000\n" +"Last-Translator: Jens Maucher <Unknown>\n" +"Language-Team: German <de@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: de\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: falsche Anzahl an Eingangsargumenten: %d mit der Option '%s' erwartet.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: falsche Anzahl an Ausgangsargumenten: %d mit der Option '%s' erwartet.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "Die %s Option beeinflußt den clcg4 Generator\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: falsche Anzahl an Eingangsargumenten: %d mit der Option '%s' erwartet.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: falsche Anzahl an Eingangsargumenten: %d für '%s' mit dem %s Generator " +"erwartet.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: falsche Werte für Eingangsargument: Vektor mit %d oder %d Werten für %s " +"erwartet.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: falsche Anzahl an Eingangsargumenten: %d oder %d für '%s' mit dem %s " +"Generator erwartet.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: falsche Anzahl an Eingangsargumenten: %d für '%s' Option mit dem %s oder " +"%s Generator erwartet.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: falsche Anzahl an Eingangsargumenten: %d erwartet für '%s' Option mit " +"dem %s Generator.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: falsche Anzahl an Ausgangsargumenten: %d erwartet mit der Option '%s'.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: die %s Option beeinflußt nur den %s Generator\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "Die %s Option beeinflußt nut den %s Generator\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Diese Information betrifft nur deb clcg4 Generator\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +msgid "Missing A and B for beta law\n" +msgstr "Fehlendes A und B für ß Gesetz\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "%s: falsche Größe für Eingangsargument: Skalar für %s erwartet.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A or B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Fehlendes Dfn und Dfd für F Gesetz\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Freiheitsgrade nicht positiv\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Fehlendes N und P für Multinominales Gesetz\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "%s: falsche Größe für Eingangsargument: Spaltenvektor erwartet.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Summe of P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 oder R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Fehlendes Av und Sd für normales Gesetz\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "fehlendes Minimum und Maximum für uniformes relles Gesetz\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s: falscher Typ für Eingangsargument: Skalar erwartet.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "%s: falscher Typ für Eingangsargument. Niedriger < Höher erwartet.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Fehlende untere und obere Grenze für uniformes Integrationsgesetz.\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "A und B müssen Integer mit (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: falscher Wert für Eingangsargument: Anzahl der Zufalls-Simulationen " +"erwartet.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Fehlender Vektor für zufällige Permutation\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Fehlendes N und P für negative binomische Formel\n" + +msgid "P is not in [0,1]\n" +msgstr "P ist nicht in [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Fehlendes N und P für binomische Formel\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Fehlender Ziel und Konvergenz für Multivariate-Mittel Formel\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "%s: falscher Typ für Eingangsargument: Spaltenvektor erwartet.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s: falscher Typ für Eingangsargument: quadratische Matrix erwartet.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: falscher Typ für Eingangsargument: Ziel und Komvergenz haben " +"inkompatible Dimensionen\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: falsche Größe für Eingangsargument: Ziel und Konvergenz haben " +"Nullgröße.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Fehlende P Matrix und XD für Markov Folge\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +msgid "X0 is empty\n" +msgstr "XD ist leer\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Summe von P(%d,1:%d)=%f~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: falsche Anzahl an EIngangsargumenten.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Fehlendes Df und Xnonc für nicht -zentrale chi-quadratische Formel\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 oder XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Fehlendes Dfn, Dfd und Xnonc für nicht-zentrale F Formel\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 oder DF <= 0.0 oder Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Fehlendes Df für chi-quadratische Formel\n" + +msgid "Rand: DF <= 0\n" +msgstr "Zufällig: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Fehlendes Av für Poisson Formel\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Fehlendes p für Geometrische Verteilung\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "%s: falscher Wert für Eingangsargument: muß zwischen '%s' und %d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Fehlendes Av für exponentielle Verteilung\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: falscher Wert für Eingangsargument %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Falsche Vorgabe für clcg2, muß eine Integerzahl mit s1 in [1, 2147483562]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" Falsche Vorgabe für clcg4, muß eine Integerzahl mit s1 in [1, 2147483562]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Falsche Vorgabe für fsultra, muß eine Integerzahl in [0, 2^32-1] sein.\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"Die erste Komponente des Zustands fsultra , muß ein Integer in [0,%d] sein\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"Die zweite Komponente des fsultra Status, muß eine 0 oder 1 sein.\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"Die dritte Komponente des Zustands fsultra, muß ein Integer in [1, 2^32-1] " +"sein.\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "Falsche Vorgabe für kiss, muß ein Integer in [0,2e32 -1] sein\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "Falsche Vorgabe für mt, muß ein Integer in [0,2^32-1] sein\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "" +"Die erste Komponente vom Zustand mt, muß ein Integer in [1,624] sein\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Falsche Vorgabe für urand, muß ein Integer in [0, 2147483647] sein\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "Scilab randlib Schnittstelle nicht installiert.\n" + +msgid "Simulation of a binomial random variable" +msgstr "" + +msgid "Simulation" +msgstr "Simulation" + +msgid "Theory" +msgstr "Theorie" + +msgid "Simulation of a discrete random variable" +msgstr "" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +msgid "Simulation of a Erlang random variable" +msgstr "" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "" + +msgid "p must be < 1" +msgstr "" + +msgid "Simulation of a geometric random variable" +msgstr "" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "Zufällig" + +msgid "binomial random variable" +msgstr "" + +msgid "discrete random variable" +msgstr "" + +msgid "discrete uniform random variable" +msgstr "" + +msgid "geometric random variable" +msgstr "" + +msgid "Poisson random variable" +msgstr "" + +msgid "Exponential random variable" +msgstr "" + +msgid "Weibull random variable" +msgstr "" + +msgid "Hyper geometric random variable" +msgstr "" + +msgid "Erlang random variable" +msgstr "" + +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/locales/es_ES.po b/modules/randlib/locales/es_ES.po new file mode 100755 index 000000000..f087af961 --- /dev/null +++ b/modules/randlib/locales/es_ES.po @@ -0,0 +1,513 @@ +# Spanish translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2011-10-22 15:55+0000\n" +"Last-Translator: Fido <Unknown>\n" +"Language-Team: Spanish <es@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: es\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban %d con opción " +"'%s'.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: Número incorrecto de argumentos de salida: Se esperaban %d con opción " +"'%s'.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "La opción %s afecta solo al generador clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban %d con opción " +"'%s'.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban %d para '%s' " +"con el generado %s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: Valores incorrectos para el argumento de entrada: Se esperaba un vector " +"de %d o %d valores para %s.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban %d o %d para la " +"opción '%s' con el generador %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban %d para la " +"opción '%s' con el generador %s o %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: Número incorrecto de argumentos de entrada: Se esperaban %d para la " +"opción '%s' con el generador %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Número incorrecto de argumentos de salida: Se esperaban %d para la " +"opción '%s'.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: La opción %s afecta solo al generador %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "La opción %s afecta solo al generador %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Esta información afecta solo al generador clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +msgid "Missing A and B for beta law\n" +msgstr "Faltan A y B para la ley beta\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" +"%s: Tamaño incorrecto para el argumento de entrada: Se esperaba un escalar " +"para %s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A o B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Faltan Dfn y Dfd para ley F\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Grados de libertad no-positivos\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Faltan N y P para ley Multinomial\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s: Tamaño incorrecto para el argumento de entrada: Se esperaba un vector " +"columna.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Sumatoria de P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 o R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Faltan Av y Sd para la ley Normal\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "Faltan Bajo y Alto para la ley Uniforme Real\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "" +"%s: Tipo incorrecto para el argumento de entrada: Se esperaba un escalar.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" +"%s: Tipo incorrecto para el argumento de entrada. Se esperaba Low < High.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Faltan Bajo y Alto para la ley Uniforme Entera\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a y b deben ser enteros con (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: Valor incorrecto para el argumento de entrada: Se esperaba el número de " +"simulación aleatorio.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Falta vector para permutación aleatoria\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Faltan N y P para la ley Binomial Negativa\n" + +msgid "P is not in [0,1]\n" +msgstr "P no está en [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Faltan N y P para la ley Binomial\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Falta Mean y Cov para la ley Normal Multivariable\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" +"%s: Tipo incorrecto para el argumento de entrada: Se esperaba un vector " +"columna.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s: Tipo incorrecto para el argumento de entrada: Se esperaba una matriz " +"cuadrada.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: Tipo incorrecto para el argumento de entrada: Mean y Cov tienen " +"dimensiones incompatibles\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: Tamaño incorrecto para el argumento de entrada: Mean y Cov son de tamaño " +"null.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Faltan la matriz P y X0 para la cadena Markov\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +msgid "X0 is empty\n" +msgstr "X0 está vacío\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Sumatoria de P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: Número incorrecto de argumento de entrada.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Faltan Df y Xnonc para la ley no-central Chi-Square\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 o XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Faltan Dfn, Dfd y Xnonc para la ley no-central F\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 o DF <= 0.0 o Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Falta Df para la ley Chi-Square\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Falta Av para la ley de Poisson\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Falta p para la ley geométrica\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s: Valor incorrecto para el argumento de entrada: Debe estar entre '%s' y " +"%d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Falta Av para la ley Exponencial\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: Valor incorrecto para el argumento de entrada %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Semillas malas para clcg2, deben ser enteros con s1 en el intervalo [1, " +"2147483562]\n" +" y s2 en el intervalo [1, " +"2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" semillas malas para clcg4, must deben ser enteros con s1 en el intervalo " +"[1, 2147483646]\n" +" s2 en el intervalo [1, " +"2147483542]\n" +" s3 en el intervalo [1, " +"2147483422]\n" +" s4 en el intervalo [1, " +"2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Semilla mala para fsultra, deben ser enteros del intervalo [0, 2^32-1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"El primer componente el estado fsultra, debe ser un entero del intervalo [0, " +"%d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"El segundo componente el estado fsultra, debe estar entre 0 y 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"El tercer componente el estado fsultra, debe ser un entero del intervalo [1, " +"2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "Semillas malas, deben ser enteros del intervalo [0,2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "Semilla mala para mt, debe ser un entero del intervalo [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "" +"El primer componente del estado mt, debe ser un entero del intervalo [1, " +"624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Semilla mala para urand, debe ser un entero del intervalo [0, 2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "La interfaz randlib de Scilab no está instalada.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Simulación de una variable aleatoria binomial" + +msgid "Simulation" +msgstr "Simulación" + +msgid "Theory" +msgstr "Teoría" + +msgid "Simulation of a discrete random variable" +msgstr "Simulación de una variable aleatoria discreta" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +msgid "Simulation of a Erlang random variable" +msgstr "" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "" + +msgid "p must be < 1" +msgstr "" + +msgid "Simulation of a geometric random variable" +msgstr "" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "Aleatorio" + +msgid "binomial random variable" +msgstr "Variable aleatoria binomial" + +msgid "discrete random variable" +msgstr "Variable aleatoria discreta" + +msgid "discrete uniform random variable" +msgstr "variable discreta aleatoria uniformemente distribuida" + +msgid "geometric random variable" +msgstr "Variable aleatoria geométrica" + +msgid "Poisson random variable" +msgstr "Variable aleatoria de Poisson" + +msgid "Exponential random variable" +msgstr "Variable aleatoria exponencial" + +msgid "Weibull random variable" +msgstr "Variable aleatoria de Weibull" + +msgid "Hyper geometric random variable" +msgstr "Variable aleatoria hipergeométrica" + +msgid "Erlang random variable" +msgstr "Variable aleatoria de Erlang" + +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/locales/fr_FR.po b/modules/randlib/locales/fr_FR.po new file mode 100755 index 000000000..e133454fc --- /dev/null +++ b/modules/randlib/locales/fr_FR.po @@ -0,0 +1,537 @@ +# French translation for scilab +# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2014-03-31 08:34+0000\n" +"Last-Translator: Vincent Couvert <Unknown>\n" +"Language-Team: French <fr@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: fr\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s : Nombre erroné d'argument(s) d'entrée : %d attendu(s) avec l'option " +"'%s'.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s : Nombre erroné d''argument(s) de sortie : %d attendu(s) avec l'option " +"'%s'.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "L'option %s affecte seulement le générateur clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s : Nombre erroné d'arguments d'entrée : %d attendu(s) avec l'option '%s'.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Un scalaire attendu.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s : Nombre erroné d'arguments d'entrée : %d attendus pour '%s' avec le " +"générateur %s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée : Un vecteur de %d ou %d valeurs " +"pour %s attendu.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée n°%d : %dx%d attendu.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s : Nombre erroné d'arguments d'entrée : %d ou %d attendus pour l'option " +"'%s' avec le générateur %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s : Nombre erroné d'arguments d'entrée : %d attendus pour l'option '%s' " +"avec le générateur %s ou %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s : Nombre erroné d'arguments d'entrée : %d attendus pour l'option '%s' " +"avec le générateur %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s : Nombre erroné d'argument de sortie : %d attendu avec l'option '%s'.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s : L'option %s affecte seulement le générateur %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : %d, %d ou %d attendu.\n" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "L'option %s affecte seulement le générateur %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Doit être entre %d et %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s : Valeur erronée de l'argument d'entrée n°%d : Doit être > %d.\n" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Cette information concerne seulement le générateur clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : '%s', '%s', '%s', '%s', " +"'%s' ou '%s' attendu.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : '%s' est inconnu.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Une chaîne de caractères " +"attendue.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Un scalaire positif " +"attendu.\n" + +msgid "Missing A and B for beta law\n" +msgstr "A et B manquants pour la loi bêta\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée : Un scalaire attendu pour " +"%s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A ou B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Dfn et Dfd manquants pour la loi F\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Degrés de liberté non positif\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Doit être le nombre de " +"valeurs aléatoires.\n" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "N et P manquants pour la loi MULtinomiale\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s : Dimension erronée de l'argument d'entrée : Un vecteur colonne attendu.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "N < 0\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Somme de P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "Paramètres de forme et d'intensité manquants pour la loi Gamma\n" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 ou R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Av et Sd manquants pour la loi Normale\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "" +"Bornes inférieure et supérieure manquantes pour la loi réelle uniforme\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s : Type erroné de l'argument d'entrée : Un scalaire attendu.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée : Borne inférieure < Borne " +"supérieure attendu.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "" +"Bornes inférieure et supérieure manquantes pour la loi uniforme entière\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a et b doivent être entiers avec (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée : Nombre de simulations " +"aléatoires attendu.\n" + +msgid "Missing vect for random permutation\n" +msgstr "vect manquant pour la permutation aléatoire\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée : Une matrice (pleine ou creuse) ou " +"une hypermatrice de réels, de complexes, d'entiers , de booléens, de chaînes " +"de caractères ou de polynômes attendue.\n" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "N et P manquants pour la loi Binomiale négative\n" + +msgid "P is not in [0,1]\n" +msgstr "P n'est pas dans [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "N et P manquants pour la loi Binomiale\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée n°%d : Doit être le nombre de " +"simulations aléatoires.\n" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Mean et Cov manquants pour la loi Normale Multivariée\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée : Un vecteur colonne attendu.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée : Une matrice carrée attendue.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s : Type erroné des arguments d'entrée : Mean et Cov ont des dimensions " +"incompatibles\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s : Dimension erronée des arguments d'entrée : Mean et Cov sont de taille " +"nulle.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s : Les matrices P et X0 sont manquantes pour la chaîne de Markov\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" +"%s : Type erroné de l'argument d'entrée n°%d : Une matrice carrée ou un " +"vecteur ligne attendu.\n" + +msgid "X0 is empty\n" +msgstr "X0 est vide\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "%s : X0(%d) doit être dans l'intervalle [1,%d[\n" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Somme de P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s : Nombre erroné d'argument(s) d'entrée.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Df et Xnonc manquants pour la loi du chi carré non centrée\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 ou XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Dfn, Dfd et Xnonc manquants pour la loi F non centrée\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 ou DF <= 0.0 ou Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Df manquant pour la loi du chi carré\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand : DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Av manquant pour la loi de Poisson\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "p manquant pour la loi Géométrique\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s : Valeur erronée de l'argument d'entrée : Doit être entre '%s' et %d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Av manquant pour la loi exponentielle\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s : Valeur erronée de l'argument d'entrée %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Souches erronées de clcg2, doit être des entiers avec s1 dans [1, " +"2147483562]\n" +" et s2 dans [1, " +"2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" Souches erronées de clcg4, doit être des entiers avec s1 dans [1, " +"2147483646]\n" +" s2 in [1, " +"2147483542]\n" +" s3 in [1, " +"2147483422]\n" +" s4 in [1, " +"2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "ATTENTION : %s\n" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" +"Vous avez peut-être perdu la synchronisation\n" +" entre le générateur virtuel %d et les autres.\n" +" Utilisez grand(\"setall\", s1, s2, s3, s4) pour la retrouver." + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Souche erronée de fsultra, doit être un entier dans l'intervalle [0, 2^32-" +"1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"La première composante de l'état fsultra doit être un entier dans " +"l'intervalle [0, %d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"La seconde composante de l'état fsultra doit être 0 ou 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"La troisième composante de l'état fsultra doit être un entier dans " +"l'intervalle [1, 2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "" +"Souches erronées de kiss, doivent être des entiers compris dans l'intervalle " +"[0,2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "" +"Souche erronée de mt, doit être un entier dans l'intervalle [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "" +"La première composante de l'état mt, doit être un entier dans l'intervalle " +"[1, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Souche erronée de urand, doit être un entier dans l'intervalle [0, " +"2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "L'interface randlib de Scilab n'est pas installée.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Simulation d'une variable aléatoire binomiale" + +msgid "Simulation" +msgstr "Simulation" + +msgid "Theory" +msgstr "Théorie" + +msgid "Simulation of a discrete random variable" +msgstr "Simulation d'une variable aléatoire discrète" + +msgid "Simulation of a discrete uniform random variable" +msgstr "Simulation d'une variable aléatoire uniforme discrète" + +msgid "Simulation of a Erlang random variable" +msgstr "Simulation d'une variable aléatoire selon la loi de Erlang" + +msgid "Simulation of an exponential random variable" +msgstr "Simulation d'une variable aléatoire exponentielle." + +msgid "Classes" +msgstr "Classes" + +msgid "p must be < 1" +msgstr "p doit être < 1" + +msgid "Simulation of a geometric random variable" +msgstr "Simulation d'une variable aléatoire géométrique" + +msgid "Simulation of a hyper geometric random variable" +msgstr "Simulation d'une variable aléatoire hypergéométrique" + +msgid "Simulation of a Poisson random variable" +msgstr "Simulation d'une variable aléatoire selon la loi de Poisson" + +msgid "Random" +msgstr "Aléatoire" + +msgid "binomial random variable" +msgstr "Variable aléatoire binomiale" + +msgid "discrete random variable" +msgstr "Variable aléatoire discrète" + +msgid "discrete uniform random variable" +msgstr "Variable aléatoire uniforme discrète" + +msgid "geometric random variable" +msgstr "Variable aléatoire géométrique" + +msgid "Poisson random variable" +msgstr "Variable aléatoire de Poisson" + +msgid "Exponential random variable" +msgstr "Variable aléatoire exponentielle" + +msgid "Weibull random variable" +msgstr "Variable aléatoire de Weibull" + +msgid "Hyper geometric random variable" +msgstr "Variable aléatoire hyper géométrique" + +msgid "Erlang random variable" +msgstr "Variable aléatoire de Erlang" + +msgid "Simulation of a Weibull random variable" +msgstr "Simulation d'une variable aléatoire selon la loi de Weibull" diff --git a/modules/randlib/locales/it_IT.po b/modules/randlib/locales/it_IT.po new file mode 100755 index 000000000..8dd56841a --- /dev/null +++ b/modules/randlib/locales/it_IT.po @@ -0,0 +1,532 @@ +# Italian translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2015-02-18 08:24+0000\n" +"Last-Translator: Carml <mighty.carml@gmail.com>\n" +"Language-Team: Italian <it@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: it\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Il numero di argomenti in ingresso è sbagliato: ne erano attesi %d con " +"opzione \"%s\".\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: Il numero di argomenti in uscita è sbagliato: ne erano attesi %d con " +"opzione \"%s\".\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "L'opzione %s riguarda solo il generatore clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: Il numero di argomenti in ingresso è sbagliato: ne erano attesi %d con " +"opzione \"%s\".\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era atteso uno " +"scalare.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: Il numero di argomenti in ingresso è sbagliato: ne erano attesi %d per " +"\"%s\" con il generatore \"%s\".\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: L'argomento in ingresso ha dei valori sbagliati: era atteso un vettore " +"di %d o %d valori per '\"%s\".\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha una dimensione sbagliata: era attesa " +"%dx%d.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: Il numero di argomenti in ingresso è sbagliato: era atteso %d o %d per " +"l'opzione '\"%s'\" con il generatore \"%s\".\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: era atteso %d per " +"l'opzione \"%s\" con il generatore %s o %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: Il numero degli argomenti in ingresso è sbagliato: era atteso %d per " +"l'opzione \"%s\" con il generatore %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Il numero degli argomenti in uscita è sbagliato: ne erano attesi %d con " +"opzione \"%s\".\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: L'opzione %s riguarda solo il generatore %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: era atteso %d, %d o " +"%d.\n" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "L'opzione %s riguarda solo il generatore %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: deve essere tra %d e " +"%d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: deve essere >%d.\n" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Questa informazione riguarda solo il generatore clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era atteso " +"''%s'',''%s'',''%s'',''%s'',''%s'' o ''%s''.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: \"%s\" è " +"sconosciuto.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una " +"stringa.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: era atteso uno " +"scalare positivo.\n" + +msgid "Missing A and B for beta law\n" +msgstr "Mancano A e B per la legge Beta\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" +"%s: Il primo argomento in ingresso ha una dimensione sbagliata: era atteso " +"uno scalare per %s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A or B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Mancano Dfn e Dfd per la legge F\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "I gradi di libertà non sono positivi\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Mancano N e P per la legge Multinomiale\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s: Il primo argomento in ingresso ha un valore sbagliato: era atteso un " +"vettore colonna.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Somma di P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "%s: Mancano la forma e il tasso per la legge Gamma\n" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Mancano Av e Sd per la legge Normale\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "Mancano Low e High per la legge Reale Uniforme\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "" +"%s: L'argomento in ingresso è di tipo sbagliato: era atteso uno scalare.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" +"%s: L'argomento in ingresso è di tipo sbagliato. Era atteso Low < High.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Mancano Low e High per la legge Intera Uniforme\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a e b devono essere interi con (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: L'argomento in ingresso ha un valore sbagliato: era atteso un numero " +"della simulazione casuale.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Manca vect per la permutazione casuale\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" +"%s: L'argomento in ingresso è di tipo sbagliato: era attesa una matrice " +"matrice (piena o sparsa) o una ipermatrice di valori reali, complessi, " +"interi, booleani, di stringhe o di polinomi.\n" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Mancano N e P per la legge Binomiale Negativa\n" + +msgid "P is not in [0,1]\n" +msgstr "P non è in [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Mancano N e P per la legge Binomiale\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" +"%s: L'argomento in ingresso #%d ha un valore sbagliato: deve essere il " +"numero della simulazione casuale.\n" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Mancano Mean e Cov per la legge Normale Multivariata\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" +"%s: L'argomento in ingresso è di tipo sbagliato: era atteso un vettore " +"colonna.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s: L'argomento in ingresso è di tipo sbagliato: era attesa una matrice " +"quadrata.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: Gli argomenti in ingresso sono di tipo sbagliato: Mean e Cov hanno " +"dimensioni non compatibili\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: Gli argomenti in ingresso hanno una dimensione: Mean e Cov sono di " +"dimensione nulla.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Mancano la matrice P e X0 per la catena di Markov\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" +"%s: L'argomento in ingresso #%d è di tipo sbagliato: era attesa una matrice " +"quadrata o un vettore riga.\n" + +msgid "X0 is empty\n" +msgstr "X0è vuoto\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "%s: X0(%d) deve essere nell'intervallo [1,%d[\n" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Somma di P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: Il numero degli argomenti in ingresso è sbagliato.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Mancano Df e Xnonc per la legge del Chi-quadro Non-centrale\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 or XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Mancano Dfn, Dfd e Xnonc la legge F Non-centrale\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 o DF <= 0.0 o Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Manca Df per la legge del Chi-quadro\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Manca Av per la legge di Poisson\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Manca p per la legge Geometrica\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s: L'argomento in ingresso ha un valore sbagliato: deve essere tra \"%s\" e " +"%d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Manca Av per la legge Esponenziale\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: L'argomento in ingresso %s ha un valore sbagliato.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"I semi per clcg2 sono sbagliati, devono essere interi con s1 in [1, " +"2147483562]\n" +" e s2 in [1, 2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" i semi per clcg4 sono sbagliati, devono essere interi con s1 in [1, " +"2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "ATTENZIONE: %s\n" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" +"attenzione potrebbe essersi persa la sincronizzazione\n" +" fra il generatore virtuale %d e gli altri.\n" +" Usare grand(\"setall\", s1, s2, s3, s4) per recuperarla." + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"I semi per fsultra sono sbagliati, devono essere interi in [0, 2^32-1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"La prima componente dello stato fsultra, deve essere un int in [0, %d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"La seconda componente dello stato fsultra, deve essere 0 o 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"La terza componente dello stato fsultra, deve essere un int in [1, 2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "I semi per kiss sono sbagliati, devono essere interi in [0,2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "C'è un seme sbagliato per mt, deve essere un int in [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "La prima componente dello stato mt, deve essere un int in [1, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"C'è un seme sbagliato per urand, deve essere un int in [0, 2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "L'interfaccia randlib di Scilab non è installata.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Simulazione di una variabile casuale binomiale" + +msgid "Simulation" +msgstr "Simulazione" + +msgid "Theory" +msgstr "Teoria" + +msgid "Simulation of a discrete random variable" +msgstr "Simulazione di una variabile casuale discreta" + +msgid "Simulation of a discrete uniform random variable" +msgstr "Simulazione di una variabile casuale uniforme discreta" + +msgid "Simulation of a Erlang random variable" +msgstr "Simulazione di una variabile casuale di Erlang" + +msgid "Simulation of an exponential random variable" +msgstr "Simulazione di una variabile casuale esponenziale" + +msgid "Classes" +msgstr "Classi" + +msgid "p must be < 1" +msgstr "p deve essere < 1" + +msgid "Simulation of a geometric random variable" +msgstr "Simulazione di una variabile casuale geometrica" + +msgid "Simulation of a hyper geometric random variable" +msgstr "Simulazione di una variabile casuale ipergeometrica" + +msgid "Simulation of a Poisson random variable" +msgstr "Simulazione di una variabile casuale di Poisson" + +msgid "Random" +msgstr "Casuale" + +msgid "binomial random variable" +msgstr "variabile casuale binomiale" + +msgid "discrete random variable" +msgstr "variabile casuale discreta" + +msgid "discrete uniform random variable" +msgstr "variabile casuale uniforme discreta" + +msgid "geometric random variable" +msgstr "variabile casuale geometrica" + +msgid "Poisson random variable" +msgstr "Variabile casuale di Poisson" + +msgid "Exponential random variable" +msgstr "Variabile casuale esponenziale" + +msgid "Weibull random variable" +msgstr "Variabile casuale di Weibull" + +msgid "Hyper geometric random variable" +msgstr "Variabile casuale iper-geometrica" + +msgid "Erlang random variable" +msgstr "Variabile casuale di Erlang" + +msgid "Simulation of a Weibull random variable" +msgstr "Simulazione di una variabile casuale di Weibull" diff --git a/modules/randlib/locales/ja_JP.po b/modules/randlib/locales/ja_JP.po new file mode 100755 index 000000000..98053384e --- /dev/null +++ b/modules/randlib/locales/ja_JP.po @@ -0,0 +1,516 @@ +# Japanese translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2014-03-30 14:12+0000\n" +"Last-Translator: Rui Hirokawa <Unknown>\n" +"Language-Team: Japanese <z-saito@guitar.ocn.ne.jp>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"X-Poedit-Country: Japan\n" +"Language: ja\n" +"X-Poedit-Language: Japanese\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "%1$s: 入力引数の数が間違っています: オプション '%3$s' では %2$d 個の引数を指定してください.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "%1$s: 出力引数の数が間違っています: '%3$s' オプションには %2$d 個の引数を指定してください.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "オプション %s は, clcg4 生成器専用です\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "%1$s: 入力引数の数が間違っています: オプション '%3$s' では %2$d 個の引数を指定してください.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "%s: 入力引数 #%d の型が間違っています: スカラーを指定してください.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "%1$s: 入力引数の数が間違っています: %4$s 生成器の '%3$s' には %2$d 個の引数を指定してください.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "%1$s: 入力引数の値が間違っています: %2$d のベクトルまたは %4$s の %3$d 値を指定してください.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "%s: 入力引数 #%d の大きさが間違っています: %dx%d を指定してください.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%1$s: 入力引数の数が間違っています: %5$s 生成器の '%4$s' オプションには %2$d または %3$d " +"個の引数を指定してください.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%1$s: 入力引数の数が間違っています: %4$s または %5$s 生成器の '%3$s' オプションには %2$d " +"個の引数を指定してください.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "%1$s: 入力引数の数が間違っています: %4$s 生成器のオプション '%3$s' には%2$d 個の引数を指定してください.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "%1$s: 出力引数の数が間違っています: '%3$s' オプションには %2$d 個の引数を指定してください.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: %s オプションは %s 生成器のみに作用します.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "%s: 入力引数 #%d の値が間違っています: %d, %d または %dを指定してください.\n" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "オプション %s は, %s 生成器専用です\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "%s: 入力引数 #%d の値が間違っています: %d および %d の間の値を指定してください.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: 入力引数 #%d の値が間違っています: %d より大きい値を指定してください.\n" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "この情報は clcg4 生成器にのみ関係します\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" +"%s: 入力引数 #%d の値が間違っています: '%s', '%s', '%s', '%s', '%s' または '%s' を指定してください.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "%s: 入力引数 #%d の値が間違っています: '%s' が未知です.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "%s: 入力引数 #%d の型が間違っています: 文字列を指定してください.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "%s: 入力引数 #%d の値が間違っています: 正のスカラーを指定してください.\n" + +msgid "Missing A and B for beta law\n" +msgstr "ベータ分布でAおよびBが指定されていません\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "%s: 入力引数の大きさが間違っています: %s にはスカラーを指定してください.\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 510 +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A または B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "F分布でDfnおよびDfdが指定されていません\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "自由度が正ではありません\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "%s: 入力引数 #%d の値が間違っています: 確率差異の数を指定してください.\n" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "多項分布でNおよびPが指定されていません\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "%s: 入力引数の大きさが間違っています: 列ベクトルを指定してください.\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 566 +# File: sci_gateway/c/sci_grand.c, line: 752 +# File: sci_gateway/c/sci_grand.c, line: 779 +msgid "N < 0\n" +msgstr "N < 0\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 571 +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 579 +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 584 +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 591 +msgid "Sum of P(i) > 1\n" +msgstr "Sum of P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "ガンマ法の shape と rate が指定されていません\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 617 +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "正規分布で平均(Av)と標準偏差(Sd)が指定されていません\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 642 +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "一様実数分布で下限(Low)および上限(High)が指定されていません\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s: 入力引数の型が間違っています: スカラーを指定してください.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "%s: 入力引数の型が間違っています. Low < High となるように指定してください.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "一様整数分布で下限(Low)および上限(High)が指定されていません\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 685 +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a と b は (b-a+1) <= 2147483561 の整数でなければなりません" + +# +# File: sci_gateway/c/sci_grand.c, line: 714 +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "%s: 入力引数で不正な値: ランダム・シュミレーションの数を想定します。\n" + +msgid "Missing vect for random permutation\n" +msgstr "ランダム置換でvectが指定されていません\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" +"%s: 入力引数の型が間違っています: 実数, 複素数, 整数, 論理値, 文字列または多項式の行列 (通常または疎行列) " +"またはハイパー行列を指定してください.\n" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "負の二項分布でNおよびPが指定されていません\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 747 +# File: sci_gateway/c/sci_grand.c, line: 774 +msgid "P is not in [0,1]\n" +msgstr "Pは、 [0,1]にありません\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "二項分布でNおよびPが指定されていません\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "%s: 入力引数 #%d の値が間違っています: ランダムシミュレーションの数を指定してください.\n" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "多変量正規分布で平均(Mean)と分散(Cov)が指定されていません\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "%s: 入力引数の型が間違っています: 列ベクトルを指定してください.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "%s: 入力引数の型が間違っています: 正方行列を指定してください.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "%s: 入力引数の型が間違っています: 平均(Mean)と分散(Cov)の次元が一致しません.\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "%s: 入力引数の大きさが間違っています: 平均(Mean)と分散(Cov)の大きさが NULL です.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: P行列 および マルコフ連鎖の X0 が指定されていません\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "%s: 入力引数 #%d の型が間違っています: 正方行列または行ベクトルを指定してください.\n" + +msgid "X0 is empty\n" +msgstr "X0が空です\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "%s: X0(%d)は [1,%d[ の範囲とする必要があります.\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 864 +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 869 +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 876 +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Sum of P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: 入力引数の数が間違っています.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "非中心カイ二乗分布でDfおよびXnonc が指定されていません\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 または XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "非中心F分布でDfn, Dfd および Xnonc が指定されていません\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 または DF <= 0.0 または Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "カイ二乗分布でDfが指定されていません\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 987 +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "ポアソン分布で平均(Av) が指定されていません\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 1007 +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "幾何学的分布でpが指定されていません\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "%s: 入力引数の値が間違っています: '%s' および %d の間で指定してください.\n" + +msgid "Missing Av for exponential law\n" +msgstr "指数分布で平均(Av) が指定されていません\n" + +# +# File: sci_gateway/c/sci_grand.c, line: 1049 +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: 入力引数 %s の値が間違っています.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"clcg2 のシードが間違っています. s1 には [1, 2147483562]の整数を指定してください.\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" clcg4 のシードが間違っています. 以下の値を指定してください.\n" +"s1 は [1, 2147483646] の範囲の整数\n" +"s2 は [1, 2147483542] の範囲の整数\n" +"s3 は [1, 2147483422] の範囲の整数\n" +"s4 は [1, 2147483322] の範囲の整数" + +#, c-format +msgid "WARNING: %s\n" +msgstr "警告: %s\n" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" +"仮想生成器 %d とその他の間の同期を失っている可能性がります.\n" +"回復したい場合, grand(\"setall\", s1, s2, s3, s4) を実行してください." + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"fsultra のシードが間違っています. [0, 2^32-1] の整数を指定してください.\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"fsultra 状態量の最初の要素は, [0, %d] の整数でなければなりません\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"fsultra 状態量の2番目の要素は, 0 または1 でなければなりません\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"fsultra 状態量の3番目の要素は, [1, 2^32-1] の整数でなければなりません\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "kiss のシードが間違っています. [0, 2^32-1] の整数を指定してください.\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "mt のシードが間違っています. [0, 2^32-1] の整数を指定してください.\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "mt状態量の最初の要素 は, [1, 624] の範囲の整数としてください.\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"urand のシードが間違っています. [0, 2147483647]の整数を指定してください.\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "Scilab randlibインターフェースがインストールされていません.\n" + +msgid "Simulation of a binomial random variable" +msgstr "二項乱数のシミュレーション" + +msgid "Simulation" +msgstr "シミュレーション" + +msgid "Theory" +msgstr "理論" + +msgid "Simulation of a discrete random variable" +msgstr "離散乱数のシミュレーション" + +msgid "Simulation of a discrete uniform random variable" +msgstr "離散一様確率変数のシミュレーション" + +msgid "Simulation of a Erlang random variable" +msgstr "Erlan確率変数のシミュレーション" + +msgid "Simulation of an exponential random variable" +msgstr "指数乱数のシミュレーション" + +msgid "Classes" +msgstr "クラス" + +msgid "p must be < 1" +msgstr "p は < 1 とする必要があります" + +msgid "Simulation of a geometric random variable" +msgstr "幾何学的確率変数のシミュレーション" + +msgid "Simulation of a hyper geometric random variable" +msgstr "ハイパー幾何学的確率変数のシミュレーション" + +msgid "Simulation of a Poisson random variable" +msgstr "ポワソンランダム変数のシミュレーション" + +# File: etc/randlib.start, line: 23 +msgid "Random" +msgstr "ランダム" + +msgid "binomial random variable" +msgstr "二項乱数" + +msgid "discrete random variable" +msgstr "離散乱数" + +msgid "discrete uniform random variable" +msgstr "離散一様乱数" + +msgid "geometric random variable" +msgstr "幾何乱数" + +msgid "Poisson random variable" +msgstr "ポワソン乱数" + +msgid "Exponential random variable" +msgstr "指数乱数" + +msgid "Weibull random variable" +msgstr "ワイブル乱数" + +msgid "Hyper geometric random variable" +msgstr "超幾何学的乱数" + +msgid "Erlang random variable" +msgstr "Erlang乱数" + +msgid "Simulation of a Weibull random variable" +msgstr "ワイブル確率変数のシミュレーション" diff --git a/modules/randlib/locales/pl_PL.po b/modules/randlib/locales/pl_PL.po new file mode 100755 index 000000000..79caddc81 --- /dev/null +++ b/modules/randlib/locales/pl_PL.po @@ -0,0 +1,499 @@ +# Polish translation for scilab +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2011-09-01 09:34+0000\n" +"Last-Translator: Scilab.team <Unknown>\n" +"Language-Team: Polish <pl@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: pl\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wejściowych: %d oczekiwana opcja z " +"'%s'.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wyjściowych: %d oczekiwana opcja '%s'.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "%s opcja dotyczy tylko generatora clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wejściowych: %d oczekiwana opcja z " +"'%s'.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wejściowych: %d oczekiwano dla '%s' z " +"generatora %s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: Nieprawidłowa wartość dla argumentu wejściowego: Oczekiwano wartości dla " +"wektora z %d lub %d %s .\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wejściowych: Oczekiwano %d lub %d dla " +"opcji '%s' z generatora '%s'.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wejściowych: Oczekiwano %d dla opcji " +"'%s' z generatora %s lub %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wejściowych: Oczekiwano %d dla opcji " +"'%s' z generatora %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Nieprawidłowa liczba argumentów wyjściowych: %d oczekiwana opcja z " +"'%s'.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: %s opcja dotyczy tylko generatora %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "%s opcja dotyczy tylko %s generatora\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Ta informacja dotyczy tylko generatora clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +msgid "Missing A and B for beta law\n" +msgstr "Brak A i B dla twierdzenia beta\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" +"%s: Nieprawidłowy rozmiar argumentu wejściowego: oczekiwany skalar dla %s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A lub B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Brak Dfn i Dfd dla prawa F\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Ujemne stopnie swobody\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Brak N i P dla prawa MULtinomial\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s: Nieprawidłowy rozmiar argumentu wejściowego: oczekiwany wektor " +"kolumnowy.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Suma P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 lub R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Brak Av i Sd dla prawa Normalnego\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "Brak niskich i wysokich jednolitych praw dla liczb rzeczywsistych\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s: Nieprawidłowy typ argumentu wejściowego: oczekiwany skalar.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Brak niskich i wysokich jednolitych praw dla liczb całkowitych\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a i b muszą być liczbami całkowitymi z (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: Nieprawidłowa wartość argumentu wejściowego: oczekiwana losowa liczba " +"symulacji.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Brak vect dla przypadkowej permutacji\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Brak N i P dla prawa Negative Binomial\n" + +msgid "P is not in [0,1]\n" +msgstr "P nie jest w [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Brak N i P dla prawa Binomial\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Brak średniej i Cov dla prawa Multivariate\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" +"%s: Nieprawidłowy typ argumentu wejściowego: oczekiwany wektor kolumnowy.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s: Nieprawidłowy typ argumentu wejściowego: oczekiwana macierz kwadratowa.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: Nieprawidłowy typ argumentu wejściowego: Średnia i Cov mają niezgodny " +"wymiar\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: Nieprawidłowy rozmiar argumentu wejściowego: średnie i Cov mają rozmiar " +"null.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Brak macierzy P i X0 dla łańcucha Markov\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +msgid "X0 is empty\n" +msgstr "X0 jest pusty\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Suma P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: Nieprawidłowa liczba argumentów wejściowych.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Brak Df i Xnonc dla prawa nie centralnego chi-square\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 lub XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Brak Dfn, Dfd i Xnonc dla nie centralnego prawa F\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 lub DF <= 0.0 lub Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Brak Df dla prawa chi-square\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Brak Av dla prawa Poisson'a\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Brak p dla prawa Geometric\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s: Nieprawidłowa wartość argumentu wejściowego: Musi być pomiędzy '%s' i " +"%d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Brak Av dla prawa exponential\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: Nieprawidłowa wartość argumentu wejściowego %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Złe zestawienia dla clcg2, muszą być liczbami całkowitymi z s1 w [1, " +"2147483562]\n" +" i s2 w [1, 2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" złe zestawienia dla clcg4, muszą być liczbami całkowitymi z s1 w [1, " +"2147483646]\n" +" s2 w [1, 2147483542]\n" +" s3 w [1, 2147483422]\n" +" s4 w [1, 2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Złe zestawienia dla fsultra, muszą być liczbami całkowitymi w [0, 2^32-1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"Pierwszy składnik z ustroju fsultra, musi być liczbą w [0, %d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"Drugim składnikiem z ustroju fsultra, musi być 0 lub 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"Trzeci składnik z ustroju fsultra, musi być liczbą w [1, 2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "Złe zestawienia dla kiss, musi być liczbą całkowitą w [0,2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "Złe zestawienia dla mt, musi być liczbą w [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "Pierwszy składnik z mt ustroju mt, musi być liczbą w [1, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Złe zestawienia dla urand, muszą być liczbami w [0, 2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "Scilab randlib interfejs nie jest zainstalowany\n" + +msgid "Simulation of a binomial random variable" +msgstr "" + +msgid "Simulation" +msgstr "" + +msgid "Theory" +msgstr "" + +msgid "Simulation of a discrete random variable" +msgstr "" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +msgid "Simulation of a Erlang random variable" +msgstr "" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "" + +msgid "p must be < 1" +msgstr "" + +msgid "Simulation of a geometric random variable" +msgstr "" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "Losowo" + +msgid "binomial random variable" +msgstr "" + +msgid "discrete random variable" +msgstr "" + +msgid "discrete uniform random variable" +msgstr "" + +msgid "geometric random variable" +msgstr "" + +msgid "Poisson random variable" +msgstr "" + +msgid "Exponential random variable" +msgstr "" + +msgid "Weibull random variable" +msgstr "" + +msgid "Hyper geometric random variable" +msgstr "" + +msgid "Erlang random variable" +msgstr "" + +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/locales/pt_BR.po b/modules/randlib/locales/pt_BR.po new file mode 100755 index 000000000..1aa96eed7 --- /dev/null +++ b/modules/randlib/locales/pt_BR.po @@ -0,0 +1,502 @@ +# Brazilian Portuguese translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2012-06-12 16:26+0000\n" +"Last-Translator: Roberto Coelho de Berredo <rcberredo@gmail.com>\n" +"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: pt_BR\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se %d com a " +"opção \"%s\".\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de saída: esperava-se %d com a opção " +"\"%s\".\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "A opção %s afeta apenas o gerador clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se %d com a " +"opção \"%s\".\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se %d para " +"\"%s\" com o gerador %s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: Valor incorreto para os argumentos de entrada: esperava-se um vetor de " +"%d ou %d valores para %s.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se %d ou %d para " +"a opção \"%s\" com o gerador %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se %d para a " +"opção \"%s\" com o gerador %s ou %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de entrada: esperava-se %d para a " +"opção \"%s\" com o gerador %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Quantidade incorreta de argumentos de saída: esperava-se %d com a opção " +"\"%s\".\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: A opção %s afeta apenas o gerador %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "A opção %s afeta apenas o gerador %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Esta informação refere-se apenas ao gerador clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +msgid "Missing A and B for beta law\n" +msgstr "Faltando A e B para a lei beta\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" +"%s: Tamanho incorreto para o argumento de entrada: esperava-se um escalar " +"para %s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A ou B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Faltando Dfn e Dfd para a lei F\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Graus de liberdade não-positivos\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Faltando N e P para a lei MULtinomial\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s: Tamanho incorreto para o argumento de entrada: esperava-se um vetor " +"coluna.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Soma de P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 ou R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Faltando Av e Sd para a lei Normal\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "Faltando Inferior e Superior para a lei Uniforme real\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "" +"%s: Tipo incorreto para o argumento de entrada: esperava-se um escalar.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "%s: Argumento de entrada incorreto: espera-se que Low < High.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Faltando Inferior e Superior para a lei Uniforme inteira\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a e b devem ser inteiros com (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: Valor incorreto para o argumento de entrada: esperava-se a quantidade de " +"simulações aleatórias.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Faltando vect para permutação aleatória\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Faltando N e P para a lei Binomial Negativa\n" + +msgid "P is not in [0,1]\n" +msgstr "P não está em [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Faltando N e P para a lei Binomial\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Faltando Mean e Cov para a lei Normal multivariada\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" +"%s: Tipo incorreto para o argumento de entrada: esperava-se um vetor " +"coluna.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s: Tipo incorreto para o argumento de entrada: esperava-se uma matriz " +"quadrada.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: Tipo incorreto para os argumentos de entrada: Mean e Cov possuem " +"dimensões incompatíveis\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: Tamanho incorreto para os argumentos de entrada: Mean e Cov possuem " +"tamanhos nulos.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Faltando a matriz P e X0 para a cadeia de Markov\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +msgid "X0 is empty\n" +msgstr "X0 é vazia\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "%s: X0(%d) deve estar no intervalo [1,%d[\n" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Soma de P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: Quantidade incorreta de argumentos de entrada.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Faltando Df e Xnonc para a lei do Chi-quadrado não-central\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 ou XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Faltando Dfn, Dfd e Xnonc para a lei F não-central\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 ou DF <= 0.0 ou Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Faltando Df para a lei do Chi-quadrado\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Faltando Av para a lei de Poisson\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Faltando p para a lei Geométrica\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s: Valor incorreto para o argumento de entrada: deve estar entre \"%s\" e " +"%d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Faltando Av para a lei exponencial\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: Valor incorreto para o argumento de entrada %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Sementes ruins para clcg2, devem ser inteiros com s1 em [1, 2147483562]\n" +" e s2 em [1, 2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" sementes ruins para clcg4: devem ser inteiros com s1 em [1, 2147483646]\n" +" s2 em [1, 2147483542]\n" +" s3 em [1, 2147483422]\n" +" s4 em [1, 2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Semente ruim para fsultra: os inteiros devem estar em [0, 2^32-1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"O primeiro componente do estado fsultra deve ser um inteiro em [0, %d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"O segundo componente do estado fsultra deve ser 0 ou 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"O terceiro componente do estado fsultra deve ser um inteiro em [1, 2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "Sementes ruins para kiss: devem ser inteiros em [0, 2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "Semente ruim para mt: deve ser um inteiro em [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "O primeiro componente do estado mt deve ser um inteiro em [1, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Semente ruim para urand: deve ser um inteiro em [0, 2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "A interface randlib do Scilab não está instalada.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Simulação de uma variável aleatória binomial" + +msgid "Simulation" +msgstr "Simulação" + +msgid "Theory" +msgstr "Teoria" + +msgid "Simulation of a discrete random variable" +msgstr "Simulação de uma variável aleatória discreta" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +msgid "Simulation of a Erlang random variable" +msgstr "" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "" + +msgid "p must be < 1" +msgstr "" + +msgid "Simulation of a geometric random variable" +msgstr "" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "Aleatório" + +msgid "binomial random variable" +msgstr "variável aleatória binomial" + +msgid "discrete random variable" +msgstr "variável aleatória discreta" + +msgid "discrete uniform random variable" +msgstr "variável aleatória uniforme discreta" + +msgid "geometric random variable" +msgstr "variável aleatória geométrica" + +msgid "Poisson random variable" +msgstr "Variável aleatória de Poisson" + +msgid "Exponential random variable" +msgstr "Variável aleatória exponencial" + +msgid "Weibull random variable" +msgstr "Variável aleatória de Weibull" + +msgid "Hyper geometric random variable" +msgstr "Variável aleatória hipergeométrica" + +msgid "Erlang random variable" +msgstr "Variável aleatória de Erlang" + +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/locales/randlib.pot b/modules/randlib/locales/randlib.pot new file mode 100755 index 000000000..2ea22bd7a --- /dev/null +++ b/modules/randlib/locales/randlib.pot @@ -0,0 +1,739 @@ +# Localization of the module randlib +# Please see in SCI/tools/localization for localization management +# Copyright (C) 2007-2008 - INRIA +# Copyright (C) 2008-2011 - DIGITEO +# Copyright (C) 2012-2014 - Scilab-Enterprises +# This file is distributed under the same license as the Scilab package. +# +msgid "" +msgstr "" +"Project-Id-Version: Scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"Last-Translator: Vincent COUVERT <vincent.couvert@scilab-enterprises.com>\n" +"Language-Team: Scilab Localization <localization@lists.scilab.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Revision-Date: 2015-03-27 13:54+0100\n" + +# File: sci_gateway/c/sci_grand.c, line: 156 +# File: sci_gateway/c/sci_grand.c, line: 511 +# File: sci_gateway/c/sci_grand.c, line: 571 +# File: sci_gateway/c/sci_grand.c, line: 1006 +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 161 +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 200 +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 204 +# File: sci_gateway/c/sci_grand.c, line: 420 +# File: sci_gateway/c/sci_grand.c, line: 446 +# File: sci_gateway/c/sci_grand.c, line: 469 +# File: sci_gateway/c/sci_grand.c, line: 492 +# File: sci_gateway/c/sci_grand.c, line: 529 +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 210 +# File: sci_gateway/c/sci_grand.c, line: 216 +# File: sci_gateway/c/sci_grand.c, line: 222 +# File: sci_gateway/c/sci_grand.c, line: 228 +# File: sci_gateway/c/sci_grand.c, line: 297 +# File: sci_gateway/c/sci_grand.c, line: 303 +# File: sci_gateway/c/sci_grand.c, line: 329 +# File: sci_gateway/c/sci_grand.c, line: 335 +# File: sci_gateway/c/sci_grand.c, line: 341 +# File: sci_gateway/c/sci_grand.c, line: 347 +# File: sci_gateway/c/sci_grand.c, line: 377 +# File: sci_gateway/c/sci_grand.c, line: 383 +# File: sci_gateway/c/sci_grand.c, line: 402 +# File: sci_gateway/c/sci_grand.c, line: 610 +# File: sci_gateway/c/sci_grand.c, line: 626 +# File: sci_gateway/c/sci_grand.c, line: 645 +# File: sci_gateway/c/sci_grand.c, line: 652 +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 249 +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 271 +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 282 +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 314 +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 323 +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 371 +# File: sci_gateway/c/sci_grand.c, line: 396 +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 425 +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 442 +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 452 +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 465 +# File: sci_gateway/c/sci_grand.c, line: 488 +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 475 +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 499 +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 516 +msgid "This information concerns only the clcg4 generator\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 559 +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 581 +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 660 +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 668 +# File: sci_gateway/c/sci_grand.c, line: 674 +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 709 +msgid "Missing A and B for beta law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 715 +# File: sci_gateway/c/sci_grand.c, line: 721 +# File: sci_gateway/c/sci_grand.c, line: 750 +# File: sci_gateway/c/sci_grand.c, line: 756 +# File: sci_gateway/c/sci_grand.c, line: 792 +# File: sci_gateway/c/sci_grand.c, line: 854 +# File: sci_gateway/c/sci_grand.c, line: 860 +# File: sci_gateway/c/sci_grand.c, line: 891 +# File: sci_gateway/c/sci_grand.c, line: 897 +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 729 +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 744 +msgid "Missing Dfn and Dfd for F law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 764 +msgid "Degrees of freedom nonpositive\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 780 +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 786 +msgid "Missing N and P for MULtinomial law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 798 +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 805 +# File: sci_gateway/c/sci_grand.c, line: 1110 +# File: sci_gateway/c/sci_grand.c, line: 1149 +msgid "N < 0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 810 +msgid "Ncat <= 1\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 818 +#, c-format +msgid "P(%d) < 0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 823 +#, c-format +msgid "P(%d) > 1\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 830 +msgid "Sum of P(i) > 1\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 848 +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 868 +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 885 +msgid "Missing Av and Sd for Normal law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 905 +msgid "SD < 0.0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 920 +msgid "Missing Low and High for Uniform Real law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 927 +# File: sci_gateway/c/sci_grand.c, line: 934 +# File: sci_gateway/c/sci_grand.c, line: 967 +# File: sci_gateway/c/sci_grand.c, line: 974 +# File: sci_gateway/c/sci_grand.c, line: 1091 +# File: sci_gateway/c/sci_grand.c, line: 1097 +# File: sci_gateway/c/sci_grand.c, line: 1130 +# File: sci_gateway/c/sci_grand.c, line: 1136 +# File: sci_gateway/c/sci_grand.c, line: 1340 +# File: sci_gateway/c/sci_grand.c, line: 1346 +# File: sci_gateway/c/sci_grand.c, line: 1375 +# File: sci_gateway/c/sci_grand.c, line: 1381 +# File: sci_gateway/c/sci_grand.c, line: 1387 +# File: sci_gateway/c/sci_grand.c, line: 1416 +# File: sci_gateway/c/sci_grand.c, line: 1445 +# File: sci_gateway/c/sci_grand.c, line: 1475 +# File: sci_gateway/c/sci_grand.c, line: 1505 +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 944 +# File: sci_gateway/c/sci_grand.c, line: 982 +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 959 +msgid "Missing Low and High for Uniform int law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 988 +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1024 +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1030 +msgid "Missing vect for random permutation\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1064 +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1085 +msgid "Missing N and P for Negative Binomial law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1105 +# File: sci_gateway/c/sci_grand.c, line: 1144 +msgid "P is not in [0,1]\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1124 +msgid "Missing N and P for Binomial law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1165 +# File: sci_gateway/c/sci_grand.c, line: 1219 +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1171 +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1177 +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1183 +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1188 +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1198 +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1225 +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1232 +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1238 +msgid "X0 is empty\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1245 +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1260 +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1265 +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1272 +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1316 +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1334 +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1352 +msgid "DF < 1 or XNONC < 0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1369 +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1393 +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1410 +msgid "Missing Df for chi-square law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1422 +msgid "Rand: DF <= 0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1439 +msgid "Missing Av for Poisson law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1451 +msgid "Av < 0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1469 +msgid "Missing p for Geometric law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1481 +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1499 +msgid "Missing Av for exponential law\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1511 +msgid "Av < 0.0\n" +msgstr "" + +# +# File: sci_gateway/c/sci_grand.c, line: 1526 +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "" + +# +# File: src/c/clcg2.c, line: 97 +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" + +# +# File: src/c/clcg4.c, line: 216 +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" + +# +# File: src/c/clcg4.c, line: 242 +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +# +# File: src/c/clcg4.c, line: 242 +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +# +# File: src/c/fsultra.c, line: 175 +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" + +# +# File: src/c/fsultra.c, line: 188 +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" + +# +# File: src/c/fsultra.c, line: 196 +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" + +# +# File: src/c/fsultra.c, line: 204 +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" + +# +# File: src/c/kiss.c, line: 71 +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "" + +# +# File: src/c/mt.c, line: 150 +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "" + +# +# File: src/c/mt.c, line: 177 +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "" + +# +# File: src/c/urand.c, line: 64 +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" + +# +# File: src/norandlib/norandlib.c, line: 20 +msgid "Scilab randlib interface not installed.\n" +msgstr "" + +# File: demos/binomial.dem.sce, line: 59 +msgid "Simulation of a binomial random variable" +msgstr "" + +# +# File: demos/binomial.dem.sce, line: 63 +# File: demos/discrete.dem.sce, line: 47 +# File: demos/discrete_uni.dem.sce, line: 39 +# File: demos/exp.dem.sce, line: 41 +# File: demos/geometric.dem.sce, line: 48 +# File: demos/poisson.dem.sce, line: 51 +msgid "Simulation" +msgstr "" + +# +# File: demos/binomial.dem.sce, line: 63 +# File: demos/discrete.dem.sce, line: 47 +# File: demos/discrete_uni.dem.sce, line: 39 +# File: demos/exp.dem.sce, line: 41 +# File: demos/geometric.dem.sce, line: 48 +# File: demos/poisson.dem.sce, line: 51 +msgid "Theory" +msgstr "" + +# +# File: demos/discrete.dem.sce, line: 43 +msgid "Simulation of a discrete random variable" +msgstr "" + +# +# File: demos/discrete_uni.dem.sce, line: 35 +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +# +# File: demos/erlang.dem.sce, line: 40 +msgid "Simulation of a Erlang random variable" +msgstr "" + +# +# File: demos/exp.dem.sce, line: 32 +msgid "Simulation of an exponential random variable" +msgstr "" + +# +# File: demos/exp.dem.sce, line: 33 +msgid "Classes" +msgstr "" + +# +# File: demos/geometric.dem.sce, line: 15 +msgid "p must be < 1" +msgstr "" + +# +# File: demos/geometric.dem.sce, line: 44 +msgid "Simulation of a geometric random variable" +msgstr "" + +# +# File: demos/hypergeom.dem.sce, line: 31 +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +# +# File: demos/poisson.dem.sce, line: 47 +msgid "Simulation of a Poisson random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 10 +msgid "Random" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 12 +msgid "binomial random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 13 +msgid "discrete random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 14 +msgid "discrete uniform random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 15 +msgid "geometric random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 16 +msgid "Poisson random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 17 +msgid "Exponential random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 18 +msgid "Weibull random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 19 +msgid "Hyper geometric random variable" +msgstr "" + +# +# File: demos/randlib.dem.gateway.sce, line: 20 +msgid "Erlang random variable" +msgstr "" + +# +# File: demos/weibull.dem.sce, line: 26 +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/locales/ru_RU.po b/modules/randlib/locales/ru_RU.po new file mode 100755 index 000000000..a799a0916 --- /dev/null +++ b/modules/randlib/locales/ru_RU.po @@ -0,0 +1,532 @@ +# Russian translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2015-03-01 15:31+0000\n" +"Last-Translator: Stanislav V. Kroter <krotersv@gmail.com>\n" +"Language-Team: Russian <ru@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: ru\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Неверное количество входных параметров: ожидалось %d при значении " +"параметра «%s».\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: Неверное количество выходных параметров: ожидалось %d при значении " +"параметра «%s».\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "Параметр %s влияет только на генератор clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: Неверное количество входных параметров: ожидалось %d при значении " +"параметра «%s».\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "%s: Неверный тип входного параметра №%d: ожидался скаляр.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: Неверное количество входных параметров: ожидалось %d при значении " +"параметра «%s» с генератором %s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: Неверное значение входного параметра: первый элемент вектора должен быть " +"в диапазоне [%d,%d] для генератора %s.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "%s: Неверный размер входного аргумента №%d: ожидался %dx%d.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: Неверное количество входных параметров: ожидалось %d или %d при значении " +"параметра «%s» с генератором %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: Неверное количество входных параметров: ожидалось %d при значении " +"параметра «%s» с генератором %s или %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: Неверное количество входных параметров: ожидалось %d при значении " +"параметра «%s» с генератором %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: Неверное количество выходных параметров: ожидалось %d при значении " +"параметра «%s».\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: Параметр %s влияет только на генератор %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" +"%s: Неверное значение входного аргумента №%d: ожидалось %d, %d или %d.\n" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "Параметр %s влияет только на генератор %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" +"%s: Неверное значение входного параметра №%d: должно быть между %d и %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "%s: Неверное значение входного параметра №%d: должно быть > %d.\n" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Эта информация относится только к генератору clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" +"%s: Неверное значение входного параметра №%d: ожидалось «%s», «%s», «%s», " +"«%s», «%s» или «%s».\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "%s: Неверное значение входного аргумента №%d: '%s' не известно.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "%s: Неверный тип входного параметра №%d: ожидалась строка.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" +"%s: Неверное значение входного аргумента №%d: ожидался положительный " +"скаляр.\n" + +msgid "Missing A and B for beta law\n" +msgstr "Отсутствуют A и B для бета-распределения\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "%s: Неверный размер входного параметра: ожидался скаляр для %s.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A или B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Отсутствуют Dfn и Dfd для F распределения\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Степени свободы не положительны\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" +"%s: Неверное значение входного аргумента №%d: должно быть число со случайным " +"отклонением.\n" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Отсутствуют N и P для полиномиального распределения\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "%s: Неверный размер входного параметра: ожидался вектор-столбец.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Сумма P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "Отсутствует shape и rate для Gamma-распределения\n" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 или R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Отсутствуют Av и Sd для нормального распределения\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "" +"Отсутствуют Low и High для равномерного распределения вещественных чисел\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s: Неверный тип входного параметра: ожидался скаляр.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "%s: Неверный тип входного параметра: ожидалось Low < High.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Отсутствуют Low и High для равномерного распределения целых чисел\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a и b должны быть целыми, (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: Неверное значение входного параметра: ожидалось количество случайных " +"испытаний.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Отсутствует vect для случайной перестановки\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" +"%s: Неверный тип входного аргумента: ожидалась матрица (полная или " +"разрежённая) или гиперматрица вещественных, комплексных, логических, " +"строковых или полиномиальных значений.\n" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Отсутствуют N и P для отрицательного биноминального распределения\n" + +msgid "P is not in [0,1]\n" +msgstr "P не в [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Отсутствуют N и P для биноминального распределения\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" +"%s: Неверное значение входного аргумента №%d: должно быть число случайной " +"симуляции.\n" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Отсутствуют Mean и Cov для многомерного нормального распределения\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "%s: Неверный тип входного параметра: ожидался вектор-столбец.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "%s: Неверный тип входного параметра: ожидалась квадратная матрица.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: Неверный тип входных параметров: несовместимые размерности Mean и Cov.\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: Неверный размер входных параметров: Mean и Cov нулевого размера.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Отсутствует матрица P и X0 для цепи Маркова\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" +"%s: Неверный тип входного аргумента №%d: ожидалась квадратная матрица или " +"вектор-строка.\n" + +msgid "X0 is empty\n" +msgstr "X0 пуст\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "%s: X0(%d) должна быть в диапазоне [1,%d[\n" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Сумма P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: Неверное количество входных параметров.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "Отсутствуют Df и Xnonc для нецентрального распределения хи-квадрат\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 или XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "Отсутствуют Dfn, Dfd и Xnonc для нецентрального F распределения\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0 или DF <= 0.0 или Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Отсутствует Df для распределения хи-квадрат\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Отсутствует Av для распределения Пуассона\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Отсутствует p для геометрического распределения\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s: Неверное значение входного параметра: ожидалось между «%s» и %d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Отсутствует Av для экпоненциального распределения\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: Неверное значение входного параметра %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Неверные начальные числа для clcg2, должны быть целыми в следующих " +"диапазонах:\n" +" s1 в диапазоне [1, " +"2147483562]\n" +" s2 в диапазоне [1, " +"2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" неверные начальные числа для clcg4, должны быть целыми в следующих " +"диапазонах:\n" +" s1 в диапазоне [1, " +"2147483646]\n" +" s2 в диапазоне [1, " +"2147483542]\n" +" s3 в диапазоне [1, " +"2147483422]\n" +" s4 в диапазоне [1, " +"2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "ВНИМАНИЕ: %s\n" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" +"примите к сведению, что вы можете потерять синхронизацию\n" +" между виртуальным генератором %d и другими.\n" +" Используйте grand(\"setall\", s1, s2, s3, s4), если хотите восстановить " +"её." + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Неверное начальное число для fsultra, должно быть целым в диапазоне [0, 2^32-" +"1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"Первый элемент вектора fsultra, должен быть целым числом в диапазоне [0, " +"%d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"Второй элемент вектора fsultra, должен быть 0 или 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"Третий элемент вектора fsultra, должен быть целым числом в диапазоне [1, " +"2^32-1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "" +"Неверное начальное число для kiss, должно быть целым в диапазоне [0, 2^32-" +"1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "" +"Неверное начальное число для mt, должно быть целым в диапазоне [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "Первый элемент вектора mt, должен быть целым в диапазоне [1, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Неверное начальное число для urand, должно быть целым в диапазоне [0, " +"2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "Интерфейс Scilab randlib не установлен.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Моделирование биномиальной случайной величины" + +msgid "Simulation" +msgstr "Моделирование" + +msgid "Theory" +msgstr "Теория" + +msgid "Simulation of a discrete random variable" +msgstr "Моделирование дискретной случайной величины" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" +"Моделирование случайной переменной по дискретному равномерному закону " +"распределения" + +msgid "Simulation of a Erlang random variable" +msgstr "Моделирование случайной переменной по закону распределения Эрланга" + +msgid "Simulation of an exponential random variable" +msgstr "Симуляция переменной по случайному экспоненциальному закону" + +msgid "Classes" +msgstr "Классы" + +msgid "p must be < 1" +msgstr "p должна быть < 1" + +msgid "Simulation of a geometric random variable" +msgstr "" +"Моделирование случайной переменной по геометрическому закону распределения" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" +"Моделирование случайной переменной по гипергеометрическому закону " +"распределения" + +msgid "Simulation of a Poisson random variable" +msgstr "Моделирование пуассоновской случайной переменной" + +msgid "Random" +msgstr "Случайные величины" + +msgid "binomial random variable" +msgstr "Переменная биномиального распределения случайной величины" + +msgid "discrete random variable" +msgstr "переменая дискретного распределения случайной величины" + +msgid "discrete uniform random variable" +msgstr "переменная дискретного равномерного распределения случайной величины" + +msgid "geometric random variable" +msgstr "переменная геометрического распределения случайной величины" + +msgid "Poisson random variable" +msgstr "Переменная распределения Пуассона случайной величины" + +msgid "Exponential random variable" +msgstr "Переменная экспоненциального распределения случайной величины" + +msgid "Weibull random variable" +msgstr "Переменная распределения Вейбулла случайной величины" + +msgid "Hyper geometric random variable" +msgstr "Переменная гипергеометрического распределения случайной величины" + +msgid "Erlang random variable" +msgstr "Переменная распределения Эрланга случайной величины" + +msgid "Simulation of a Weibull random variable" +msgstr "Моделирование случайной переменой по закону распределения Вейбулла" diff --git a/modules/randlib/locales/uk_UA.po b/modules/randlib/locales/uk_UA.po new file mode 100755 index 000000000..02b5410cf --- /dev/null +++ b/modules/randlib/locales/uk_UA.po @@ -0,0 +1,553 @@ +# Ukrainian translation for scilab +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the scilab package. +# +# FIRST AUTHOR <EMAIL@ADDRESS>, 2010. +# Yuri Chornoivan <yurchor@gmail.com>, 2010. +# Yuri Chornoivan <yurchor@ukr.net>, 2011. +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2014-03-29 18:27+0000\n" +"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n" +"Language-Team: Ukrainian <translation@linux.org.ua>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: uk\n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" +"%s: помилкова кількість вхідних параметрів: слід використовувати %d з " +"параметром «%s».\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" +"%s: помилкова кількість вихідних параметрів: мало бути %d для параметра " +"«%s».\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "Параметр %s стосується лише генератора clcg4\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" +"%s: помилкова кількість вхідних параметрів: слід використовувати %d з " +"параметром «%s».\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра №%d: слід використовувати скалярний " +"тип.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" +"%s: помилкова кількість вхідних параметрів: слід використовувати %d " +"параметрів, якщо вказано «%s» для генератора %s.\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" +"%s: помилкові значення вхідного параметра: слід використовувати вектор з %d " +"або %d значень для %s.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "%s: помилкова розмірність вхідного параметра №%d: мало бути %dx%d.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" +"%s: помилкова кількість вхідних параметрів: слід використовувати %d або %d " +"параметрів, якщо вказано параметр «%s» для генератора %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" +"%s: помилкова кількість вхідних параметрів: слід використовувати %d " +"параметрів, якщо вказано параметр «%s» для генератора %s або %s.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" +"%s: помилкова кількість вхідних параметрів: слід використовувати %d " +"параметрів, якщо вказано параметр «%s» для генератора %s.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" +"%s: помилкова кількість вихідних параметрів: слід використовувати %d з " +"параметром «%s».\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: параметр %s стосується лише генератора %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" +"%s: помилкове значення вхідного параметра №%d: мало бути %d, %d або %d.\n" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "Параметр %s стосується лише генератора %s\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" +"%s: помилкове значення вхідного параметра №%d: слід використовувати значення " +"між %d та %d.\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" +"%s: помилкове значення вхідного параметра №%d: слід використовувати > %d.\n" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "Ці дані стосуються лише генератора clcg4\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" +"%s: помилкове значення вхідного параметра №%d: слід використовувати «%s», " +"«%s», «%s», «%s», «%s» або «%s».\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "%s: помилкове значення вхідного параметра №%d: «%s» є невідомим.\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра №%d: слід використовувати тип " +"«string».\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" +"%s: помилкове значення вхідного параметра №%d: мало бути вказано додатне " +"скалярне значення.\n" + +msgid "Missing A and B for beta law\n" +msgstr "Не вказано A і B для закону бета розподілу\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" +"%s: помилкова розмірність вхідного параметра: для %s слід використовувати " +"число.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A або B < %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "Не вказано Dfn і Dfd для закону розподілу Фішера.\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "Кількість степенів свободи не є додатною\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" +"%s: помилкове значення вхідного параметра №%d: мало бути значення " +"випадкового відхилення.\n" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "Не вказано N і P для поліноміального закону розподілу\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" +"%s: помилковий розмір вхідного параметра: слід використовувати вектор-" +"стовпчик.\n" + +msgid "N < 0\n" +msgstr "N < 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat <= 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) < 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) > 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "Сума P(i) > 1\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "Не вказано параметри гамма-розподілу\n" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A <= 0.0 або R <= 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Не вказано Av та Sd для нормального закону розподілу\n" + +msgid "SD < 0.0\n" +msgstr "SD < 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "" +"Не вказано величин Low і High для рівномірного дійсного закону розподілу\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра: слід використовувати дійсне число.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра. нижня границя має бути меншою за " +"верхню.\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "" +"Не вказано величин Low і High для рівномірного цілочисельного закону " +"розподілу\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a і b мають бути цілими числами, такими, що (b-a+1) <= 2147483561" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" +"%s: помилкове значення вхідного параметра: слід вказати кількість " +"випробувань.\n" + +msgid "Missing vect for random permutation\n" +msgstr "Не вказано значення vect для випадкової перестановки\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра: мало бути використано матрицю " +"(заповнену або розріджену) або гіперматрицю з дійсних, комплексних, цілих, " +"булевих, рядкових або поліноміальних значень.\n" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Не вказано N і P для від’ємного біноміального розподілу\n" + +msgid "P is not in [0,1]\n" +msgstr "P не належить проміжку [0,1]\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Не вказано N і P для біноміального закону розподілу\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" +"%s: помилкове значення вхідного параметра №%d: мало бути значення випадкової " +"імітації.\n" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "" +"Не вказано Mean і Cov для багатовимірного нормального закону розподілу\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра: слід використовувати тип вектора-" +"стовпчика.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра: слід використовувати квадратну " +"матрицю.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" +"%s: помилковий тип вхідних параметрів: Mean і Cov мають несумісні " +"розмірності.\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" +"%s: помилкові розмірності вхідних параметрів: Mean і Cov мають нульову " +"розмірність.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: не вказано матриці P і X0 для ланцюжка Маркова\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" +"%s: помилковий тип вхідного параметра №%d: мало бути вказано квадратну " +"матрицю або вектор-рядок.\n" + +msgid "X0 is empty\n" +msgstr "X0 є порожнім\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "%s: X0(%d) має належати діапазону [1,%d[\n" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) < 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) > 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "Сума P(%d,1:%d)=%f ~= 1\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: помилкова кількість вхідних параметрів.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "" +"Не вказано Df і Xnonc для нецентрального закону хі-квадрат розподілу\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF < 1 або XNONC < 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "" +"Не вказано Dfn, Dfd та Xnonc для нецентрального закону розподілу Фішера.\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF < 1.0, або DF <= 0.0, або Xnonc < 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "Не вказано Df для закону хі-квадрат розподілу\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF <= 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Не вказано Av для закону розподілу Пуассона\n" + +msgid "Av < 0\n" +msgstr "Av < 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Не вказано p для геометричного закону розподілу\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" +"%s: помилкове значення вхідного параметра: слід використовувати значення між " +"«%s» та %d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "Не вказано Av для експоненційного закону розподілу\n" + +msgid "Av < 0.0\n" +msgstr "Av < 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: помилкове значення вхідного параметра %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"Помилкові початкові значення для clcg2, слід використовувати цілі числа для " +"s1 у діапазоні [1, 2147483562],\n" +" а для s2 у діапазоні [1, " +"2147483398]\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" помилкові початкові значення для clcg4, початковими значеннями мають бути " +"цілі числа у таких діапазонах: " +"для s1 у діапазоні [1, 2147483646]\n" +" для s2 у діапазоні [1, " +"2147483542]\n" +" для s3 у діапазоні [1, " +"2147483422]\n" +" для s4 у діапазоні [1, " +"2147483322]" + +#, c-format +msgid "WARNING: %s\n" +msgstr "ПОПЕРЕДЖЕННЯ: %s\n" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" +"Зауважте, що синхронізацію між віртуальним генератором %d\n" +" та іншими генераторами може бути втрачено.\n" +" Скористайтеся командою grand(\"setall\", s1, s2, s3, s4), щоб відновити " +"її." + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"Помилкове початкове значення для fsultra, слід використовувати цілі числа у " +"діапазоні [0, 2^32-1]\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"Першим компонент вектора fsultra має бути цілим числом у діапазоні [0, %d]\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"Другим компонентом вектора fsultra має бути 0 або 1\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"Третім компонентом вектора fsultra має бути ціле число у діапазоні [1, 2^32-" +"1]\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "" +"Помилкові початкові значення для kiss, слід використовувати цілі числа у " +"діапазоні [0,2^32-1]\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "" +"Помилкове початкове значення для mt, слід використовувати ціле число у " +"діапазоні [0, 2^32-1]\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "" +"Першим компонентом стану генератора Мерсена-Твістера mt має бути ціле число " +"у діапазоні [1, 624]\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"Помилкове початкове значення для urand, слід використовувати ціле число у " +"діапазоні [0, 2147483647]\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "Інтерфейс randlib Scilab не встановлено.\n" + +msgid "Simulation of a binomial random variable" +msgstr "Моделювання біноміально розподіленої випадкової величини" + +msgid "Simulation" +msgstr "Моделювання" + +msgid "Theory" +msgstr "Теорія" + +msgid "Simulation of a discrete random variable" +msgstr "Моделювання дискретної випадкової величини" + +msgid "Simulation of a discrete uniform random variable" +msgstr "Імітація дискретної випадкової величини з рівномірним розподілом" + +msgid "Simulation of a Erlang random variable" +msgstr "Імінтація випадкової величини з розподілом Ерланга" + +msgid "Simulation of an exponential random variable" +msgstr "Імітація випадкової величини з експоненційним розподілом" + +msgid "Classes" +msgstr "Класи" + +msgid "p must be < 1" +msgstr "p має бути < 1" + +msgid "Simulation of a geometric random variable" +msgstr "Імітація випадкової величини з геометричним розподілом" + +msgid "Simulation of a hyper geometric random variable" +msgstr "Імітація випадкової величини з гіпергеометричним розподілом" + +msgid "Simulation of a Poisson random variable" +msgstr "Імітація випадкової величини з розподілом Пуассона" + +msgid "Random" +msgstr "Випадкові величини" + +msgid "binomial random variable" +msgstr "біноміально розподілена випадкова величина" + +msgid "discrete random variable" +msgstr "дискретна випадкова величина" + +msgid "discrete uniform random variable" +msgstr "рівномірно розподілена дискретна випадкова величина" + +msgid "geometric random variable" +msgstr "геометрично розподілена випадкова величина" + +msgid "Poisson random variable" +msgstr "випадкова величина з розподілом Пуассона" + +msgid "Exponential random variable" +msgstr "Експоненційно розподілена випадкова величина" + +msgid "Weibull random variable" +msgstr "Випадкова величина з розподілом Вейбулла" + +msgid "Hyper geometric random variable" +msgstr "Випадкова величина з гіпергеометричним розподілом" + +msgid "Erlang random variable" +msgstr "Випадкова величина з розподілом Ерланга" + +msgid "Simulation of a Weibull random variable" +msgstr "Імітація випадкової величини з розподілом Вейбулла" diff --git a/modules/randlib/locales/zh_CN.po b/modules/randlib/locales/zh_CN.po new file mode 100755 index 000000000..0968cb66c --- /dev/null +++ b/modules/randlib/locales/zh_CN.po @@ -0,0 +1,449 @@ +# Simplified Chinese translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2009-10-29 05:45+0000\n" +"Last-Translator: Shiqi Yu <shiqi.yu@gmail.com>\n" +"Language-Team: Simplified Chinese <zh_CN@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: \n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +msgid "Missing A and B for beta law\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "" + +msgid "Degrees of freedom nonpositive\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "" + +msgid "N < 0\n" +msgstr "" + +msgid "Ncat <= 1\n" +msgstr "" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "" + +msgid "Sum of P(i) > 1\n" +msgstr "" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "" + +msgid "SD < 0.0\n" +msgstr "" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s:输入参数的类型错误:应该为标量。\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "" + +msgid "Missing vect for random permutation\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "" + +msgid "P is not in [0,1]\n" +msgstr "" + +msgid "Missing N and P for Binomial law\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +msgid "X0 is empty\n" +msgstr "" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "" + +msgid "Missing Df for chi-square law\n" +msgstr "" + +msgid "Rand: DF <= 0\n" +msgstr "" + +msgid "Missing Av for Poisson law\n" +msgstr "" + +msgid "Av < 0\n" +msgstr "" + +msgid "Missing p for Geometric law\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "" + +msgid "Missing Av for exponential law\n" +msgstr "" + +msgid "Av < 0.0\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" + +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" + +msgid "Scilab randlib interface not installed.\n" +msgstr "" + +msgid "Simulation of a binomial random variable" +msgstr "" + +msgid "Simulation" +msgstr "" + +msgid "Theory" +msgstr "" + +msgid "Simulation of a discrete random variable" +msgstr "" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +msgid "Simulation of a Erlang random variable" +msgstr "" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "" + +msgid "p must be < 1" +msgstr "" + +msgid "Simulation of a geometric random variable" +msgstr "" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "" + +msgid "binomial random variable" +msgstr "" + +msgid "discrete random variable" +msgstr "" + +msgid "discrete uniform random variable" +msgstr "" + +msgid "geometric random variable" +msgstr "" + +msgid "Poisson random variable" +msgstr "" + +msgid "Exponential random variable" +msgstr "" + +msgid "Weibull random variable" +msgstr "" + +msgid "Hyper geometric random variable" +msgstr "" + +msgid "Erlang random variable" +msgstr "" + +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/locales/zh_TW.po b/modules/randlib/locales/zh_TW.po new file mode 100755 index 000000000..4dd222140 --- /dev/null +++ b/modules/randlib/locales/zh_TW.po @@ -0,0 +1,470 @@ +# Traditional Chinese translation for scilab +# Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 +# This file is distributed under the same license as the scilab package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: scilab\n" +"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n" +"POT-Creation-Date: 2013-04-16 17:44+0100\n" +"PO-Revision-Date: 2011-09-01 09:52+0000\n" +"Last-Translator: Scilab.team <Unknown>\n" +"Language-Team: Traditional Chinese <zh_TW@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 17413)\n" +"Language: \n" + +#, c-format +msgid "%s: Wrong number of input argument: %d expected with option '%s'.\n" +msgstr "%s:輸入參數的個數錯誤: 指定 %d 不正常的選項 '%s' .\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected the option '%s'.\n" +msgstr "%s: 輸出參數個數錯誤: 指定 %d 不正常的選項 '%s'.\n" + +#, c-format +msgid "The %s option affects only the clcg4 generator\n" +msgstr "選項%s 僅針對 clcg4 產生器有作用\n" + +#, c-format +msgid "%s: Wrong number of input arguments: %d expected with option '%s'.\n" +msgstr "%s: 輸入參數數量有誤:%d才對 對於選項用'%s' .\n" + +#, c-format +msgid "%s: Wrong type for input argument #%d: Scalar expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' with the %s " +"generator.\n" +msgstr "%s: 輸入參數的數量錯誤: 指定 %d 個不正常的 %s 產生器與 %s\n" + +#, c-format +msgid "" +"%s: Wrong values for input argument: Vector of %d or %d values for %s " +"expected.\n" +msgstr "%s: 錯誤的輸入參數值: %d 的向量 或 %d 數值 %s 被指定.\n" + +#, c-format +msgid "%s: Wrong size for input argument #%d: %dx%d expected.\n" +msgstr "" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d or %d expected for '%s' option with " +"the %s generator.\n" +msgstr "%s: 輸入參數數量有誤:%d or%d才對 對於'%s' 選項用於%s 生成器.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: expected %d for '%s' option with the %s " +"or %s generator.\n" +msgstr "%s: 輸入參數的數量錯誤: 指定 %d 給 '%s' 選項與 %s 或 %s 產生器.\n" + +#, c-format +msgid "" +"%s: Wrong number of input arguments: %d expected for '%s' option with the %s " +"generator.\n" +msgstr "%s: 輸入參數數量有誤:%d才對 對於'%s' 選項用於%s 生成器.\n" + +#, c-format +msgid "%s: Wrong number of output argument: %d expected with option '%s'.\n" +msgstr "%s: 輸出參數的數量錯誤: %d 指定給選項 '%s'.\n" + +#, c-format +msgid "%s: The %s option affects only the %s generator\n" +msgstr "%s: %s 選項僅影響到 %s 產生器\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: %d, %d or %d expected.\n" +msgstr "" + +#, c-format +msgid "The %s option affects only the %s generator\n" +msgstr "%s 選項僅影響 %s 產生器\n" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be between %d and %d.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Must be > %d.\n" +msgstr "" + +msgid "This information concerns only the clcg4 generator\n" +msgstr "這個資訊僅對於 clcg4 產生器有用.\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' " +"expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: '%s' is unknown.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong type for input argument #%d: String expected.\n" +msgstr "" + +#, c-format +msgid "%s: Wrong value for input argument #%d: Positive scalar expected.\n" +msgstr "" + +msgid "Missing A and B for beta law\n" +msgstr "針對 beta law 找不到 A 和 B\n" + +#, c-format +msgid "%s: Wrong size for input argument: Scalar expected for %s.\n" +msgstr "%s: 輸入參數尺寸錯誤: 指定一個 %s 純量.\n" + +#, c-format +msgid "Rand(...,'bet',..): A or B < %f\n" +msgstr "Rand(...,'bet',..): A 或 B 小於 %f\n" + +msgid "Missing Dfn and Dfd for F law\n" +msgstr "對 F law 找不到 Dfn 和 Dfd\n" + +msgid "Degrees of freedom nonpositive\n" +msgstr "非正定自由度的階度\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"deviate.\n" +msgstr "" + +msgid "Missing N and P for MULtinomial law\n" +msgstr "MULtinomial 定則中缺乏 N 和 P\n" + +#, c-format +msgid "%s: Wrong size for input argument: Column vector expected.\n" +msgstr "%s: 輸入參數的尺寸錯誤: 應該為行向量.\n" + +msgid "N < 0\n" +msgstr "N 小於 0\n" + +msgid "Ncat <= 1\n" +msgstr "Ncat 小於等於 1\n" + +#, c-format +msgid "P(%d) < 0\n" +msgstr "P(%d) 小於 0\n" + +#, c-format +msgid "P(%d) > 1\n" +msgstr "P(%d) 大於 1\n" + +msgid "Sum of P(i) > 1\n" +msgstr "P(i) 小於 1 的和\n" + +msgid "Missing shape and rate for Gamma law\n" +msgstr "" + +msgid "grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n" +msgstr "grand(..'gam',A,R) : A 小於等於 0.0 或 R 小於等於 0.0\n" + +msgid "Missing Av and Sd for Normal law\n" +msgstr "Normal law 找不到 Av 和 Sd\n" + +msgid "SD < 0.0\n" +msgstr "SD 小於 0.0\n" + +msgid "Missing Low and High for Uniform Real law\n" +msgstr "Uniform Real law 中找不到 Low 和 High\n" + +#, c-format +msgid "%s: Wrong type for input argument: Scalar expected.\n" +msgstr "%s: 輸入參數資料型態錯誤: 應該是一個純量.\n" + +#, c-format +msgid "%s: Wrong type for input argument. Low < High expected.\n" +msgstr "%s:輸入參數形式錯誤:應該要 低 < 高 情況。\n" + +msgid "Missing Low and High for Uniform int law\n" +msgstr "Uniform int law 中找不到 Low 和 High\n" + +msgid "a and b must integers with (b-a+1) <= 2147483561" +msgstr "a 和 b 在 (b-a+1) <= 2147483561 中必須是整數" + +#, c-format +msgid "" +"%s: Wrong value for input argument: Number of random simulation expected.\n" +msgstr "%s: 輸入的參數值錯誤: 應該為 random simulation 隨機模擬 的個數.\n" + +msgid "Missing vect for random permutation\n" +msgstr "隨機排列中找不到 vect\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of " +"Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n" +msgstr "" + +msgid "Missing N and P for Negative Binomial law\n" +msgstr "Negative Binomial law 中找不到 N 和 P\n" + +msgid "P is not in [0,1]\n" +msgstr "P 不在 [0,1] 範圍中.\n" + +msgid "Missing N and P for Binomial law\n" +msgstr "Binomial law 中找不到 N 和 P\n" + +#, c-format +msgid "" +"%s: Wrong value for input argument #%d: Must be the number of random " +"simulation.\n" +msgstr "" + +msgid "Missing Mean and Cov for Multivariate Normal law\n" +msgstr "Multivariate Normal law 中找不到 Mean 和 Cov\n" + +#, c-format +msgid "%s: Wrong type for input argument: Column vector expected.\n" +msgstr "%s: 輸入參數的型態錯誤: 應該為 行向量.\n" + +#, c-format +msgid "%s: Wrong type for input argument: Square matrix expected.\n" +msgstr "%s: 輸入參數的型態錯誤: 應該為方形矩陣.\n" + +#, c-format +msgid "" +"%s: Wrong type for input arguments: Mean and Cov have incompatible " +"dimensions\n" +msgstr "%s: 輸入參數的型態錯誤: Mean 與 Cov 的維度不相容.\n" + +#, c-format +msgid "%s: Wrong size for input arguments: Mean and Cov are of null size.\n" +msgstr "%s: 輸入參數的尺寸錯誤: Mean 和 Cov 是一個空值.\n" + +#, c-format +msgid "%s: Missing P matrix and X0 for Markov chain\n" +msgstr "%s: Markov chain 馬可夫鍵中找不到 矩陣P 和 X0\n" + +#, c-format +msgid "" +"%s: Wrong type for input argument #%d: Square matrix or row vector " +"expected.\n" +msgstr "" + +msgid "X0 is empty\n" +msgstr "X0 是空的\n" + +#, c-format +msgid "%s: X0(%d) must be in the range [1,%d[\n" +msgstr "" + +#, c-format +msgid "P(%d,%d) < 0\n" +msgstr "P(%d,%d) 小於 0\n" + +#, c-format +msgid "P(%d,%d) > 1\n" +msgstr "P(%d,%d) 大於 1\n" + +#, c-format +msgid "Sum of P(%d,1:%d)=%f ~= 1\n" +msgstr "計算 P(%d, 1:%d)=%f ~= 1 的和\n" + +#, c-format +msgid "%s: Wrong number of input argument.\n" +msgstr "%s: 輸入參數的個數錯誤.\n" + +msgid "Missing Df and Xnonc for non-central chi-square law\n" +msgstr "non-central chi-square law 中找不到 Df 和 Xnonc\n" + +msgid "DF < 1 or XNONC < 0\n" +msgstr "DF 小於 1 或 XNONC 小於 0\n" + +msgid "Missing Dfn, Dfd and Xnonc for non-central F law\n" +msgstr "non-central F law 中找不到 Dfn, Dfd 和 Xnonc\n" + +msgid "DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n" +msgstr "DF 小於 1.0 或 DF 小於等於 0.0 或 Xnonc 小於 0.0\n" + +msgid "Missing Df for chi-square law\n" +msgstr "chi-square law 中找不到 Df\n" + +msgid "Rand: DF <= 0\n" +msgstr "Rand: DF 小於等於 0\n" + +msgid "Missing Av for Poisson law\n" +msgstr "Poisson law 中找不到 Av\n" + +msgid "Av < 0\n" +msgstr "Av 小於 0\n" + +msgid "Missing p for Geometric law\n" +msgstr "Geometric law 中找不到 p\n" + +#, c-format +msgid "%s: Wrong value for input argument: Must be between '%s' and %d.\n" +msgstr "%s: 輸入參數的數值錯誤: 必須介於 '%s' 和 %d.\n" + +msgid "Missing Av for exponential law\n" +msgstr "exponential law 指數 中找不到 Av\n" + +msgid "Av < 0.0\n" +msgstr "Av 小於 0.0\n" + +#, c-format +msgid "%s: Wrong value for input argument %s.\n" +msgstr "%s: 輸入參數的值錯誤 %s.\n" + +msgid "" +"\n" +"Bad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n" +" and s2 in [1, 2147483398]\n" +msgstr "" +"\n" +"clcg2 中指定的亂數種子錯有誤, s1 必須是在 [1, 2147483562] \n" +" 且 s2 是在 [1, 2147483562] " +" 的整數值範圍.\n" + +msgid "" +"\n" +" bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n" +" s2 in [1, 2147483542]\n" +" s3 in [1, 2147483422]\n" +" s4 in [1, 2147483322]" +msgstr "" +"\n" +" clcg4 中的亂數種子有誤, s1必須是介於 [1, 2147483646] 的整數範圍.\n" +" s2必須是介於 [1, 2147483646] " +"的整數範圍.\n" +" s3必須是介於 [1, 2147483646] " +"的整數範圍.\n" +" s4必須是介於[1, 2147483646] 的整數範圍." + +#, c-format +msgid "WARNING: %s\n" +msgstr "" + +#, c-format +msgid "" +"be aware that you may have lost synchronization\n" +" between the virtual generator %d and the others.\n" +" use grand(\"setall\", s1, s2, s3, s4) if you want to recover it." +msgstr "" + +msgid "" +"\n" +"Bad seed for fsultra, must be integers in [0, 2^32-1]\n" +msgstr "" +"\n" +"fsultra 的亂數種子有誤. 必須是介於 [0, 2^32-1] 的整數範圍之間\n" + +#, c-format +msgid "" +"\n" +"The first component of the fsultra state, must be an int in [0, %d]\n" +msgstr "" +"\n" +"fsultra state 的第一個元件, 必須是介於 [0, %d] 的整數範圍.\n" + +msgid "" +"\n" +"The second component of the fsultra state, must be 0 or 1\n" +msgstr "" +"\n" +"fsultra state 的第二個元件, 必須是 [0, %d] 的整數範圍.\n" + +msgid "" +"\n" +"The third component of the fsultra state, must be an int in [1, 2^32-1]\n" +msgstr "" +"\n" +"fsultra state 的第三個元件, 必須是介於 [0, %d] 的整數範圍.\n" + +msgid "Bad seeds for kiss, must be integers in [0,2^32-1]\n" +msgstr "給 kiss 錯誤的亂數種子, 應該是介於 [0, 2^32-1] 的整數值\n" + +msgid "Bad seed for mt, must be an int in [0, 2^32-1]\n" +msgstr "mt 的亂數種子有誤, 必須是 [0, 2^32-1] 範圍的整數值\n" + +msgid "The first component of the mt state mt, must be an int in [1, 624]\n" +msgstr "mt state mt 的第一個元件, 必須在 [1, 624] 的整數.\n" + +msgid "" +"\n" +"Bad seed for urand, must be an int in [0, 2147483647]\n" +msgstr "" +"\n" +"urand 的亂數種子有誤, 必須是介於 [0, 2147483647] 的整數值.\n" + +msgid "Scilab randlib interface not installed.\n" +msgstr "Scilab 的 randlib 介面尚未安裝.\n" + +msgid "Simulation of a binomial random variable" +msgstr "二項式亂數變數的模擬" + +msgid "Simulation" +msgstr "模擬" + +msgid "Theory" +msgstr "理論" + +msgid "Simulation of a discrete random variable" +msgstr "離散亂數變數的模擬" + +msgid "Simulation of a discrete uniform random variable" +msgstr "" + +msgid "Simulation of a Erlang random variable" +msgstr "" + +msgid "Simulation of an exponential random variable" +msgstr "" + +msgid "Classes" +msgstr "" + +msgid "p must be < 1" +msgstr "" + +msgid "Simulation of a geometric random variable" +msgstr "" + +msgid "Simulation of a hyper geometric random variable" +msgstr "" + +msgid "Simulation of a Poisson random variable" +msgstr "" + +msgid "Random" +msgstr "亂數" + +msgid "binomial random variable" +msgstr "二項式亂數變數" + +msgid "discrete random variable" +msgstr "離散亂數變數" + +msgid "discrete uniform random variable" +msgstr "無變化的離散亂數變數" + +msgid "geometric random variable" +msgstr "幾何亂數變數" + +msgid "Poisson random variable" +msgstr "普瓦松亂數變數" + +msgid "Exponential random variable" +msgstr "指數亂數變數" + +msgid "Weibull random variable" +msgstr "韋伯亂數變數" + +msgid "Hyper geometric random variable" +msgstr "超幾何亂數變數" + +msgid "Erlang random variable" +msgstr "Erlang亂數變數" + +msgid "Simulation of a Weibull random variable" +msgstr "" diff --git a/modules/randlib/macros/%b_grand.bin b/modules/randlib/macros/%b_grand.bin Binary files differnew file mode 100755 index 000000000..cafd0d7d8 --- /dev/null +++ b/modules/randlib/macros/%b_grand.bin diff --git a/modules/randlib/macros/%b_grand.sci b/modules/randlib/macros/%b_grand.sci new file mode 100755 index 000000000..9bbece05a --- /dev/null +++ b/modules/randlib/macros/%b_grand.sci @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function y = %b_grand(n, prm, vect) + // Overload to use grand on boolean input + + y = %grand_perm(floor(n), vect); + +endfunction diff --git a/modules/randlib/macros/%c_grand.bin b/modules/randlib/macros/%c_grand.bin Binary files differnew file mode 100755 index 000000000..373b70406 --- /dev/null +++ b/modules/randlib/macros/%c_grand.bin diff --git a/modules/randlib/macros/%c_grand.sci b/modules/randlib/macros/%c_grand.sci new file mode 100755 index 000000000..0d287a28a --- /dev/null +++ b/modules/randlib/macros/%c_grand.sci @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function y = %c_grand(n, prm, vect) + // Overload to use grand on string input + + y = %grand_perm(floor(n), vect); + +endfunction diff --git a/modules/randlib/macros/%grand_perm.bin b/modules/randlib/macros/%grand_perm.bin Binary files differnew file mode 100755 index 000000000..5cea0ac87 --- /dev/null +++ b/modules/randlib/macros/%grand_perm.bin diff --git a/modules/randlib/macros/%grand_perm.sci b/modules/randlib/macros/%grand_perm.sci new file mode 100755 index 000000000..ca1b74c2e --- /dev/null +++ b/modules/randlib/macros/%grand_perm.sci @@ -0,0 +1,58 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Samuel Gougeon <sgougeon@free.fr> +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function rep = %grand_perm(N, V) + // Returns N random permutations of V's components. + // V may be a scalar, a row or column vector, a matrix, or an hypermatrix. + // All data types are supported: Integers, reals, complexes, strings, polynomes.. + // if V is a row, permutations are returned as N rows + // if V is a column, permutations are returned as N columns + // if V is a matrix or a true hypermatrix, permutations are returned + // through an additional dimension of size N. + + // Author : Samuel Gougeon - 2010 + // Version: 1.2 + // Software: Scilab and related + // + // Tests: + // with a row of reals: + // m = grand(1, 6, "uin", 0, 10) + // grand_perm(3, m) + // // with a column of reals: + // grand_perm(4, m') + // // with a matrix of reals: + // M = grand(2, 5, "uin", 0, 10) + // grand_perm(3, M) + // // with strings: + // grand_perm(5, ["a" "b" "c" "d"]) + // // with polynomes: + // p = (m'-%z)^2 + // grand_perm(3, p) + + s = size(V); + L = prod(s); + + if L == 1 then + rep = V(ones(1, N)); + else + //[tmp, k] = gsort(rand(L, N), "r", "i"); + k = grand(N, "prm", (1:L).'); // Faster for large L + if length(s) < 3 then + if s(1) == 1 then + rep = matrix(V(k), [s(2) N]).'; + elseif s(2) == 1 then + rep = matrix(V(k),[s(1) N]); + else + rep = matrix(V(k), [s N]); + end + else + rep = matrix(V(k), [s N]); end + end + +endfunction diff --git a/modules/randlib/macros/%hm_grand.bin b/modules/randlib/macros/%hm_grand.bin Binary files differnew file mode 100755 index 000000000..2b9de2e8c --- /dev/null +++ b/modules/randlib/macros/%hm_grand.bin diff --git a/modules/randlib/macros/%hm_grand.sci b/modules/randlib/macros/%hm_grand.sci new file mode 100755 index 000000000..e31b80daa --- /dev/null +++ b/modules/randlib/macros/%hm_grand.sci @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function y = %hm_grand(n, prm, vect) + // Overload to use grand on hypermatrix input + + y = %grand_perm(floor(n), vect); + +endfunction diff --git a/modules/randlib/macros/%i_grand.bin b/modules/randlib/macros/%i_grand.bin Binary files differnew file mode 100755 index 000000000..0fb483305 --- /dev/null +++ b/modules/randlib/macros/%i_grand.bin diff --git a/modules/randlib/macros/%i_grand.sci b/modules/randlib/macros/%i_grand.sci new file mode 100755 index 000000000..4fd908fe1 --- /dev/null +++ b/modules/randlib/macros/%i_grand.sci @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function y = %i_grand(n, prm, vect) + // Overload to use grand on integer input + + y = %grand_perm(floor(n), vect); + +endfunction diff --git a/modules/randlib/macros/%p_grand.bin b/modules/randlib/macros/%p_grand.bin Binary files differnew file mode 100755 index 000000000..30af97de9 --- /dev/null +++ b/modules/randlib/macros/%p_grand.bin diff --git a/modules/randlib/macros/%p_grand.sci b/modules/randlib/macros/%p_grand.sci new file mode 100755 index 000000000..1737e6229 --- /dev/null +++ b/modules/randlib/macros/%p_grand.sci @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function y = %p_grand(n, prm, vect) + // Overload to use grand on polynomial input + + y = %grand_perm(floor(n), vect); + +endfunction diff --git a/modules/randlib/macros/%s_grand.bin b/modules/randlib/macros/%s_grand.bin Binary files differnew file mode 100755 index 000000000..e06fc2541 --- /dev/null +++ b/modules/randlib/macros/%s_grand.bin diff --git a/modules/randlib/macros/%s_grand.sci b/modules/randlib/macros/%s_grand.sci new file mode 100755 index 000000000..769cd686e --- /dev/null +++ b/modules/randlib/macros/%s_grand.sci @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function y = %s_grand(n, prm, vect) + // Overload to use grand on complex input + + y = %grand_perm(floor(n), vect); + +endfunction diff --git a/modules/randlib/macros/%sp_grand.bin b/modules/randlib/macros/%sp_grand.bin Binary files differnew file mode 100755 index 000000000..3308c8c4b --- /dev/null +++ b/modules/randlib/macros/%sp_grand.bin diff --git a/modules/randlib/macros/%sp_grand.sci b/modules/randlib/macros/%sp_grand.sci new file mode 100755 index 000000000..8b6c052b0 --- /dev/null +++ b/modules/randlib/macros/%sp_grand.sci @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +function y = %sp_grand(n, prm, vect) + // Overload to use grand on sparse input + + y = %grand_perm(floor(n), vect); + +endfunction diff --git a/modules/randlib/macros/buildmacros.bat b/modules/randlib/macros/buildmacros.bat new file mode 100755 index 000000000..a73ca67f8 --- /dev/null +++ b/modules/randlib/macros/buildmacros.bat @@ -0,0 +1,11 @@ + +rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +rem Copyright (C) 2008 - INRIA +rem +rem This file must be used under the terms of the CeCILL. +rem This source file is licensed as described in the file COPYING, which +rem you should have received as part of this distribution. The terms +rem are also available at +rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit; diff --git a/modules/randlib/macros/buildmacros.sce b/modules/randlib/macros/buildmacros.sce new file mode 100755 index 000000000..8f3539045 --- /dev/null +++ b/modules/randlib/macros/buildmacros.sce @@ -0,0 +1,14 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +if (isdef("genlib") == %f) then + exec(SCI+"/modules/functions/scripts/buildmacros/loadgenlib.sce"); +end + +genlib("randliblib","SCI/modules/randlib/macros",%f,%t); diff --git a/modules/randlib/macros/cleanmacros.bat b/modules/randlib/macros/cleanmacros.bat new file mode 100755 index 000000000..4ad1bbae2 --- /dev/null +++ b/modules/randlib/macros/cleanmacros.bat @@ -0,0 +1,13 @@ + +rem Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +rem Copyright (C) 2008 - INRIA +rem +rem This file must be used under the terms of the CeCILL. +rem This source file is licensed as described in the file COPYING, which +rem you should have received as part of this distribution. The terms +rem are also available at +rem http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + +@del *.bin 2>NUL +@del lib 2>NUL +@del names 2>NUL diff --git a/modules/randlib/macros/lib b/modules/randlib/macros/lib Binary files differnew file mode 100755 index 000000000..ebcc83847 --- /dev/null +++ b/modules/randlib/macros/lib diff --git a/modules/randlib/macros/names b/modules/randlib/macros/names new file mode 100755 index 000000000..82d2f02b5 --- /dev/null +++ b/modules/randlib/macros/names @@ -0,0 +1,8 @@ +%b_grand +%c_grand +%grand_perm +%hm_grand +%i_grand +%p_grand +%s_grand +%sp_grand diff --git a/modules/randlib/randlib.iss b/modules/randlib/randlib.iss new file mode 100755 index 000000000..513c90485 --- /dev/null +++ b/modules/randlib/randlib.iss @@ -0,0 +1,45 @@ +; +; Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +; Copyright (C) INRIA - Allan CORNET +; Copyright (C) DIGITEO - 2010 - Allan CORNET +; +; This file must be used under the terms of the CeCILL. +; This source file is licensed as described in the file COPYING, which +; you should have received as part of this distribution. The terms +; are also available at +; http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +; +;-------------------------------------------------------------------------------------------------------------- +; Inno Setup Script (5.3 and more) for Scilab (UNICODE version required) +; +;-------------------------------------------------------------------------------------------------------------- +; randlib module +;-------------------------------------------------------------------------------------------------------------- +; +#define RANDLIB "randlib" +; +Source: bin\{#RANDLIB}.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB} +Source: bin\{#RANDLIB}_f.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB} +; +Source: modules\{#RANDLIB}\license.txt; DestDir: {app}\modules\{#RANDLIB}; Components: {#COMPN_SCILAB} +; +Source: modules\{#RANDLIB}\sci_gateway\{#RANDLIB}_gateway.xml; DestDir: {app}\modules\{#RANDLIB}\sci_gateway; Components: {#COMPN_SCILAB} +; +Source: modules\{#RANDLIB}\etc\{#RANDLIB}.quit; DestDir: {app}\modules\{#RANDLIB}\etc; Components: {#COMPN_SCILAB} +Source: modules\{#RANDLIB}\etc\{#RANDLIB}.start; DestDir: {app}\modules\{#RANDLIB}\etc; Components: {#COMPN_SCILAB} +; +;Source: modules\{#RANDLIB}\includes\*.h; DestDir: {app}\modules\{#RANDLIB}\includes; Components: {#COMPN_SCILAB} +; +Source: modules\{#RANDLIB}\macros\lib; DestDir: {app}\modules\{#RANDLIB}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +Source: modules\{#RANDLIB}\macros\names; DestDir: {app}\modules\{#RANDLIB}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +Source: modules\{#RANDLIB}\macros\*.bin; DestDir: {app}\modules\{#RANDLIB}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +Source: modules\{#RANDLIB}\macros\*.sci; DestDir: {app}\modules\{#RANDLIB}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +Source: modules\{#RANDLIB}\macros\buildmacros.sce; DestDir: {app}\modules\{#RANDLIB}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +Source: modules\{#RANDLIB}\macros\buildmacros.bat; DestDir: {app}\modules\{#RANDLIB}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +Source: modules\{#RANDLIB}\macros\cleanmacros.bat; DestDir: {app}\modules\{#RANDLIB}\macros; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +; +Source: modules\{#RANDLIB}\demos\*.*; DestDir: {app}\modules\{#RANDLIB}\demos; Flags: recursesubdirs; Components: {#COMPN_SCILAB} +; +Source: modules\{#RANDLIB}\tests\*.*; DestDir: {app}\modules\{#RANDLIB}\tests; Flags: recursesubdirs; Components: {#COMPN_SCILAB} and {#COMPN_TESTS} +; +;-------------------------------------------------------------------------------------------------------------- diff --git a/modules/randlib/sci_gateway/c/.deps/.dirstamp b/modules/randlib/sci_gateway/c/.deps/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/randlib/sci_gateway/c/.deps/.dirstamp diff --git a/modules/randlib/sci_gateway/c/.deps/libscirandlib_la-gw_randlib.Plo b/modules/randlib/sci_gateway/c/.deps/libscirandlib_la-gw_randlib.Plo new file mode 100755 index 000000000..13a459d23 --- /dev/null +++ b/modules/randlib/sci_gateway/c/.deps/libscirandlib_la-gw_randlib.Plo @@ -0,0 +1,273 @@ +sci_gateway/c/libscirandlib_la-gw_randlib.lo: sci_gateway/c/gw_randlib.c \ + /usr/include/stdc-predef.h /usr/include/string.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/string.h \ + /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h includes/gw_randlib.h \ + includes/dynlib_randlib.h ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/core/includes/stack-c.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + ../../modules/core/includes/stack-def.h \ + ../../modules/core/includes/machine.h \ + ../../modules/core/includes/stackTypeVariable.h \ + ../../modules/core/includes/BOOL.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/core/includes/stack1.h \ + ../../modules/core/includes/scisparse.h \ + ../../modules/core/includes/stack2.h \ + ../../modules/core/includes/stack3.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/api_scilab/includes/api_common.h \ + ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/api_scilab/includes/api_double.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/api_scilab/includes/api_string.h /usr/include/wchar.h \ + /usr/include/stdio.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + ../../modules/api_scilab/includes/api_int.h \ + ../../modules/api_scilab/includes/api_poly.h \ + ../../modules/api_scilab/includes/api_sparse.h \ + ../../modules/api_scilab/includes/api_boolean.h \ + ../../modules/api_scilab/includes/api_boolean_sparse.h \ + ../../modules/api_scilab/includes/api_pointer.h \ + ../../modules/api_scilab/includes/api_list.h \ + ../../modules/api_scilab/includes/api_error.h \ + ../../modules/api_scilab/includes/api_handle.h \ + ../../modules/api_scilab/includes/api_optional.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/api_scilab/includes/api_hypermat.h \ + ../../modules/core/includes/core_math.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/core/includes/MALLOC.h \ + ../../modules/core/includes/sci_mem_alloc.h \ + ../../modules/core/includes/callFunctionFromGateway.h + +/usr/include/stdc-predef.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/string.h: + +/usr/include/x86_64-linux-gnu/bits/string2.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +includes/gw_randlib.h: + +includes/dynlib_randlib.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/core/includes/stack-c.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/math.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +../../modules/core/includes/stack-def.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/stackTypeVariable.h: + +../../modules/core/includes/BOOL.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/core/includes/stack1.h: + +../../modules/core/includes/scisparse.h: + +../../modules/core/includes/stack2.h: + +../../modules/core/includes/stack3.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/core/includes/sci_types.h: + +../../modules/api_scilab/includes/api_common.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/api_scilab/includes/api_double.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/api_scilab/includes/api_string.h: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +../../modules/api_scilab/includes/api_int.h: + +../../modules/api_scilab/includes/api_poly.h: + +../../modules/api_scilab/includes/api_sparse.h: + +../../modules/api_scilab/includes/api_boolean.h: + +../../modules/api_scilab/includes/api_boolean_sparse.h: + +../../modules/api_scilab/includes/api_pointer.h: + +../../modules/api_scilab/includes/api_list.h: + +../../modules/api_scilab/includes/api_error.h: + +../../modules/api_scilab/includes/api_handle.h: + +../../modules/api_scilab/includes/api_optional.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/api_scilab/includes/api_hypermat.h: + +../../modules/core/includes/core_math.h: + +../../modules/core/includes/sci_types.h: + +../../modules/core/includes/MALLOC.h: + +../../modules/core/includes/sci_mem_alloc.h: + +../../modules/core/includes/callFunctionFromGateway.h: diff --git a/modules/randlib/sci_gateway/c/.deps/libscirandlib_la-sci_grand.Plo b/modules/randlib/sci_gateway/c/.deps/libscirandlib_la-sci_grand.Plo new file mode 100755 index 000000000..32a8986ef --- /dev/null +++ b/modules/randlib/sci_gateway/c/.deps/libscirandlib_la-sci_grand.Plo @@ -0,0 +1,308 @@ +sci_gateway/c/libscirandlib_la-sci_grand.lo: sci_gateway/c/sci_grand.c \ + /usr/include/stdc-predef.h /usr/include/string.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/string.h \ + /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + ../../modules/localization/includes/localization.h \ + ../../modules/core/includes/machine.h /usr/include/libintl.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/core/includes/stack-c.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/values.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/float.h \ + ../../modules/core/includes/stack-def.h \ + ../../modules/core/includes/machine.h \ + ../../modules/core/includes/stackTypeVariable.h \ + ../../modules/core/includes/BOOL.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/core/includes/stack1.h \ + ../../modules/core/includes/scisparse.h \ + ../../modules/core/includes/stack2.h \ + ../../modules/core/includes/stack3.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/api_scilab/includes/api_common.h \ + ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/api_scilab/includes/api_double.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/api_scilab/includes/api_string.h /usr/include/wchar.h \ + /usr/include/stdio.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + ../../modules/api_scilab/includes/api_int.h \ + ../../modules/api_scilab/includes/api_poly.h \ + ../../modules/api_scilab/includes/api_sparse.h \ + ../../modules/api_scilab/includes/api_boolean.h \ + ../../modules/api_scilab/includes/api_boolean_sparse.h \ + ../../modules/api_scilab/includes/api_pointer.h \ + ../../modules/api_scilab/includes/api_list.h \ + ../../modules/api_scilab/includes/api_error.h \ + ../../modules/api_scilab/includes/api_handle.h \ + ../../modules/api_scilab/includes/api_optional.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/api_scilab/includes/api_hypermat.h \ + ../../modules/core/includes/core_math.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/core/includes/MALLOC.h \ + ../../modules/core/includes/sci_mem_alloc.h includes/grand.h \ + includes/dynlib_randlib.h includes/clcg4.h includes/others_generators.h \ + ../../modules/output_stream/includes/sciprint.h \ + ../../modules/core/includes/BOOL.h \ + ../../modules/output_stream/includes/Scierror.h \ + ../../modules/output_stream/includes/do_error_number.h \ + includes/gw_randlib.h + +/usr/include/stdc-predef.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/string.h: + +/usr/include/x86_64-linux-gnu/bits/string2.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +/usr/include/math.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +../../modules/localization/includes/localization.h: + +../../modules/core/includes/machine.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/core/includes/stack-c.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/values.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/float.h: + +../../modules/core/includes/stack-def.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/stackTypeVariable.h: + +../../modules/core/includes/BOOL.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/core/includes/stack1.h: + +../../modules/core/includes/scisparse.h: + +../../modules/core/includes/stack2.h: + +../../modules/core/includes/stack3.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/core/includes/sci_types.h: + +../../modules/api_scilab/includes/api_common.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/api_scilab/includes/api_double.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/api_scilab/includes/api_string.h: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +../../modules/api_scilab/includes/api_int.h: + +../../modules/api_scilab/includes/api_poly.h: + +../../modules/api_scilab/includes/api_sparse.h: + +../../modules/api_scilab/includes/api_boolean.h: + +../../modules/api_scilab/includes/api_boolean_sparse.h: + +../../modules/api_scilab/includes/api_pointer.h: + +../../modules/api_scilab/includes/api_list.h: + +../../modules/api_scilab/includes/api_error.h: + +../../modules/api_scilab/includes/api_handle.h: + +../../modules/api_scilab/includes/api_optional.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/api_scilab/includes/api_hypermat.h: + +../../modules/core/includes/core_math.h: + +../../modules/core/includes/sci_types.h: + +../../modules/core/includes/MALLOC.h: + +../../modules/core/includes/sci_mem_alloc.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +includes/clcg4.h: + +includes/others_generators.h: + +../../modules/output_stream/includes/sciprint.h: + +../../modules/core/includes/BOOL.h: + +../../modules/output_stream/includes/Scierror.h: + +../../modules/output_stream/includes/do_error_number.h: + +includes/gw_randlib.h: diff --git a/modules/randlib/sci_gateway/c/.dirstamp b/modules/randlib/sci_gateway/c/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/randlib/sci_gateway/c/.dirstamp diff --git a/modules/randlib/sci_gateway/c/.libs/libscirandlib_la-gw_randlib.o b/modules/randlib/sci_gateway/c/.libs/libscirandlib_la-gw_randlib.o Binary files differnew file mode 100755 index 000000000..bac664661 --- /dev/null +++ b/modules/randlib/sci_gateway/c/.libs/libscirandlib_la-gw_randlib.o diff --git a/modules/randlib/sci_gateway/c/.libs/libscirandlib_la-sci_grand.o b/modules/randlib/sci_gateway/c/.libs/libscirandlib_la-sci_grand.o Binary files differnew file mode 100755 index 000000000..016c9839e --- /dev/null +++ b/modules/randlib/sci_gateway/c/.libs/libscirandlib_la-sci_grand.o diff --git a/modules/randlib/sci_gateway/c/gw_randlib.c b/modules/randlib/sci_gateway/c/gw_randlib.c new file mode 100755 index 000000000..345f52d87 --- /dev/null +++ b/modules/randlib/sci_gateway/c/gw_randlib.c @@ -0,0 +1,42 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +/*--------------------------------------------------------------------------*/ +/* INRIA 2006 */ +/* Allan CORNET */ +/*--------------------------------------------------------------------------*/ +#include <string.h> +#include "gw_randlib.h" +#include "api_scilab.h" +#include "MALLOC.h" +#include "callFunctionFromGateway.h" +/*--------------------------------------------------------------------------*/ +static gw_generic_table Tab[] = +{ + {sci_Rand, "grand"} +}; +/*--------------------------------------------------------------------------*/ +int gw_randlib(void) +{ + Rhs = Max(0, Rhs); + + if (pvApiCtx == NULL) + { + pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx)); + } + + pvApiCtx->pstName = (char*)Tab[Fin - 1].name; + callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab)); + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/randlib/sci_gateway/c/libscirandlib_la-gw_randlib.lo b/modules/randlib/sci_gateway/c/libscirandlib_la-gw_randlib.lo new file mode 100755 index 000000000..9e58bac23 --- /dev/null +++ b/modules/randlib/sci_gateway/c/libscirandlib_la-gw_randlib.lo @@ -0,0 +1,12 @@ +# sci_gateway/c/libscirandlib_la-gw_randlib.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_la-gw_randlib.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/sci_gateway/c/libscirandlib_la-sci_grand.lo b/modules/randlib/sci_gateway/c/libscirandlib_la-sci_grand.lo new file mode 100755 index 000000000..fdd800ab3 --- /dev/null +++ b/modules/randlib/sci_gateway/c/libscirandlib_la-sci_grand.lo @@ -0,0 +1,12 @@ +# sci_gateway/c/libscirandlib_la-sci_grand.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_la-sci_grand.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/sci_gateway/c/sci_grand.c b/modules/randlib/sci_gateway/c/sci_grand.c new file mode 100755 index 000000000..075e5e9fc --- /dev/null +++ b/modules/randlib/sci_gateway/c/sci_grand.c @@ -0,0 +1,1557 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2013 - Scilab Enterprises - Paul Bignier: added support for complexes, polynomials, +* integers, booleans, strings and sparses. +* Copyright (C) ENPC +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +*/ + +/*------------------------------------------------------------------------ +* Interface for grand +* jpc@cermics.enpc.fr +* stuff to deal with several generators added +* by Bruno Pincon (12/11/2001) +* +--------------------------------------------------------------------------*/ +#include <string.h> +#include <math.h> +#include "localization.h" +#include "api_scilab.h" +#include "MALLOC.h" + +/** external functions to be called through this interface **/ + +#include "grand.h" +#include "clcg4.h" +#include "others_generators.h" +#include "sciprint.h" +#include "Scierror.h" +#include "gw_randlib.h" + +enum {MT, KISS, CLCG4, CLCG2, URAND, FSULTRA}; + +/* the current generator : */ +static int current_gen = MT; + +/* for clcg4 : the current virtual gen (current_clcg4 in [0, Maxgen]) */ +static int current_clcg4 = 0; + +/* clcg4 must be called with the virtual generator number */ +static unsigned long int clcg4_with_gen(void) +{ + return ( clcg4(current_clcg4) ); +} + +#define NbGenInScilab 6 + +/* pointers onto the generators func */ +unsigned long int (*gen[NbGenInScilab])(void) = { randmt, kiss, clcg4_with_gen, clcg2 , urandc , fsultra}; + +/* names at the scilab level */ +static char *names_gen[NbGenInScilab] = { "mt", "kiss", "clcg4", "clcg2", "urand", "fsultra" }; + +/* all the generators provided integers in [0, RngMaxInt] : */ +static +unsigned long RngMaxInt[NbGenInScilab] = { 4294967295ul, /* mt */ + 4294967295ul, /* kiss */ + 2147483646ul, /* clcg4 */ + 2147483561ul, /* clcg2 */ + 2147483647ul, /* urand */ + 4294967295ul + }; /* fsultra*/ +/* the factors (1/(RngMaxInt+1)) to get reals in [0,1) : */ +static +double factor[NbGenInScilab] = { 2.3283064365386963e-10, /* mt */ + 2.3283064365386963e-10, /* kiss */ + 4.6566128752457969e-10, /* clcg4 */ + 4.6566130595601735e-10, /* clcg2 */ + 4.6566128730773926e-10, /* urand */ + 2.3283064365386963e-10 + }; /* fsultra*/ + + +static double* createOutputVar(void* _pvCtx, int _iVar, int _iRows, int _iCols, int* _piDims, int _iDims); + +double C2F(ranf)(void) +{ + /* random deviate from U[0,1) */ + return ( (double) gen[current_gen]() * factor[current_gen] ); +} + +double ignlgi(void) +{ + /* random deviate from Ui[0,RngMaxInt] (direct output of the current gen) */ + return ( (double) gen[current_gen]() ); +} + +double C2F(ignuin)(double *a, double *b) +{ + /* random deviate from Ui[a,b] + * it is assumed that : (i) a and b are integers (stored in double) + * (ii) b-a+1 <= RngMaxInt[current_gen] + * (these verif are done at the calling level) + * + * We use the classic method with a minor difference : to choose + * uniformly an int in [a,b] (ie d=b-a+1 numbers) with a generator + * which provides uniformly integers in [0,RngMaxInt] (ie m=RngMaxInt+1 + * numbers) we do the Euclidian division : + * m = q d + r, r in [0,d-1] + * + * and accept only numbers l in [0, qd-1], then the output is k = a + (l mod d) + * (ie numbers falling in [qd , RngMaxInt] are rejected). + * The problem is that RngMaxInt is 2^32-1 for mt and kiss so that RngMaxInt+1 = 0 + * with the 32 bits unsigned int arithmetic. So in place of rejected r + * numbers we reject r+1 by using RngMaxInt in place of m. The constraint is + * then that (b-a+1) <= RngMaxInt and if we doesn't want to deal we each generator + * we take (b-a+1) <= Min RngMaxInt = 2147483561 (clcg2) + */ + unsigned long k, d = (unsigned long)((*b - *a) + 1), qd; + + if ( d == 1) + { + return (*a); + } + + qd = RngMaxInt[current_gen] - RngMaxInt[current_gen] % d; + do + { + k = (unsigned long)ignlgi(); + } + while ( k >= qd ); + return ( *a + (double)(k % d) ); +} + +/************************************************** +* hand written interface for the randlib +***********************************************************************/ + +int sci_Rand(char *fname, unsigned long fname_len) +{ + int minrhs = 1, maxrhs = 10, minlhs = 1, maxlhs = 2; + int ResL, ResC, suite, m2, n2, l2, m1, n1, l1, ls, ms, ns, la, lr, lb, lc; + int l3, l4; + int i; + int iHyperMat = 0; + int iDims = 0; + int* piDims = NULL; + double* pdblData = NULL; + + Nbvars = 0; + CheckRhs(minrhs, maxrhs); + CheckLhs(minlhs, maxlhs); + if (GetType(1) != sci_matrix && GetType(1) != 17) + { + int un = 1, deux = 2, dim_state_mt = 625, dim_state_fsultra = 40, dim_state_4 = 4; + GetRhsVar(1, STRING_DATATYPE, &ms, &ns, &ls); + if ( strcmp(cstk(ls), "getsd") == 0) + { + if ( Rhs != 1 ) + { + Scierror(999, _("%s: Wrong number of input argument: %d expected with option '%s'.\n"), fname, 1, "getsd"); + return 0; + } + if ( Lhs != 1 ) + { + Scierror(999, _("%s: Wrong number of output argument: %d expected the option '%s'.\n"), fname, 1, "getsd"); + return 0; + } + + switch (current_gen) + { + case (MT) : + CreateVar(Rhs + 2, MATRIX_OF_DOUBLE_DATATYPE, &dim_state_mt, &un, &lr); + get_state_mt(stk(lr)); + break; + case (KISS) : + CreateVar(Rhs + 2, MATRIX_OF_DOUBLE_DATATYPE, &dim_state_4, &un, &lr); + get_state_kiss(stk(lr)); + break; + case (CLCG4) : + CreateVar(Rhs + 2, MATRIX_OF_DOUBLE_DATATYPE, &dim_state_4, &un, &lr); + get_state_clcg4(current_clcg4, stk(lr)); + break; + case (CLCG2) : + CreateVar(Rhs + 2, MATRIX_OF_DOUBLE_DATATYPE, &deux, &un, &lr); + get_state_clcg2(stk(lr)); + break; + case (URAND) : + CreateVar(Rhs + 2, MATRIX_OF_DOUBLE_DATATYPE, &un, &un, &lr); + get_state_urand(stk(lr)); + break; + case (FSULTRA) : + CreateVar(Rhs + 2, MATRIX_OF_DOUBLE_DATATYPE, &dim_state_fsultra, &un, &lr); + get_state_fsultra(stk(lr)); + break; + }; + LhsVar(1) = Rhs + 2; + PutLhsVar(); + return 0; + } + else if ( strcmp(cstk(ls), "setall") == 0 ) + { + if ( current_gen != CLCG4 ) + { + sciprint(_("The %s option affects only the clcg4 generator\n"), "setall"); + } + if ( Rhs != 5 ) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected with option '%s'.\n"), fname, 5, "setall"); + return 0; + } + GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 2); + return 0; + } + GetRhsVar(3, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l2); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 3); + return 0; + } + GetRhsVar(4, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l3); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 4); + return 0; + } + GetRhsVar(5, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l4); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 5); + return 0; + } + + if (! set_initial_seed_clcg4(*stk(l1), *stk(l2), *stk(l3), *stk(l4)) ) + { + /* => seeds were not good (info is displayed by the function) */ + SciError(999); + return 0; + } + LhsVar(1) = 1; + PutLhsVar(); + return(0); + } + else if ( strcmp(cstk(ls), "setsd") == 0 ) + { + switch (current_gen) + { + case (MT) : + if ( Rhs != 2 ) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected for '%s' with the %s generator.\n"), fname, 2, "setsd", "mt"); + return 0; + } + GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1); + if ( m1 * n1 == 1) /* simple init of mt */ + { + if (! set_state_mt_simple(*stk(l1)) ) + { + SciError(999); + return(0); + }; + } + else if ( m1 * n1 == 625 ) /* init of all the state */ + { + if (! set_state_mt(stk(l1))) + { + SciError(999); + return(0); + }; + } + else + { + Scierror(999, _("%s: Wrong values for input argument: Vector of %d or %d values for %s expected.\n"), fname, 1, 625, "mt"); + return 0; + }; + break; + + case (FSULTRA) : + if ( Rhs == 2 ) /* init via a "complete" state */ + { + GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1); + if ( m1 != 40 || n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument #%d: %dx%d expected.\n"), fname, 2, 40, 1); + return 0; + }; + if (! set_state_fsultra(stk(l1)) ) + { + SciError(999); + return(0); + } + ; + } + else if ( Rhs == 3 ) /* init with 2 integers (like before) */ + { + GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 2); + return 0; + }; + GetRhsVar(3, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l2); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 3); + return 0; + }; + if (! set_state_fsultra_simple(*stk(l1), *stk(l2)) ) + { + SciError(999); + return(0); + }; + } + else + { + Scierror(999, _("%s: Wrong number of input arguments: %d or %d expected for '%s' option with the %s generator.\n"), fname, 2, 3, "setsd", "fsultra"); + return 0; + } + break; + + case (KISS) : + case (CLCG4) : + if ( Rhs != 5 ) + { + Scierror(999, _("%s: Wrong number of input arguments: expected %d for '%s' option with the %s or %s generator.\n"), fname, 5, "setsd", "kiss", "clcg4"); + return 0; + } + GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 2); + return 0; + } + GetRhsVar(3, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l2); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 3); + return 0; + } + GetRhsVar(4, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l3); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 4); + return 0; + } + GetRhsVar(5, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l4); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 5); + return 0; + } + if (current_gen == KISS) + { + if (! set_state_kiss(*stk(l1), *stk(l2), *stk(l3), *stk(l4))) + { + SciError(999); + return 0; + }; + } + else + { + if (! set_seed_clcg4(current_clcg4, *stk(l1), *stk(l2), *stk(l3), *stk(l4))) + { + SciError(999); + return 0; + }; + } + break; + + case (CLCG2) : + if ( Rhs != 3 ) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected for '%s' option with the %s generator.\n"), fname, 3, "setsd", "clcg2"); + return 0; + } + GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 2); + return 0; + }; + GetRhsVar(3, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l2); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 3); + return 0; + }; + if (! set_state_clcg2(*stk(l1), *stk(l2))) + { + SciError(999); + return 0; + }; + break; + + case (URAND) : + if ( Rhs != 2 ) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected for '%s' option with the %s generator.\n"), fname, 2, "setsd", "urand"); + return 0; + } + GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 2); + return 0; + }; + if (! set_state_urand(*stk(l1))) + { + SciError(999); + return 0; + }; + break; + }; + LhsVar(1) = 0; + PutLhsVar(); + return 0; + } + else if (strcmp("phr2sd", cstk(ls)) == 0) + { + if ( Rhs != 2 ) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected with option '%s'.\n"), fname, 2, "phr2sd"); + return 0; + } + if ( Lhs > 1 ) + { + Scierror(999, _("%s: Wrong number of output argument: %d expected with option '%s'.\n"), fname, 1, "phr2sd"); + + return 0; + } + GetRhsVar(2, STRING_DATATYPE, &m1, &n1, &l1); + CreateVar(3, MATRIX_OF_INTEGER_DATATYPE, &un, &deux, &l2); + + C2F(phrtsd)(cstk(l1), &m1, istk(l2), istk(l2 + 1), m1); + LhsVar(1) = 3; + PutLhsVar(); + return 0; + } + else if (strcmp("initgn", cstk(ls)) == 0) + { + SeedType Where; + if ( current_gen != CLCG4 ) + { + sciprint(_("%s: The %s option affects only the %s generator\n"), fname, "initgn", "clcg4"); + } + if ( Rhs != 2) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected with option '%s'.\n"), fname, 2, "initgn"); + return 0; + } + GetRhsVar(2, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &l1); + if ( *istk(l1) != 0 && *istk(l1) != -1 && *istk(l1) != 1) + { + Scierror(999, _("%s: Wrong value for input argument #%d: %d, %d or %d expected.\n"), fname, 2, -1, 0, 1); + return 0; + } + Where = (SeedType) (*istk(l1) + 1); + init_generator_clcg4(current_clcg4, Where); + LhsVar(1) = 2; + PutLhsVar(); + return 0; + } + else if (strcmp("setcgn", cstk(ls)) == 0) + { + if ( current_gen != CLCG4 ) + { + sciprint(_("The %s option affects only the %s generator\n"), "setcgn", "clcg4"); + } + if ( Rhs != 2) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected with option '%s'.\n"), fname, 2, "setcgn"); + return 0; + } + GetRhsVar(2, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &l1); + if ( *istk(l1) < 0 || *istk(l1) > Maxgen ) + { + Scierror(999, _("%s: Wrong value for input argument #%d: Must be between %d and %d.\n"), fname, 2, 0, Maxgen); + return 0; + } + current_clcg4 = *istk(l1); + LhsVar(1) = 2; + PutLhsVar(); + return 0; + } + else if (strcmp("advnst", cstk(ls)) == 0) + { + int k; + if ( current_gen != CLCG4 ) + { + sciprint(_("The %s option affects only the %s generator\n"), "advnst", "clcg4"); + } + if ( Rhs != 2) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected with option '%s'.\n"), fname, 2, "advnst"); + return 0; + } + GetRhsVar(2, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &l1); + k = *istk(l1); + if ( k < 1 ) + { + Scierror(999, _("%s: Wrong value for input argument #%d: Must be > %d.\n"), fname, 2, 0); + return 0; + } + advance_state_clcg4(current_clcg4, k); + LhsVar(1) = 2; + PutLhsVar(); + return 0; + } + else if (strcmp("getcgn", cstk(ls)) == 0) + { + if ( Rhs != 1) + { + Scierror(999, _("%s: Wrong number of input argument: %d expected with option '%s'.\n"), fname, 1, "getcgn"); + return 0; + } + if ( current_gen != CLCG4 ) + { + sciprint(_("This information concerns only the clcg4 generator\n")); + } + CreateVar(2, MATRIX_OF_INTEGER_DATATYPE, &un, &un, &l1); + *istk(l1) = current_clcg4; + LhsVar(1) = 2; + PutLhsVar(); + return 0; + } + else if (strcmp("setgen", cstk(ls)) == 0) + { + int msb, nsb, lsb; + if ( Rhs != 2) + { + Scierror(999, _("%s: Wrong number of input arguments: %d expected with option '%s'.\n"), fname, 2, "setgen"); + return 0; + } + GetRhsVar(2, STRING_DATATYPE, &msb, &nsb, &lsb); + if (strcmp("mt", cstk(lsb)) == 0) + { + current_gen = MT; + } + else if (strcmp("kiss", cstk(lsb)) == 0) + { + current_gen = KISS; + } + else if (strcmp("clcg4", cstk(lsb)) == 0) + { + current_gen = CLCG4; + } + else if (strcmp("clcg2", cstk(lsb)) == 0) + { + current_gen = CLCG2; + } + else if (strcmp("urand", cstk(lsb)) == 0) + { + current_gen = URAND; + } + else if (strcmp("fsultra", cstk(lsb)) == 0) + { + current_gen = FSULTRA; + } + else + { + Scierror(999, _("%s: Wrong value for input argument #%d: '%s', '%s', '%s', '%s', '%s' or '%s' expected.\n"), fname, 2, "mt", "kiss", "clcg4", "clcg2", "urand", "fsultra"); + return 0; + } + LhsVar(1) = 2; + PutLhsVar(); + return 0; + } + else if (strcmp("getgen", cstk(ls)) == 0) + { + int l_un = 1; + if ( Rhs != 1) + { + Scierror(999, _("%s: Wrong number of input argument: %d expected with option '%s'.\n"), fname, 1, "getgen"); + return 0; + } + CreateVarFromPtr( Rhs + 2, MATRIX_OF_STRING_DATATYPE, &l_un, &l_un, &names_gen[current_gen]); + LhsVar(1) = Rhs + 2; + PutLhsVar(); + return 0; + } + else + { + Scierror(999, _("%s: Wrong value for input argument #%d: '%s' is unknown.\n"), fname, 1, cstk(ls)); + + return 0; + } + } + minrhs = 2; + CheckRhs(minrhs, maxrhs); + if ( GetType(2) == sci_matrix ) /** m,n,'string' */ + { + //find all sci_matrix before sci_string. + SciErr sciErr; + int iSize = 1; + + for (iDims = 2 ; iDims < Rhs ; iDims++) + { + int* piAddr = NULL; + sciErr = getVarAddressFromPosition(pvApiCtx, iDims + 1, &piAddr); + if (isDoubleType(pvApiCtx, piAddr)) + { + //set hypermatrix flag + iHyperMat = 1; + continue; + } + + if (isStringType(pvApiCtx, piAddr)) + { + break; + } + + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, iDims); + return 0; + } + + suite = iDims + 1; + if (iHyperMat) + { + piDims = (int*)MALLOC(sizeof(int) * iDims); + for (i = 0 ; i < iDims ; i++) + { + double dblVal = 0; + int* piAddr = NULL; + sciErr = getVarAddressFromPosition(pvApiCtx, i + 1 , &piAddr); + + if (getScalarDouble(pvApiCtx, piAddr, &dblVal)) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, i + 1); + return 0; + } + + iSize *= (int)dblVal; + piDims[i] = (int)dblVal; + } + + ResL = 1; + ResC = iSize; + + //reset iHypermat flag to make difference between input hypermatrix cases + iHyperMat = 0; + } + else + { + GetRhsVar(1, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &l1); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 1); + return 0; + } + ResL = *istk(l1); + GetRhsVar(2, MATRIX_OF_INTEGER_DATATYPE, &m2, &n2, &l2); + if ( m2 * n2 != 1) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Scalar expected.\n"), fname, 2); + return 0; + } + ResC = *istk(l2); + } + + if ( GetType(suite) != sci_strings ) + { + Scierror(999, _("%s: Wrong type for input argument #%d: String expected.\n"), fname, suite); + return 0; + } + + GetRhsVar(suite, STRING_DATATYPE, &ms, &ns, &ls); + suite++; + if (ResL < 0 && (ResL != -1 || ResC != -1)) //ResL=-1 & ResC=-1 => eye + { + Scierror(999, _("%s: Wrong value for input argument #%d: Positive scalar expected.\n"), fname, 1); + return 0; + } + + if (ResC < 0 && (ResL != -1 || ResC != -1)) //ResL=-1 & ResC=-1 => eye + { + Scierror(999, _("%s: Wrong value for input argument #%d: Positive scalar expected.\n"), fname, 2); + return 0; + } + } + else + { + int* piAddr = NULL; + getVarAddressFromPosition(pvApiCtx, 1, &piAddr); + if (isHypermatType(pvApiCtx, piAddr)) + { + //get dimension information from input hypermatrix + getHypermatDimensions(pvApiCtx, piAddr, &piDims, &iDims); + iHyperMat = 1; + + ResL = 1; + ResC = 1; + for (i = 0 ; i < iDims ; i++) + { + ResC *= piDims[i]; + } + } + else + { + GetRhsVar(1, MATRIX_OF_INTEGER_DATATYPE, &ResL, &ResC, &l1); + } + + GetRhsVar(2, STRING_DATATYPE, &ms, &ns, &ls); + suite = 3; + + } + if ( strcmp(cstk(ls), "bet") == 0) + { + double minlog = 1.e-37; + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing A and B for beta law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "A"); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "B"); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + if ( *stk(la) < minlog || *stk(lb) < minlog) + { + Scierror(999, _("Rand(...,'bet',..): A or B < %f\n"), minlog); + return 0; + } + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(genbet)(stk(la), stk(lb)); + } + + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "f") == 0) + { + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing Dfn and Dfd for F law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "Dfn"); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "Dfd"); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + if ( *stk(la) <= 0.0 || *stk(lb) <= 0.0) + { + Scierror(999, _("Degrees of freedom nonpositive\n")); + return 0; + } + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(genf)(stk(la), stk(lb)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "mul") == 0) + { + int l_i, nn, ncat; + double ptot; + if ( suite != 3 || ResL * ResC != 1) + { + Scierror(999, _("%s: Wrong value for input argument #%d: Must be the number of random deviate.\n"), fname, 1); + return 0; + } + nn = *istk(l1); + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing N and P for MULtinomial law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "N"); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m2, &n2, &lb); + if ( n2 != 1 ) + { + Scierror(999, _("%s: Wrong size for input argument: Column vector expected.\n"), fname); + return 0; + } + ncat = m2 + 1; + CreateVar(suite + 2, MATRIX_OF_INTEGER_DATATYPE, &ncat, &nn, &lr); + if ( *istk(la) < 0 ) + { + Scierror(999, _("N < 0\n")); + return 0; + } + if ( ncat <= 1) + { + Scierror(999, _("Ncat <= 1\n")); + return 0; + } + ptot = 0.0; + for ( l_i = 0 ; l_i < ncat - 1 ; l_i++ ) + { + if ( *stk(lb + l_i) < 0.0 ) + { + Scierror(999, _("P(%d) < 0\n"), l_i + 1); + return 0; + } + if ( *stk(lb + l_i) > 1.0 ) + { + Scierror(999, _("P(%d) > 1\n"), l_i + 1); + return 0; + } + ptot += *stk(lb + l_i); + } + if ( ptot > 1.0) + { + Scierror(999, _("Sum of P(i) > 1\n")); + return 0; + } + for ( l_i = 0 ; l_i < nn ; l_i++) + { + C2F(genmul)(istk(la), stk(lb), &ncat, istk(lr + ncat * l_i)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "gam") == 0) + { + if ( Rhs != suite + 1) + + /* ETRE PLUS CONSISTANT ICI : choisir entre shape , rate ou + bien A et R (idem pour le man) + */ + { + Scierror(999, _("Missing shape and rate for Gamma law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "shape"); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "rate"); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + if ( (*stk(la)) <= 0.0 || (*stk(lb)) <= 0.0 ) + { + Scierror(999, _("grand(..'gam',A,R) : A <= 0.0 or R <= 0.0\n")); + return 0; + } + for ( i = 0 ; i < ResL * ResC ; i++) + { + /** WARNING : order is changed in parameters for + compatibility between Rand(...'gam',..) and cdfgam + **/ + pdblData[i] = C2F(gengam)(stk(lb), stk(la)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "nor") == 0) + { + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing Av and Sd for Normal law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "Av"); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong size for input argument: Scalar expected for %s.\n"), fname, "Sd"); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + if ( *stk(lb) < 0 ) + { + Scierror(999, _("SD < 0.0\n")); + return 0; + } + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(gennor)(stk(la), stk(lb)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "unf") == 0) + { + double low = 0, high = 0; + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing Low and High for Uniform Real law\n")); + return 0; + } + + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + low = *stk(la); + high = *stk(lb); + if ( low > high ) + { + Scierror(999, _("%s: Wrong type for input argument. Low < High expected.\n"), fname); + return 0; + } + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = low + (high - low) * C2F(ranf)(); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "uin") == 0) + { + double a = 0, b = 0; + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing Low and High for Uniform int law\n")); + return 0; + } + + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + a = *stk(la); + b = *stk(lb); + + if ( a > b ) + { + Scierror(999, _("%s: Wrong type for input argument. Low < High expected.\n"), fname); + return 0; + } + + if ( a != floor(a) || b != floor(b) || (b - a + 1) > 2147483561 ) + { + Scierror(999, _("a and b must integers with (b-a+1) <= 2147483561")); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(ignuin)(stk(la), stk(lb)); + } + + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "lgi") == 0) + { + if ( Rhs != suite - 1 ) + { + Scierror(999, _("%s: Wrong number of input argument: %d expected with option '%s'.\n"), fname, suite - 1, "lgi"); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = ignlgi(); + } + LhsVar(1) = suite; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "prm") == 0) + { + int nn, Cmplx, *header; + if ( suite != 3 || ResL * ResC != 1) + { + Scierror(999, _("%s: Wrong value for input argument: Number of random simulation expected.\n"), fname); + return 0; + } + nn = *istk(l1); + if ( Rhs != suite) + { + Scierror(999, _("Missing vect for random permutation\n")); + return 0; + } + switch (GetType(suite)) + { + case 1: + header = (int *)GetData(suite); + Cmplx = header[3]; + if (Cmplx == 0) + { + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( n1 != 1) + { + OverLoad(suite); + return 0; + } + break; + } + else + { + OverLoad(suite); // Complex, call %s_grand + return 0; + break; + } + case 2: // Polynomial, call %p_grand + case 4: // Boolean, call %b_grand + case 5: // Sparse, call %sp_grand + case 8: // Integer, call %i_grand + case 10: // String, call %c_grand + case 17: // String, call %c_grand + OverLoad(suite); + return 0; + break; + default: + Scierror(999, _("%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n"), fname); + return 0; + } + CreateVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &nn, &lr); + for ( i = 0 ; i < nn ; i++) + { + int j ; + for (j = 0; j < m1 ; j++ ) + { + *stk(lr + (m1)*i + j) = *stk(la + j); + } + C2F(genprm)(stk(lr + (m1)*i), &m1); + } + LhsVar(1) = suite + 1; + PutLhsVar(); + return 0; + } + else if ( strcmp(cstk(ls), "nbn") == 0) + { + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing N and P for Negative Binomial law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + if ( *stk(lb) < 0.0 || *stk(lb) > 1.0 ) + { + Scierror(999, _("P is not in [0,1]\n")); + return 0; + } + if ( *istk(la) < 0 ) + { + Scierror(999, _("N < 0\n")); + return 0; + } + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = (double) C2F(ignnbn)(istk(la), stk(lb)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "bin") == 0) + { + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing N and P for Binomial law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_INTEGER_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + if ( *stk(lb) < 0.0 || *stk(lb) > 1.0 ) + { + Scierror(999, _("P is not in [0,1]\n")); + return 0; + } + if ( *istk(la) < 0 ) + { + Scierror(999, _("N < 0\n")); + return 0; + } + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = (double) C2F(ignbin)(istk(la), stk(lb)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + + else if ( strcmp(cstk(ls), "mn") == 0) + { + int nn, un = 1, work, mp, parm, ierr; + if ( suite != 3 || ResL * ResC != 1) + { + Scierror(999, _("%s: Wrong value for input argument #%d: Must be the number of random simulation.\n"), fname, 1); + return 0; + } + nn = *istk(l1); + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing Mean and Cov for Multivariate Normal law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Column vector expected.\n"), fname); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m2, &n2, &lb); + if ( m2 != n2 ) + { + Scierror(999, _("%s: Wrong type for input argument: Square matrix expected.\n"), fname); + return 0; + } + if ( m2 != m1 ) + { + Scierror(999, _("%s: Wrong type for input arguments: Mean and Cov have incompatible dimensions\n"), fname); + return 0; + } + + CreateVar(suite + 2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &nn, &lr); + CreateVar(suite + 3, MATRIX_OF_DOUBLE_DATATYPE, &m1, &un, &work); + mp = m1 * (m1 + 3) / 2 + 1; + CreateVar(suite + 4, MATRIX_OF_DOUBLE_DATATYPE, &mp, &un, &parm); + if ( m1 <= 0 ) + { + Scierror(999, _("%s: Wrong size for input arguments: Mean and Cov are of null size.\n"), fname); + return 0; + } + C2F(setgmn)(stk(la), stk(lb), &m2, &m1, stk(parm), &ierr); + if ( ierr == 1) + { + SciError(999); + return 0; + } + for ( i = 0 ; i < nn ; i++) + { + C2F(genmn)(stk(parm), stk(lr + (m1)*i), stk(work)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "markov") == 0) + { + int nn, n1p1, lr1, j, icur, mm, jj; + if ( suite != 3 || ResL * ResC != 1) + { + Scierror(999, _("%s: Wrong value for input argument #%d: Must be the number of random simulation.\n"), fname, 1); + return 0; + } + nn = *istk(l1); + if ( Rhs != suite + 1 ) + { + Scierror(999, _("%s: Missing P matrix and X0 for Markov chain\n"), "fname"); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + GetRhsVar(suite + 1, MATRIX_OF_INTEGER_DATATYPE, &m2, &n2, &lb); + if ( m1 != n1 && m1 != 1 ) + { + Scierror(999, _("%s: Wrong type for input argument #%d: Square matrix or row vector expected.\n"), fname, 2); + return 0; + } + + if ( m2 * n2 == 0 ) + { + Scierror(999, _("X0 is empty\n")); + return 0; + } + + for ( i = 0 ; i < m2 * n2 ; i++) + if ( *istk(lb + i) - 1 < 0 || *istk(lb + i) - 1 >= n1 ) + { + Scierror(999, _("%s: X0(%d) must be in the range [1,%d[\n"), fname, i + 1, n1 + 1); + return 0; + } + mm = m2 * n2; + CreateVar(suite + 2, MATRIX_OF_INTEGER_DATATYPE, &mm, &nn, &lr); + + n1p1 = n1 + 1; + CreateVar(suite + 3, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1p1, &lr1); + for ( i = 0 ; i < m1 ; i++ ) + { + double ptot = 0.0; + for ( j = 0 ; j < n1 ; j++ ) + { + if ( *stk(la + i + m1 * j) < 0 ) + { + Scierror(999, _("P(%d,%d) < 0\n"), i + 1, j + 1); + return 0; + } + if ( *stk(la + i + m1 * j) > 1 ) + { + Scierror(999, _("P(%d,%d) > 1\n"), i + 1, j + 1); + return 0; + } + ptot += *stk(la + i + m1 * j) ; + } + if ( fabs(ptot - 1.0) > 1e-8 ) + { + Scierror(999, _("Sum of P(%d,1:%d)=%f ~= 1\n"), i + 1, n1, ptot); + return 0; + } + } + /** Computing the cumulative sum of the P matrix **/ + for ( i = 0 ; i < m1 ; i++) + { + double cumsum = 0.0; + *stk(lr1 + i) = cumsum; + for ( j = 1; j < n1p1 ; j++ ) + { + cumsum += *stk(la + i + m1 * (j - 1)); + *stk(lr1 + i + m1 * j) = cumsum; + } + } + for ( jj = 0 ; jj < mm ; jj++) + { + icur = *istk(lb + jj) - 1; + for ( i = 0 ; i < nn ; i++) + { + int niv = 0; + double rr = C2F(ranf)(); + if ( m1 == 1 ) + { + icur = 0; + } + while ( rr >= *stk(lr1 + icur + m1 * niv) && niv < n1p1 ) + { + niv++; + } + /** projection to avoid boundaries **/ + niv = Max(Min(niv, n1), 1); + *istk(lr + jj + mm * i) = niv ; + icur = niv - 1; + } + } + LhsVar(1) = suite + 2; + PutLhsVar(); + return 0; + } + else if ( strcmp(cstk(ls), "def") == 0) + { + if ( Rhs != suite - 1 ) + { + Scierror(999, _("%s: Wrong number of input argument.\n"), fname); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(ranf)(); + } + LhsVar(1) = suite; + PutLhsVar(); + } + + else if ( strcmp(cstk(ls), "nch") == 0) + { + if ( Rhs != suite + 1) + { + Scierror(999, _("Missing Df and Xnonc for non-central chi-square law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + if ( *stk(la) < 1.0 || *stk(lb) < 0.0 ) + { + Scierror(999, _("DF < 1 or XNONC < 0\n")); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 2, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(gennch)(stk(la), stk(lb)); + } + LhsVar(1) = suite + 2; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "nf") == 0) + { + if ( Rhs != suite + 2) + { + Scierror(999, _("Missing Dfn, Dfd and Xnonc for non-central F law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + GetRhsVar(suite + 1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lb); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + GetRhsVar(suite + 2, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &lc); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + if ( *stk(la) < 1.0 || *stk(lb) < 0.0 || *stk(lc) < 0.0 ) + { + Scierror(999, _("DF < 1.0 or DF <= 0.0 or Xnonc < 0.0\n")); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 3, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(gennf)(stk(la), stk(lb), stk(lc)); + } + LhsVar(1) = suite + 3; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "chi") == 0) + { + if ( Rhs != suite ) + { + Scierror(999, _("Missing Df for chi-square law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + if ( *stk(la) <= 0.0) + { + Scierror(999, _("Rand: DF <= 0\n")); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 1, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(genchi)(stk(la)); + } + LhsVar(1) = suite + 1; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "poi") == 0) + { + if ( Rhs != suite ) + { + Scierror(999, _("Missing Av for Poisson law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + if ( *stk(la) < 0.0 ) + { + Scierror(999, _("Av < 0\n")); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 1, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = (double) C2F(ignpoi)(stk(la)); + } + LhsVar(1) = suite + 1; + PutLhsVar(); + } + else if ( strcmp(cstk(ls), "geom") == 0) + { + double p; + if ( Rhs != suite ) + { + Scierror(999, _("Missing p for Geometric law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + p = *stk(la); + if ( p < 1.3e-307 || p > 1 ) + { + Scierror(999, _("%s: Wrong value for input argument: Must be between '%s' and %d.\n"), fname, "pmin", 1); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 1, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = igngeom(p); + } + LhsVar(1) = suite + 1; + PutLhsVar(); + } + + else if ( strcmp(cstk(ls), "exp") == 0) + { + if ( Rhs != suite ) + { + Scierror(999, _("Missing Av for exponential law\n")); + return 0; + } + GetRhsVar(suite, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &la); + if ( m1 * n1 != 1) + { + Scierror(999, _("%s: Wrong type for input argument: Scalar expected.\n"), fname); + return 0; + } + + if ( *stk(la) < 0.0 ) + { + Scierror(999, _("Av < 0.0\n")); + return 0; + } + + pdblData = createOutputVar(pvApiCtx, suite + 1, ResL, ResC, piDims, iDims); + + for ( i = 0 ; i < ResL * ResC ; i++) + { + pdblData[i] = C2F(genexp)(stk(la)); + } + LhsVar(1) = suite + 1; + PutLhsVar(); + } + else + { + Scierror(999, _("%s: Wrong value for input argument %s.\n"), fname, cstk(ls)); + return 0; + } + + if (piDims && iHyperMat == 0) + { + FREE(piDims); + } + + return 0; +} + + +static double* createOutputVar(void* _pvCtx, int _iVar, int _iRows, int _iCols, int* _piDims, int _iDims) +{ + double* pdblData = NULL; + if (_piDims) + { + int* piAddr = NULL; + int* piAddrEntries = NULL; + int iRows = 0, iCols = 0; + allocHypermatOfDouble(pvApiCtx, _iVar, _piDims, _iDims, &pdblData); + } + else + { + int lr = 0; + CreateVar(_iVar, MATRIX_OF_DOUBLE_DATATYPE, &_iRows, &_iCols, &lr); + pdblData = stk(lr); + } + + return pdblData; +} diff --git a/modules/randlib/sci_gateway/randlib_gateway.xml b/modules/randlib/sci_gateway/randlib_gateway.xml new file mode 100755 index 000000000..084ba18e3 --- /dev/null +++ b/modules/randlib/sci_gateway/randlib_gateway.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> + +<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd"> +<GATEWAY name="randlib"> + <!-- =================== --> + <!-- + Scilab + Interface description. In this file, we define the list of the function which + will be available into Scilab and the link to the "native" function. + + gatewayId is the position in the hashtable 'Interfaces' defined in the + file SCI/modules/core/src/c/callinterf.h + + primitiveId is the position in the hashtable '<module>Table Tab[]' defined + in the file modules/<module>/sci_gateway/c/gw_<module>.c + + primitiveName is the name of the Scilab function + + @author Allan CORNET + @author Sylvestre LEDRU + @date INRIA 2007 + =================== + Don't touch if you do not know what you are doing +--> + <!-- =================== --> + + <PRIMITIVE gatewayId="38" primitiveId="1" primitiveName="grand" /> +</GATEWAY> diff --git a/modules/randlib/src/c/.deps/.dirstamp b/modules/randlib/src/c/.deps/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/randlib/src/c/.deps/.dirstamp diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-clcg2.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-clcg2.Plo new file mode 100755 index 000000000..be97e952b --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-clcg2.Plo @@ -0,0 +1,82 @@ +src/c/libscirandlib_algo_la-clcg2.lo: src/c/clcg2.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + ../../modules/localization/includes/localization.h \ + ../../modules/core/includes/machine.h /usr/include/libintl.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/xlocale.h \ + ../../modules/output_stream/includes/sciprint.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + ../../modules/core/includes/BOOL.h includes/others_generators.h \ + includes/dynlib_randlib.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +../../modules/localization/includes/localization.h: + +../../modules/core/includes/machine.h: + +/usr/include/libintl.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/xlocale.h: + +../../modules/output_stream/includes/sciprint.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +../../modules/core/includes/BOOL.h: + +includes/others_generators.h: + +includes/dynlib_randlib.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-clcg4.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-clcg4.Plo new file mode 100755 index 000000000..d22016da7 --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-clcg4.Plo @@ -0,0 +1,92 @@ +src/c/libscirandlib_algo_la-clcg4.lo: src/c/clcg4.c \ + /usr/include/stdc-predef.h includes/clcg4.h includes/dynlib_randlib.h \ + /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + ../../modules/output_stream/includes/sciprint.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + ../../modules/core/includes/BOOL.h includes/others_generators.h \ + ../../modules/localization/includes/localization.h \ + ../../modules/core/includes/machine.h /usr/include/libintl.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/xlocale.h \ + ../../modules/core/includes/warningmode.h \ + ../../modules/core/includes/BOOL.h ../../modules/core/includes/machine.h + +/usr/include/stdc-predef.h: + +includes/clcg4.h: + +includes/dynlib_randlib.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +../../modules/output_stream/includes/sciprint.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +../../modules/core/includes/BOOL.h: + +includes/others_generators.h: + +../../modules/localization/includes/localization.h: + +../../modules/core/includes/machine.h: + +/usr/include/libintl.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/xlocale.h: + +../../modules/core/includes/warningmode.h: + +../../modules/core/includes/BOOL.h: + +../../modules/core/includes/machine.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-fsultra.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-fsultra.Plo new file mode 100755 index 000000000..453522321 --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-fsultra.Plo @@ -0,0 +1,82 @@ +src/c/libscirandlib_algo_la-fsultra.lo: src/c/fsultra.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + includes/others_generators.h includes/dynlib_randlib.h \ + ../../modules/output_stream/includes/sciprint.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + ../../modules/core/includes/BOOL.h \ + ../../modules/localization/includes/localization.h \ + ../../modules/core/includes/machine.h /usr/include/libintl.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/others_generators.h: + +includes/dynlib_randlib.h: + +../../modules/output_stream/includes/sciprint.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +../../modules/core/includes/BOOL.h: + +../../modules/localization/includes/localization.h: + +../../modules/core/includes/machine.h: + +/usr/include/libintl.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/xlocale.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-genbet.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-genbet.Plo new file mode 100755 index 000000000..0c2a19652 --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-genbet.Plo @@ -0,0 +1,150 @@ +src/c/libscirandlib_algo_la-genbet.lo: src/c/genbet.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h includes/grand.h \ + includes/dynlib_randlib.h ../../modules/core/includes/machine.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/values.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/float.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/values.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/float.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-ignbin.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-ignbin.Plo new file mode 100755 index 000000000..f580cfee8 --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-ignbin.Plo @@ -0,0 +1,150 @@ +src/c/libscirandlib_algo_la-ignbin.lo: src/c/ignbin.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h includes/grand.h \ + includes/dynlib_randlib.h ../../modules/core/includes/machine.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/values.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/float.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/values.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/float.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-igngeom.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-igngeom.Plo new file mode 100755 index 000000000..06b992c3f --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-igngeom.Plo @@ -0,0 +1,57 @@ +src/c/libscirandlib_algo_la-igngeom.lo: src/c/igngeom.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h includes/grand.h \ + includes/dynlib_randlib.h ../../modules/core/includes/machine.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +../../modules/core/includes/machine.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-ignpoi.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-ignpoi.Plo new file mode 100755 index 000000000..b9135b1d4 --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-ignpoi.Plo @@ -0,0 +1,150 @@ +src/c/libscirandlib_algo_la-ignpoi.lo: src/c/ignpoi.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h includes/grand.h \ + includes/dynlib_randlib.h ../../modules/core/includes/machine.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/values.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/float.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/values.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/float.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-kiss.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-kiss.Plo new file mode 100755 index 000000000..d62066faa --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-kiss.Plo @@ -0,0 +1,82 @@ +src/c/libscirandlib_algo_la-kiss.lo: src/c/kiss.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + ../../modules/output_stream/includes/sciprint.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + ../../modules/core/includes/BOOL.h includes/others_generators.h \ + includes/dynlib_randlib.h \ + ../../modules/localization/includes/localization.h \ + ../../modules/core/includes/machine.h /usr/include/libintl.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +../../modules/output_stream/includes/sciprint.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +../../modules/core/includes/BOOL.h: + +includes/others_generators.h: + +includes/dynlib_randlib.h: + +../../modules/localization/includes/localization.h: + +../../modules/core/includes/machine.h: + +/usr/include/libintl.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/xlocale.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-mt.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-mt.Plo new file mode 100755 index 000000000..d889b654e --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-mt.Plo @@ -0,0 +1,84 @@ +src/c/libscirandlib_algo_la-mt.lo: src/c/mt.c /usr/include/stdc-predef.h \ + /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h includes/grand.h \ + includes/dynlib_randlib.h ../../modules/core/includes/machine.h \ + ../../modules/output_stream/includes/sciprint.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + ../../modules/core/includes/BOOL.h includes/others_generators.h \ + ../../modules/localization/includes/localization.h \ + /usr/include/libintl.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/locale.h /usr/include/x86_64-linux-gnu/bits/locale.h \ + /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +../../modules/core/includes/machine.h: + +../../modules/output_stream/includes/sciprint.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +../../modules/core/includes/BOOL.h: + +includes/others_generators.h: + +../../modules/localization/includes/localization.h: + +/usr/include/libintl.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/xlocale.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-sexpo.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-sexpo.Plo new file mode 100755 index 000000000..7297f4c5b --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-sexpo.Plo @@ -0,0 +1,150 @@ +src/c/libscirandlib_algo_la-sexpo.lo: src/c/sexpo.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h includes/grand.h \ + includes/dynlib_randlib.h ../../modules/core/includes/machine.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/values.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/float.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/values.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/float.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-sgamma.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-sgamma.Plo new file mode 100755 index 000000000..70dd2c995 --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-sgamma.Plo @@ -0,0 +1,150 @@ +src/c/libscirandlib_algo_la-sgamma.lo: src/c/sgamma.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h includes/grand.h \ + includes/dynlib_randlib.h ../../modules/core/includes/machine.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/values.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/float.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +includes/grand.h: + +includes/dynlib_randlib.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/include/values.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/float.h: diff --git a/modules/randlib/src/c/.deps/libscirandlib_algo_la-urand.Plo b/modules/randlib/src/c/.deps/libscirandlib_algo_la-urand.Plo new file mode 100755 index 000000000..c569a88f2 --- /dev/null +++ b/modules/randlib/src/c/.deps/libscirandlib_algo_la-urand.Plo @@ -0,0 +1,82 @@ +src/c/libscirandlib_algo_la-urand.lo: src/c/urand.c \ + /usr/include/stdc-predef.h /usr/include/math.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + ../../modules/output_stream/includes/sciprint.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + ../../modules/core/includes/BOOL.h includes/others_generators.h \ + includes/dynlib_randlib.h \ + ../../modules/localization/includes/localization.h \ + ../../modules/core/includes/machine.h /usr/include/libintl.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +../../modules/output_stream/includes/sciprint.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +../../modules/core/includes/BOOL.h: + +includes/others_generators.h: + +includes/dynlib_randlib.h: + +../../modules/localization/includes/localization.h: + +../../modules/core/includes/machine.h: + +/usr/include/libintl.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/xlocale.h: diff --git a/modules/randlib/src/c/.dirstamp b/modules/randlib/src/c/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/randlib/src/c/.dirstamp diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-clcg2.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-clcg2.o Binary files differnew file mode 100755 index 000000000..11aa1fa55 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-clcg2.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-clcg4.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-clcg4.o Binary files differnew file mode 100755 index 000000000..a681320e7 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-clcg4.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-fsultra.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-fsultra.o Binary files differnew file mode 100755 index 000000000..d6515a7b1 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-fsultra.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-genbet.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-genbet.o Binary files differnew file mode 100755 index 000000000..02c118f9f --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-genbet.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-ignbin.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-ignbin.o Binary files differnew file mode 100755 index 000000000..31399d104 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-ignbin.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-igngeom.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-igngeom.o Binary files differnew file mode 100755 index 000000000..5b31c4933 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-igngeom.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-ignpoi.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-ignpoi.o Binary files differnew file mode 100755 index 000000000..333882065 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-ignpoi.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-kiss.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-kiss.o Binary files differnew file mode 100755 index 000000000..dbd256066 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-kiss.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-mt.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-mt.o Binary files differnew file mode 100755 index 000000000..73a051e62 --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-mt.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-sexpo.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-sexpo.o Binary files differnew file mode 100755 index 000000000..7e96c215b --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-sexpo.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-sgamma.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-sgamma.o Binary files differnew file mode 100755 index 000000000..466e0aabd --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-sgamma.o diff --git a/modules/randlib/src/c/.libs/libscirandlib_algo_la-urand.o b/modules/randlib/src/c/.libs/libscirandlib_algo_la-urand.o Binary files differnew file mode 100755 index 000000000..2ba0809ed --- /dev/null +++ b/modules/randlib/src/c/.libs/libscirandlib_algo_la-urand.o diff --git a/modules/randlib/src/c/DllmainRandlib.c b/modules/randlib/src/c/DllmainRandlib.c new file mode 100755 index 000000000..d3d8175b4 --- /dev/null +++ b/modules/randlib/src/c/DllmainRandlib.c @@ -0,0 +1,34 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Allan CORNET <allan.cornet@inria.fr> + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#include <windows.h> +/*--------------------------------------------------------------------------*/ +#pragma comment(lib,"../../../../bin/libintl.lib") +/*--------------------------------------------------------------------------*/ +int WINAPI DllMain (HINSTANCE hInstance , DWORD reason, PVOID pvReserved) +{ + switch (reason) + { + case DLL_PROCESS_ATTACH: + break; + case DLL_PROCESS_DETACH: + break; + case DLL_THREAD_ATTACH: + break; + case DLL_THREAD_DETACH: + break; + } + return 1; +} +/*--------------------------------------------------------------------------*/ + diff --git a/modules/randlib/src/c/clcg2.c b/modules/randlib/src/c/clcg2.c new file mode 100755 index 000000000..94471a48a --- /dev/null +++ b/modules/randlib/src/c/clcg2.c @@ -0,0 +1,107 @@ +/* + * + * Copyright (C) 2010 - DIGITEO - Michael Baudin + * Copyright (C) 2004 - Bruno Pincon + * Copyright (C) Luc Devroye + * Copyright (C) Pierre Lecuyer + * + * PURPOSE + * uniform random number generator developed by Pierre + * Lecuyer based on a clever and tested combination of + * two linear congruential sequences + * + * s1 <- a1*s1 mod m1 , a1 = 40014, m1 = 2147483563 + * s2 <- a2*s2 mod m2 , a2 = 40692, m2 = 2147483399 + * + * output <- s1-s2 mod (m1 - 1) + * + * so output is in [0, 2147483561], period about 2.3 10^18 + * + * The state is given by (s1, s2). In case of a user + * modification of the state we must have : + * + * s1 in [1, m1-1] + * s2 in [1, m2-1] + * + * ORIGIN + * The basic code is provided at the Luc Devroye 's home page. + * Modifications by Bruno Pincon (in particular added routines + * to set and get the state, and modify the generator to get + * exactly s1-s2 mod (m1 - 1) for "coherence" with the others + * generators : provides numbers in [0, MaxRngInt(generator)] + * (see NOTE some lines after) + * + */ + +#include <math.h> +#include "localization.h" +#include "sciprint.h" +#include "others_generators.h" + +/* initial default state (seeds) : */ +static int s1 = 1234567890 ; +static int s2 = 123456789 ; + +unsigned long int clcg2(void) +{ + register int k, z; + + /* s1 = a1*s1 mod m1 (Schrage 's method) */ + k = s1 / 53668; + s1 = 40014 * (s1 % 53668) - k * 12211; + if (s1 < 0) + { + s1 += 2147483563; + } + + /* s2 = a2*s2 mod m2 (Schrage 's method) */ + k = s2 / 52774; + s2 = 40692 * (s2 % 52774) - k * 3791; + if (s2 < 0) + { + s2 += 2147483399; + } + + /* final step : z = s1-s2 mod m1-1 */ + z = s1 - s2; /* here z is in [2-m2,m1-2] */ + if (z < 0) + { + z += 2147483562; + } + + /* NOTE : in the original implementation the final test is : + * if (z < 1) z += 2147483562; + * + * which is not exactly z = s1-s2 mod (m1 - 1) + * + * This is also why it is different from the version used by + * randlib. + */ + + return( (unsigned int) z ); +} + +int set_state_clcg2(double g1, double g2) +{ + + if ( g1 == floor(g1) && g2 == floor(g2) && + 1 <= g1 && g1 <= 2147483562 && + 1 <= g2 && g2 <= 2147483398 ) + { + s1 = (int) g1; + s2 = (int) g2; + return ( 1 ); + } + else + { + sciprint(_("\nBad seeds for clcg2, must be integers with s1 in [1, 2147483562]\n and s2 in [1, 2147483398]\n")); + return ( 0 ); + } +} + +void get_state_clcg2(double g[]) +{ + g[0] = (double) s1; + g[1] = (double) s2; +} + diff --git a/modules/randlib/src/c/clcg4.c b/modules/randlib/src/c/clcg4.c new file mode 100755 index 000000000..241575095 --- /dev/null +++ b/modules/randlib/src/c/clcg4.c @@ -0,0 +1,419 @@ +/* + * + * Copyright (C) 2010 - DIGITEO - Michael Baudin + * Copyright (C) 2004 - Bruno Pincon + * Copyright (C) 1998 - Terry H. Andres + * Copyright (C) 1998 - Pierre Lecuyer + * + * PURPOSE + * clcg4 generator stuff + * + * AUTHORS + * The following code is from L'Ecuyer and Andres "A Randow Number based + * on the combinaison of Four LCG" (distributed at the Pierre L'Ecuyer + * home page with a corresponding paper). + * + * NOTES + * The original code was slightly modified by Bruno Pincon for inclusion + * in Scilab. + * + * list of main modifs : + * + * - lot of routine 's names have changed to have some kind of + * uniformity with the others generators + * + * - add a var is_init so that initialisation is performed inside + * this module (to simplify the interface). And bring modif in + * the different routines : + * if (!is_init) then proceed to initialisation ... + * + * - add a routine advance_state_clcg4 (for compatibility with the + * old package (Scilab used this feature)) + * + * - I have change the generator (clcg4 routine) so as it has the + * form (1) in place of (2) (see the joined paper of L'Ecuyer & + * Andres) : + * + * From the 4 LCG : + * + * x_{j,n} = a_j * x_{j,n-1} mod m_j 0 <= j <= 3 + * + * The output with form (2) (original form in this code) : + * + * z_n = ( sum_j delta_j * x_{j,n} / m_j ) mod 1 + * + * have been changed in the form (1) : + * + * z_n = ( sum_j delta_j * x_{j,n} ) mod m_1 (then u_n = z_n / m_1) + * + * to have some "uniformity" with all the others generators (which + * gives integers). Also it is better for the uin(a,b) generation + * to start from integers. + */ + + +/*---------------------------------------------------------------------*/ +/* clcg4.c Implementation module */ +/*---------------------------------------------------------------------*/ + +#include "clcg4.h" +#include <math.h> /* for floor */ +#include "sciprint.h" +#include "others_generators.h" +#include "localization.h" +#include "warningmode.h" + +/***********************************************************************/ +/* Private part. */ +/***********************************************************************/ + +#define H 32768 /* = 2^15 : use in MultModM. */ + +static int aw[4], avw[4], /* a[j]^{2^w} et a[j]^{2^{v+w}}. */ + a[4] = { 45991, 207707, 138556, 49689 }, + m[4] = { 2147483647, 2147483543, 2147483423, 2147483323 }; + +static int Ig[4][Maxgen + 1], Lg[4][Maxgen + 1], Cg[4][Maxgen + 1]; +/* Initial seed, previous seed, and current seed. */ + + +static int is_init = 0; +static int v_default = 31; +static int w_default = 41; + + +static int MultModM (int s, int t, int M) +/* Returns (s*t) MOD M. Assumes that -M < s < M and -M < t < M. */ +/* See L'Ecuyer and Cote (1991). */ +{ + int R, S0, S1, q, qh, rh, k; + + if (s < 0) + { + s += M; + } + if (t < 0) + { + t += M; + } + if (s < H) + { + S0 = s; + R = 0; + } + else + { + S1 = s / H; + S0 = s - H * S1; + qh = M / H; + rh = M - H * qh; + if (S1 >= H) + { + S1 -= H; + k = t / qh; + R = H * (t - k * qh) - k * rh; + while (R < 0) + { + R += M; + } + } + else + { + R = 0; + } + if (S1 != 0) + { + q = M / S1; + k = t / q; + R -= k * (M - S1 * q); + if (R > 0) + { + R -= M; + } + R += S1 * (t - k * q); + while (R < 0) + { + R += M; + } + } + k = R / qh; + R = H * (R - k * qh) - k * rh; + while (R < 0) + { + R += M; + } + } + if (S0 != 0) + { + q = M / S0; + k = t / q; + R -= k * (M - S0 * q); + if (R > 0) + { + R -= M; + } + R += S0 * (t - k * q); + while (R < 0) + { + R += M; + } + } + return R; +} + +static void comp_aw_and_avw(int v, int w) +{ + int i, j; + for (j = 0; j < 4; j++) + { + aw [j] = a [j]; + for (i = 1; i <= w; i++) + { + aw [j] = MultModM (aw [j], aw [j], m[j]); + } + avw [j] = aw [j]; + for (i = 1; i <= v; i++) + { + avw [j] = MultModM (avw [j], avw [j], m[j]); + } + } +} + +static void init_clcg4(int v, int w) +{ + /* currently the scilab interface don't let the user chooses + * v and w (always v_default and w_default) so this routine + * is in the "private" part (also because initialisation is + * always perform inside this module, depending of the var + * is_init) + */ + double sd[4] = {11111111., 22222222., 33333333., 44444444.}; + comp_aw_and_avw(v, w); + set_initial_seed_clcg4(sd[0], sd[1], sd[2], sd[3]); +} + +static int verif_seeds_clcg4(double s0, double s1, double s2, double s3) +{ + /* verify that the seeds are "integers" and are in the good range */ + if ( s0 == floor(s0) && s1 == floor(s1) && + s2 == floor(s2) && s3 == floor(s3) && + 1 <= s0 && s0 <= 2147483646 && + 1 <= s1 && s1 <= 2147483542 && + 1 <= s2 && s2 <= 2147483422 && + 1 <= s3 && s3 <= 2147483322 ) + { + return ( 1 ); + } + else + { + return ( 0 ); + } +} + +static void display_info_clcg4(void) +{ + /* display the seeds range (in case of error) */ + sciprint(_("\n bad seeds for clcg4, must be integers with s1 in [1, 2147483646]\n s2 in [1, 2147483542]\n s3 in [1, 2147483422]\n s4 in [1, 2147483322]")); +} + + +/*---------------------------------------------------------------------*/ +/* Public part. */ +/*---------------------------------------------------------------------*/ + + +int set_seed_clcg4(int g, double s0, double s1, double s2, double s3) +{ + if (! is_init ) + { + init_clcg4(v_default, w_default); + is_init = 1; + }; + + if ( verif_seeds_clcg4(s0, s1, s2, s3) ) + { + Ig [0][g] = (int) s0; + Ig [1][g] = (int) s1; + Ig [2][g] = (int) s2; + Ig [3][g] = (int) s3; + init_generator_clcg4(g, InitialSeed); + if (getWarningMode()) + { + sciprint(_("WARNING: %s\n"), _("be aware that you may have lost synchronization\n between the virtual generator %d and the others.\n use grand(\"setall\", s1, s2, s3, s4) if you want to recover it."), g); + } + return ( 1 ); + } + else + { + display_info_clcg4(); + return ( 0 ); + } +} + +void get_state_clcg4(int g, double s[4]) +{ + int j; + if (! is_init ) + { + init_clcg4(v_default, w_default); + is_init = 1; + }; + for (j = 0; j < 4; j++) + { + s [j] = (double) Cg [j][g]; + } +} + +void init_generator_clcg4(int g, SeedType Where) +{ + int j; + if (! is_init ) + { + init_clcg4(v_default, w_default); + is_init = 1; + }; + for (j = 0; j < 4; j++) + { + switch (Where) + { + case InitialSeed : + Lg [j][g] = Ig [j][g]; + break; + case NewSeed : + Lg [j][g] = MultModM (aw [j], Lg [j][g], m [j]); + break; + case LastSeed : + break; + } + Cg [j][g] = Lg [j][g]; + } +} + +void advance_state_clcg4(int g, int k) +{ + int b[4]; + int i, j; + + if (! is_init ) + { + init_clcg4(v_default, w_default); + is_init = 1; + }; + + for ( j = 0 ; j < 4 ; j++ ) + { + b[j] = a[j]; + for ( i = 1 ; i <= k ; i++ ) + { + b[j] = MultModM( b[j], b[j], m[j]); + } + Ig[j][g] = MultModM ( b[j], Cg[j][g], m[j] ); + } + init_generator_clcg4(g, InitialSeed); +} + +int set_initial_seed_clcg4(double s0, double s1, double s2, double s3) +{ + int g, j; + + if (! is_init ) + { + comp_aw_and_avw(v_default, w_default); + } + + if ( ! verif_seeds_clcg4(s0, s1, s2, s3) ) + { + display_info_clcg4(); + return ( 0 ); + }; + + is_init = 1; + Ig [0][0] = (int) s0; + Ig [1][0] = (int) s1; + Ig [2][0] = (int) s2; + Ig [3][0] = (int) s3; + init_generator_clcg4(0, InitialSeed); + for (g = 1; g <= Maxgen; g++) + { + for (j = 0; j < 4; j++) + { + Ig [j][g] = MultModM (avw [j], Ig [j][g - 1], m [j]); + } + init_generator_clcg4(g, InitialSeed); + } + return ( 1 ); +} + +unsigned int clcg4(int g) +{ + /* Modif Bruno : the generator have now the form (1) in place of (2) */ + + int k, s; + double u; + + if (! is_init ) + { + init_clcg4(v_default, w_default); + is_init = 1; + }; + + /* advance the 4 LCG */ + s = Cg [0][g]; + k = s / 46693; + s = 45991 * (s - k * 46693) - k * 25884; + if (s < 0) + { + s = s + 2147483647; + } + Cg [0][g] = s; + + s = Cg [1][g]; + k = s / 10339; + s = 207707 * (s - k * 10339) - k * 870; + if (s < 0) + { + s = s + 2147483543; + } + Cg [1][g] = s; + + s = Cg [2][g]; + k = s / 15499; + s = 138556 * (s - k * 15499) - k * 3979; + if (s < 0) + { + s = s + 2147483423; + } + Cg [2][g] = s; + + s = Cg [3][g]; + k = s / 43218; + s = 49689 * (s - k * 43218) - k * 24121; + if (s < 0) + { + s = s + 2147483323; + } + Cg [3][g] = s; + + /* final step */ + u = (double)(Cg[0][g] - Cg[1][g]) + (double)(Cg[2][g] - Cg[3][g]); + /* we must do u mod 2147483647 with u in [- 4294966863 ; 4294967066 ] : */ + if (u < 0) + { + u += 2147483647; + } + if (u < 0) + { + u += 2147483647; + } + if (u >= 2147483647) + { + u -= 2147483647; + } + if (u >= 2147483647) + { + u -= 2147483647; + } + + return ((unsigned int) u ); + +} diff --git a/modules/randlib/src/c/core_Import.def b/modules/randlib/src/c/core_Import.def new file mode 100755 index 000000000..7f3235745 --- /dev/null +++ b/modules/randlib/src/c/core_Import.def @@ -0,0 +1,19 @@ + LIBRARY core.dll + + +EXPORTS +;core +callFunctionFromGateway +com_ +createvarfromptr_ +putlhsvar_ +createvar_ +stack_ +getrhsvar_ +gettype_ +vstk_ +checklhs_ +checkrhs_ +intersci_ +MyHeapAlloc +MyHeapFree diff --git a/modules/randlib/src/c/elementary_functions_f_Import.def b/modules/randlib/src/c/elementary_functions_f_Import.def new file mode 100755 index 000000000..691fb9b6f --- /dev/null +++ b/modules/randlib/src/c/elementary_functions_f_Import.def @@ -0,0 +1,8 @@ +LIBRARY elementary_functions_f.dll + + +EXPORTS +; +;elementary_functions_f +; +logp1_
\ No newline at end of file diff --git a/modules/randlib/src/c/fsultra.c b/modules/randlib/src/c/fsultra.c new file mode 100755 index 000000000..d59e6352e --- /dev/null +++ b/modules/randlib/src/c/fsultra.c @@ -0,0 +1,253 @@ +/* + * + * Copyright (C) 2010 - DIGITEO - Michael Baudin + * Copyright (C) 2004 - Bruno Pincon + * Copyright (C) 1992 - Arif Zaman + * Copyright (C) 1992 - George Marsaglia + * +FSU - ULTRA The greatest random number generator that ever was + or ever will be. Way beyond Super-Duper. + (Just kidding, but we think its a good one.) + +Authors: Arif Zaman (arif@stat.fsu.edu) and + George Marsaglia (geo@stat.fsu.edu). + +Date: 27 May 1992 + +Version: 1.05 + +Copyright: To obtain permission to incorporate this program into + any commercial product, please contact the authors at + the e-mail address given above or at + + Department of Statistics and + Supercomputer Computations Research Institute + Florida State University + Tallahassee, FL 32306. + +See Also: README for a brief description + ULTRA.DOC for a detailed description + +----------------------------------------------------------------------- +*/ +/* + File: ULTRA.C + + This is the ULTRA random number generator written entirely in C. + + This may serve as a model for an assembler version of this routine. + The programmer should avoid simply duplicating and instead use the + usual assembler features to increase the speed of this routine. + + Especially the subroutine SWB should be replaced by the one + machine instruction (usually called subtract-with-borrow) that + is available in almost every hardware. + + For people not familiar with 8086 assembler, it may help to + consult this when reading the assembler code. This program should + be a dropin replacement for the assembler versions, but is about + half as fast. +*/ + +/* Slight modifications by Bruno Pincon (4 december 2004) for inclusion + in scilab and nsp: + + 1/ in scilab we use only i32bit output ( renamed here fsultra ) + and I have deleted the others; + + 2/ only one array is now used (swbseed which is renamed + swb_state) and the xor with the linear congruential generator + is done only just before the output. + + 3/ add a var is_init (to say if the generator is initialised) + + 4/ add routine to set/get the state + +*/ +#include <math.h> /* to use floor */ +#include "others_generators.h" +#include "sciprint.h" +#include "localization.h" + +#define N 37 /* size of table */ +#define N2 24 /* The shorter lag */ + +static int is_init = 0; +static int swb_state[N]; /* state of the swb generator */ +static int swb_index = N; /* an index on the swb state */ +static int swb_flag; /* the carry flag for the SWB generator */ +static unsigned int cong_state; /* state of the congruential generator */ + +/* for this generator the state seems completly defined by: +swb_state, swb_index, swb_flag (which define the state of the swb generator) +cong_state (which defines the state of the congruential generator) +*/ + +/* those are the default for the simple initialisation routine */ +static double DEFAULT_SEED1 = 1234567.0, DEFAULT_SEED2 = 7654321.0; + + + + +/* SWB is the subtract-with-borrow operation which should be one line +in assembler code. This should be done by using the hardware s-w-b +operation in the SWBfill routine (renamed advance_state_swb here). + +What has been done here is to look at the msb of x, y and z=x-y-c. +Using these three bits, one can determine if a borrow bit is needed +or not according to the following table: + +msbz=0 msby=0 msby=1 msbz=1 msby=0 msby=1 + +msbx=0 0 1 msbx=0 1 1 +msbx=1 0 0 msbx=1 0 1 + +PS: note that the definition is very carefully written because the +calls to SWB have y and z as the same memory location, so y must +be tested before z is assigned a value. +*/ +#define SWB(c,x,y,z) c = (y<0) ? (((z=x-y-c) < 0) || (x>=0)) : (((z=x-y-c) < 0) && (x>=0)); + +static void advance_state_swb(void) +{ + int i; + /* + * The following are the heart of the system and should be + * written is assembler to be as fast as possible. It may even make sense + * to unravel the loop and simply wirte 37 consecutive SWB operations! + */ + for (i = 0; i < N2; i++) + { + SWB(swb_flag, swb_state[i + N - N2], swb_state[i], swb_state[i]); + } + for (i = N2; i < N; i++) + { + SWB(swb_flag, swb_state[i - N2], swb_state[i], swb_state[i]); + } + swb_index = 0; +} + +/* set_state_fsultra_simple initializes the state from 2 integers + +it defines the constants and fills the swb_state array one bit at +a time by taking the leading bit of the xor of a shift register +and a congruential sequence. The same congruential generator continues +to be used as a mixing generator for the Subtract-with-borrow generator +to produce the `ultra' random numbers + +Since this is called just once, speed doesn't matter much and it might +be fine to leave this subroutine coded just as it is. + +PS: there are quick and easy ways to fill this, but since random number +generators are really "randomness amplifiers", it is important to +start off on the right foot. This is why we take such care here. +*/ + +int set_state_fsultra_simple(double s1, double s2) +{ + unsigned int shrgx, tidbits = 0; + int i, j; + + if ( (s1 == floor(s1) && 0.0 <= s1 && s1 <= 4294967295.0) + && (s2 == floor(s2) && 0.0 <= s2 && s2 <= 4294967295.0) ) + { + cong_state = ((unsigned int) s1) * 2 + 1; + shrgx = (unsigned int) s2; + for ( i = 0 ; i < N ; i++) + { + for ( j = 32 ; j > 0 ; j--) + { + cong_state = cong_state * 69069; + shrgx = shrgx ^ (shrgx >> 15); + shrgx = shrgx ^ (shrgx << 17); + tidbits = (tidbits >> 1) | (0x80000000 & (cong_state ^ shrgx)); + } + swb_state[i] = tidbits; + } + swb_index = 0; + swb_flag = 0; + advance_state_swb(); /* pour retrouver la mme squence que ds scilab V3.0 */ + is_init = 1; + return 1; + } + else + { + sciprint(_("\nBad seed for fsultra, must be integers in [0, 2^32-1]\n")); + return 0; + } +} + +int set_state_fsultra(double *s) +{ + double try; + int i; + + try = s[0]; + if ( floor(try) != try || try < 0.0 || try > (double) N) + { + sciprint(_("\nThe first component of the fsultra state, must be an int in [0, %d]\n"), N); + return 0; + } + swb_index = (int) try; + + try = s[1]; + if ( try != 0.0 && try != 1.0) + { + sciprint(_("\nThe second component of the fsultra state, must be 0 or 1\n")); + return 0; + } + swb_flag = (int) try; + + try = s[2]; + if ( floor(try) != try || try <= 0 || try > 4294967295.0 ) + { + sciprint(_("\nThe third component of the fsultra state, must be an int in [1, 2^32-1]\n")); + return 0; + } + cong_state = (unsigned int) try; + + /* no verif here ... */ + for (i = 0 ; i < N ; i++) + { + swb_state[i] = (int) (((unsigned int) s[i + 3]) & 0xffffffff); + } + + is_init = 1; + return 1; +} + + +/* to return the state at the scilab level */ +void get_state_fsultra(double s[]) +{ + int i; + + if ( ! is_init ) + { + set_state_fsultra_simple(DEFAULT_SEED1, DEFAULT_SEED2); + } + + s[0] = (double) swb_index; + s[1] = (double) swb_flag; + s[2] = (double) cong_state; + for (i = 0 ; i < N ; i++) + { + s[i + 3] = (double) (unsigned int) swb_state[i]; + } +} + +unsigned long int fsultra(void) +{ + if (swb_index >= N) /* generate N words at one time */ + { + if ( ! is_init ) + { + set_state_fsultra_simple(DEFAULT_SEED1, DEFAULT_SEED2); + } + else + { + advance_state_swb(); + } + } + return (swb_state[swb_index++] ^ (cong_state = cong_state * 69069)); +} diff --git a/modules/randlib/src/c/genbet.c b/modules/randlib/src/c/genbet.c new file mode 100755 index 000000000..6cfa562ec --- /dev/null +++ b/modules/randlib/src/c/genbet.c @@ -0,0 +1,327 @@ +#include <math.h> +#include "grand.h" +#include "core_math.h" + +double C2F(genbet)(double *aa, double *bb) +/* +********************************************************************** +This source code was taken in the project "freemat"(BSD license) +This source code was modified by Gaüzère Sabine according to the +modifications done by JJV + + float genbet(float aa,float bb) + GeNerate BETa random deviate + Function + Returns a single random deviate from the beta distribution with + parameters A and B. The density of the beta is + x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1 + + Arguments + + A --> First parameter of the beta distribution + DOUBLE PRECISION A + JJV (A > 1.0E-37) + + B --> Second parameter of the beta distribution + DOUBLE PRECISION B + JJV (B > 1.0E-37) + + Method + R. C. H. Cheng + Generating Beta Variatew with Nonintegral Shape Parameters + Communications of the ACM, 21:317-322 (1978) + (Algorithms BB and BC) +********************************************************************** +*/ +{ +#define expmax 87.498222998046875 +#define infnty 1.0E38 +#define minlog 1.0E-37 + + static double olda = -1.0E37; + static double oldb = -1.0E37; + static double genbet, a, alpha, b, beta, delta, gamma, k1, k2, r, s, t, u1, u2, v, w, y, z; + static int qsame; + + qsame = olda == *aa && oldb == *bb; + if (qsame) + { + goto S20; + } + //if(!(aa <= 0.0 || bb <= 0.0)) goto S10; + // Scierror(999, "RANLIB Error: AA or BB <= 0 in GENBET - Abort!"); + // JJV added small minimum for small log problem in calc of W + // in Rand.c +#ifndef _MSC_VER + // warning C4102: 'S10' : unreferenced label +S10: +#endif + olda = *aa; + oldb = *bb; + +S20: + if (!(Min(*aa, *bb) > 1.0)) + { + goto S100; + } + /* + Alborithm BB + Initialize + */ + if (qsame) + { + goto S30; + } + a = Min(*aa, *bb); + b = Max(*aa, *bb); + alpha = a + b; + beta = sqrt((alpha - 2.0) / (2.0 * a * b - alpha)); + gamma = a + 1.0 / beta; +S30: +S40: + u1 = C2F(ranf)(); + /* + Step 1 + */ + u2 = C2F(ranf)(); + v = beta * log(u1 / (1.0 - u1)); + // JJV altered this + if (v > expmax) + { + goto S55; + } + // JJV added checker to see if a*exp(v) will overflow + // JJV 50 _was_ w = a*exp(v); also note here a > 1.0 + // if(!(v > expmax)) goto S50; + // w = infnty; + // goto S60; +#ifndef _MSC_VER + // warning C4102: 'S50' : unreferenced label +S50: +#endif + w = exp(v); + if (w > (infnty / a)) + { + goto S55; + } + w *= a; + goto S60; + +S55: + w = infnty; +S60: + z = pow(u1, 2.0f) * u2; + r = gamma * v - 1.3862943649291992188; + s = a + r - w; + /* + Step 2 + */ + if (s + 2.6094379425048828125 >= 5.0 * z) + { + goto S70; + } + /* + Step 3 + */ + t = log(z); + if (s > t) + { + goto S70; + } + /* + Step 4 + */ + // JJV added checker to see if log(alpha/(b+w)) will + // JJV overflow. If so, we count the log as -INF, and + // JJV consequently evaluate conditional as true, i.e. + // JJV the algorithm rejects the trial and starts over + // JJV May not need this here since ALPHA > 2.0 + if (alpha / (b + w) < minlog) + { + goto S40; + } + if (r + alpha * log(alpha / (b + w)) < t) + { + goto S40; + } +S70: + /* + Step 5 + */ + if (!(*aa == a)) + { + goto S80; + } + genbet = w / (b + w); + goto S90; +S80: + genbet = b / (b + w); +S90: + goto S230; +S100: + /* + Algorithm BC + Initialize + */ + if (qsame) + { + goto S110; + } + a = Max(*aa, *bb); + b = Min(*aa, *bb); + alpha = a + b; + beta = 1.0 / b; + delta = 1.0 + a - b; + k1 = delta * (1.3888900168240070343E-2 + 4.1666701436042785645E-2 * b) / (a * beta - 0.77777802944183349609); + k2 = 0.25 + (0.5 + 0.25 / delta) * b; +S110: +S120: + u1 = C2F(ranf)(); + /* + Step 1 + */ + u2 = C2F(ranf)(); + if (u1 >= 0.5) + { + goto S130; + } + /* + Step 2 + */ + y = u1 * u2; + z = u1 * y; + if (0.25 * u2 + z - y >= k1) + { + goto S120; + } + goto S170; +S130: + /* + Step 3 + */ + z = pow(u1, 2.0) * u2; + if (!(z <= 0.25)) + { + goto S160; + } + v = beta * log(u1 / (1.0 - u1)); + + // JJV instead of checking v > expmax at top, I will check + // JJV if a < 1, then check the appropriate values + + if (a > 1.0) + { + goto S135; + } + // JJV A < 1 so it can help out if EXP(V) would overflow + if (v > expmax) + { + goto S132; + } + w = a * exp(v); + goto S200; +S132: + w = v + log(a); + if (w > expmax) + { + goto S140; + } + w = exp(w); + goto S200; + + // JJV in this case A > 1 +S135: + if (v > expmax) + { + goto S140; + } + w = exp(v); + if (w > infnty / a) + { + goto S140; + } + w *= a; + goto S200; +S140: + w = infnty; + goto S200; + //S150: + // goto S200; +S160: + if (z >= k2) + { + goto S120; + } +S170: + /* + Step 4 + Step 5 + */ + v = beta * log(u1 / (1.0 - u1)); + // JJV same kind of checking as above + if (a > 1.0) + { + goto S175; + } + // JJV A < 1 so it can help out if EXP(V) would overflow + if (v > expmax) + { + goto S172; + } + w = a * exp(v); + goto S190; +S172: + w = v + log(a); + if (w > expmax) + { + goto S180; + } + w = exp(w); + goto S190; + // JJV in this case A > 1 +S175: + if (v > expmax) + { + goto S180; + } + w = exp(v); + if (w > infnty / a) + { + goto S180; + } + w *= a; + goto S190; + +S180: + w = infnty; + + // JJV here we also check to see if log overlows; if so, we treat it + // JJV as -INF, which means condition is true, i.e. restart +S190: + if (alpha / (b + w) < minlog) + { + goto S120; + } + if (alpha * (log(alpha / (b + w)) + v) - 1.3862943649291992188 < log(z)) + { + goto S120; + } +S200: + /* + Step 6 + */ + if (!(a == *aa)) + { + goto S210; + } + genbet = w / (b + w); + goto S220; +S210: + genbet = b / (b + w); +S220: +S230: + return genbet; +#undef expmax +#undef infnty +#undef minlog +} diff --git a/modules/randlib/src/c/ignbin.c b/modules/randlib/src/c/ignbin.c new file mode 100755 index 000000000..f86c47576 --- /dev/null +++ b/modules/randlib/src/c/ignbin.c @@ -0,0 +1,340 @@ +#include <math.h> +#include "grand.h" +#include "core_math.h" + +int C2F(ignbin)(int *n, double *pp) +/* +********************************************************************** +This source code was taken in the project "freemat"(BSD license) +This source code was modified by Gaüzère Sabine according to the +modifications done by JJV + + long ignbin(long n,float pp) + GENerate BINomial random deviate + Function + Generates a single random deviate from a binomial + distribution whose number of trials is N and whose + probability of an event in each trial is P. + Arguments + n --> The number of trials in the binomial distribution + from which a random deviate is to be generated. + p --> The probability of an event in each trial of the + binomial distribution from which a random deviate + is to be generated. + ignbin <-- A random deviate yielding the number of events + from N independent trials, each of which has + a probability of event P. + Method + This is algorithm BTPE from: + Kachitvichyanukul, V. and Schmeiser, B. W. + Binomial Random Variate Generation. + Communications of the ACM, 31, 2 + (February, 1988) 216. +********************************************************************** + SUBROUTINE BTPEC(N,PP,ISEED,JX) + BINOMIAL RANDOM VARIATE GENERATOR + MEAN .LT. 30 -- INVERSE CDF + MEAN .GE. 30 -- ALGORITHM BTPE: ACCEPTANCE-REJECTION VIA + FOUR REGION COMPOSITION. THE FOUR REGIONS ARE A TRIANGLE + (SYMMETRIC IN THE CENTER), A PAIR OF PARALLELOGRAMS (ABOVE + THE TRIANGLE), AND EXPONENTIAL LEFT AND RIGHT TAILS. + BTPE REFERS TO BINOMIAL-TRIANGLE-PARALLELOGRAM-EXPONENTIAL. + BTPEC REFERS TO BTPE AND "COMBINED." THUS BTPE IS THE + RESEARCH AND BTPEC IS THE IMPLEMENTATION OF A COMPLETE + USABLE ALGORITHM. + REFERENCE: VORATAS KACHITVICHYANUKUL AND BRUCE SCHMEISER, + "BINOMIAL RANDOM VARIATE GENERATION," + COMMUNICATIONS OF THE ACM, FORTHCOMING + WRITTEN: SEPTEMBER 1980. + LAST REVISED: MAY 1985, JULY 1987 + REQUIRED SUBPROGRAM: RAND() -- A UNIFORM (0,1) RANDOM NUMBER + GENERATOR + ARGUMENTS + N : NUMBER OF BERNOULLI TRIALS (INPUT) + PP : PROBABILITY OF SUCCESS IN EACH TRIAL (INPUT) + ISEED: RANDOM NUMBER SEED (INPUT AND OUTPUT) + JX: RANDOMLY GENERATED OBSERVATION (OUTPUT) + VARIABLES + PSAVE: VALUE OF PP FROM THE LAST CALL TO BTPEC + NSAVE: VALUE OF N FROM THE LAST CALL TO BTPEC + XNP: VALUE OF THE MEAN FROM THE LAST CALL TO BTPEC + P: PROBABILITY USED IN THE GENERATION PHASE OF BTPEC + FFM: TEMPORARY VARIABLE EQUAL TO XNP + P + M: INTEGER VALUE OF THE CURRENT MODE + FM: FLOATING POINT VALUE OF THE CURRENT MODE + XNPQ: TEMPORARY VARIABLE USED IN SETUP AND SQUEEZING STEPS + P1: AREA OF THE TRIANGLE + C: HEIGHT OF THE PARALLELOGRAMS + XM: CENTER OF THE TRIANGLE + XL: LEFT END OF THE TRIANGLE + XR: RIGHT END OF THE TRIANGLE + AL: TEMPORARY VARIABLE + XLL: RATE FOR THE LEFT EXPONENTIAL TAIL + XLR: RATE FOR THE RIGHT EXPONENTIAL TAIL + P2: AREA OF THE PARALLELOGRAMS + P3: AREA OF THE LEFT EXPONENTIAL TAIL + P4: AREA OF THE RIGHT EXPONENTIAL TAIL + U: A U(0,P4) RANDOM VARIATE USED FIRST TO SELECT ONE OF THE + FOUR REGIONS AND THEN CONDITIONALLY TO GENERATE A VALUE + FROM THE REGION + V: A U(0,1) RANDOM NUMBER USED TO GENERATE THE RANDOM VALUE + (REGION 1) OR TRANSFORMED INTO THE VARIATE TO ACCEPT OR + REJECT THE CANDIDATE VALUE + IX: INTEGER CANDIDATE VALUE + X: PRELIMINARY CONTINUOUS CANDIDATE VALUE IN REGION 2 LOGIC + AND A FLOATING POINT IX IN THE ACCEPT/REJECT LOGIC + K: ABSOLUTE VALUE OF (IX-M) + F: THE HEIGHT OF THE SCALED DENSITY FUNCTION USED IN THE + ACCEPT/REJECT DECISION WHEN BOTH M AND IX ARE SMALL + ALSO USED IN THE INVERSE TRANSFORMATION + R: THE RATIO P/Q + G: CONSTANT USED IN CALCULATION OF PROBABILITY + MP: MODE PLUS ONE, THE LOWER INDEX FOR EXPLICIT CALCULATION + OF F WHEN IX IS GREATER THAN M + IX1: CANDIDATE VALUE PLUS ONE, THE LOWER INDEX FOR EXPLICIT + CALCULATION OF F WHEN IX IS LESS THAN M + I: INDEX FOR EXPLICIT CALCULATION OF F FOR BTPE + AMAXP: MAXIMUM ERROR OF THE LOGARITHM OF NORMAL BOUND + YNORM: LOGARITHM OF NORMAL BOUND + ALV: NATURAL LOGARITHM OF THE ACCEPT/REJECT VARIATE V + X1,F1,Z,W,Z2,X2,F2, AND W2 ARE TEMPORARY VARIABLES TO BE + USED IN THE FINAL ACCEPT/REJECT TEST + QN: PROBABILITY OF NO SUCCESS IN N TRIALS + REMARK + IX AND JX COULD LOGICALLY BE THE SAME VARIABLE, WHICH WOULD + SAVE A MEMORY POSITION AND A LINE OF CODE. HOWEVER, SOME + COMPILERS (E.G.,CDC MNF) OPTIMIZE BETTER WHEN THE ARGUMENTS + ARE NOT INVOLVED. + ISEED NEEDS TO BE DOUBLE PRECISION IF THE IMSL ROUTINE + GGUBFS IS USED TO GENERATE UNIFORM RANDOM NUMBER, OTHERWISE + TYPE OF ISEED SHOULD BE DICTATED BY THE UNIFORM GENERATOR +********************************************************************** +*****DETERMINE APPROPRIATE ALGORITHM AND WHETHER SETUP IS NECESSARY +*/ +{ + static double psave = -1.0E37; + static int nsave = -214748365; + static int ignbin, i, ix, ix1, k, m, mp, T1; + static double al, alv, amaxp, c, f, f1, f2, ffm, fm, g, p, p1, p2, p3, p4, q, qn, r, u, v, w, w2, x, x1, + x2, xl, xll, xlr, xm, xnp, xnpq, xr, ynorm, z, z2; + + if (*pp != psave) + { + goto S10; + } + if (*n != nsave) + { + goto S20; + } + if (xnp < 30.0) + { + goto S150; + } + goto S30; +S10: + /* + *****SETUP, PERFORM ONLY WHEN PARAMETERS CHANGE + */ + /* JJV added the argument checker - involved only renaming 10 + JJV and 20 to the checkers and adding checkers + JJV Only remaining problem - if called initially with the + JJV initial values of psave and nsave, it will hang + */ + psave = *pp; + p = Min(psave, 1.0 - psave); + q = 1.0 - p; +S20: + xnp = *n * p; + nsave = *n; + if (xnp < 30.0) + { + goto S140; + } + ffm = xnp + p; + m = (int)ffm; + fm = m; + xnpq = xnp * q; + p1 = (int) (2.195 * sqrt(xnpq) - 4.6 * q) + 0.5; + xm = fm + 0.5; + xl = xm - p1; + xr = xm + p1; + c = 0.134 + 20.5 / (15.3 + fm); + al = (ffm - xl) / (ffm - xl * p); + xll = al * (1.0 + 0.5 * al); + al = (xr - ffm) / (xr * q); + xlr = al * (1.0 + 0.5 * al); + p2 = p1 * (1.0 + c + c); + p3 = p2 + c / xll; + p4 = p3 + c / xlr; +S30: + /* + *****GENERATE VARIATE + */ + u = C2F(ranf)() * p4; + v = C2F(ranf)(); + /* + TRIANGULAR REGION + */ + if (u > p1) + { + goto S40; + } + ix = (int)(xm - p1 * v + u); + goto S170; +S40: + /* + PARALLELOGRAM REGION + */ + if (u > p2) + { + goto S50; + } + x = xl + (u - p1) / c; + v = v * c + 1.0 - Abs(xm - x) / p1; + if (v > 1.0 || v <= 0.0) + { + goto S30; + } + ix = (int)x; + goto S70; +S50: + /* + LEFT TAIL + */ + if (u > p3) + { + goto S60; + } + ix = (int)(xl + log(v) / xll); + if (ix < 0) + { + goto S30; + } + v *= ((u - p2) * xll); + goto S70; +S60: + /* + RIGHT TAIL + */ + ix = (int)(xr - log(v) / xlr); + if (ix > *n) + { + goto S30; + } + v *= ((u - p3) * xlr); +S70: + /* + *****DETERMINE APPROPRIATE WAY TO PERFORM ACCEPT/REJECT TEST + */ + k = Abs(ix - m); + if (k > 20 && k < xnpq / 2 - 1) + { + goto S130; + } + /* + EXPLICIT EVALUATION + */ + f = 1.0; + r = p / q; + g = (*n + 1) * r; + T1 = m - ix; + if (T1 < 0) + { + goto S80; + } + else if (T1 == 0) + { + goto S120; + } + else + { + goto S100; + } +S80: + mp = m + 1; + for (i = mp; i <= ix; i++) + { + f *= (g / i - r); + } + goto S120; +S100: + ix1 = ix + 1; + for (i = ix1; i <= m; i++) + { + f /= (g / i - r); + } +S120: + if (v <= f) + { + goto S170; + } + goto S30; +S130: + /* + SQUEEZING USING UPPER AND LOWER BOUNDS ON ALOG(F(X)) + */ + amaxp = k / xnpq * ((k * (k / 3.0 + 0.625) + 0.1666666666666) / xnpq + 0.5); + ynorm = -(k * k / (2.0 * xnpq)); + alv = log(v); + if (alv < ynorm - amaxp) + { + goto S170; + } + if (alv > ynorm + amaxp) + { + goto S30; + } + /* + STIRLING'S FORMULA TO MACHINE ACCURACY FOR + THE FINAL ACCEPTANCE/REJECTION TEST + */ + x1 = ix + 1.0; + f1 = fm + 1.0; + z = *n + 1.0 - fm; + w = *n - ix + 1.0; + z2 = z * z; + x2 = x1 * x1; + f2 = f1 * f1; + w2 = w * w; + if (alv <= xm * log(f1 / x1) + (*n - m + 0.5)*log(z / w) + (ix - m)*log(w * p / (x1 * q)) + (13860.0 - + (462.0 - (132.0 - (99.0 - 140.0 / f2) / f2) / f2) / f2) / f1 / 166320.0 + (13860.0 - (462.0 - + (132.0 - (99.0 - 140.0 / z2) / z2) / z2) / z2) / z / 166320.0 + (13860.0 - (462.0 - (132.0 - + (99.0 - 140.0 / x2) / x2) / x2) / x2) / x1 / 166320.0 + (13860.0 - (462.0 - (132.0 - (99.0 + - 140.0 / w2) / w2) / w2) / w2) / w / 166320.0) + { + goto S170; + } + goto S30; +S140: + /* + INVERSE CDF LOGIC FOR MEAN LESS THAN 30 + */ + qn = pow((double)q, (double) * n); + r = p / q; + g = r * (*n + 1); +S150: + ix = 0; + f = qn; + u = C2F(ranf)(); +S160: + if (u < f) + { + goto S170; + } + if (ix > 110) + { + goto S150; + } + u -= f; + ix += 1; + f *= (g / ix - r); + goto S160; +S170: + if (psave > 0.5) + { + ix = *n - ix; + } + ignbin = ix; + return ignbin; +} + diff --git a/modules/randlib/src/c/igngeom.c b/modules/randlib/src/c/igngeom.c new file mode 100755 index 000000000..355cbce34 --- /dev/null +++ b/modules/randlib/src/c/igngeom.c @@ -0,0 +1,71 @@ +/* + * PURPOSE + * generate a random deviate from G(p) : the geometric + * law. If a r.v. X ~ G(p), X is the number of Bernouilli trials + * (B(p)) until succes is met. So X take its values in + * + * {1, 2, 3, ...., } + * + * and P(X=i) = p * (1-p)^(i-1) + * + * METHOD + * inversion of the cdf leads to : + * + * (1) X = 1 + floor( log(1-u) / log(1-p) ) + * + * u being a random deviate from U[0,1). + * + * by taking into account that 1-u follows also U(0,1)) this may be + * replaced with X = ceil( log(u) / log(1-p) ) or 1 + floor(log(u)/log(1-p)) + * which needs less work. But as ranf() provides number in [0,1[ , 0 may be + * gotten and these formulae may give then +oo. + * + * With ranf() the max number is 1 - 2^(-32). This let us choose a safe min + * value for p (to avoid a +oo due to log(1-p)) in the following manner : + * + * the max is gotten for M = log(2^(-32)) / (-p) + * + * (for very small |x|, the accurate func logp1(x):=log(1+x) return simply x) + * + * and we want M <= Rmax (near 1.798+308 in ieee 754 double) + * + * so p >= 32 log(2)/Rmax which is near 1.234e-307 ; Says pmin = 1.3e-307. + * (anyway the results gotten for such small values of p are certainly + * not meaningful...) + * + * NOTE + * this function returns a double instead of an int type : this is + * to avoid an extra conversion because in scilab it will be a double. + * + * ASSUMPTION + * p must be in [pmin,1] (to do at the calling level). + * + * AUTHOR + * Bruno Pincon (<Bruno.Pincon@iecn.u-nancy.fr>) + * + */ +#include <math.h> +#include "grand.h" + +/* the external functions used here : */ +double F2C(logp1)(double *x); /* celle-ci est ds SCI/modules/elementary_functions/src/fortran/watan.f */ +double igngeom(double p) +{ + static double p_save = 1.0, ln_1_m_p = 0.0; + double u; + + if ( p == 1 ) + { + return ( 1.0 ); + } + else if ( p != p_save ) /* => recompute log(1-p) */ + { + p_save = p; + u = -p; + ln_1_m_p = F2C(logp1)(&u); + }; + + u = -C2F(ranf)(); + return ( floor( 1.0 + F2C(logp1)(&u) / ln_1_m_p) ); +} + diff --git a/modules/randlib/src/c/ignpoi.c b/modules/randlib/src/c/ignpoi.c new file mode 100755 index 000000000..0c5f269cc --- /dev/null +++ b/modules/randlib/src/c/ignpoi.c @@ -0,0 +1,329 @@ +#include <math.h> +#include "grand.h" +#include "core_math.h" + +double fsign (double x, double y) +{ + if (y >= 0.0) + { + return Abs(x); + } + else + { + return -Abs(x); + } +} + +int C2F(ignpoi)(double *mu) +/* +********************************************************************** +This source code was taken in the project "freemat"(BSD license) +This source code was modified by Gaüzère Sabine according to the +modifications done by JJV + + long ignpoi(float mu) + GENerate POIsson random deviate + Function + Generates a single random deviate from a Poisson + distribution with mean AV. + Arguments + av --> The mean of the Poisson distribution from which + a random deviate is to be generated. + genexp <-- The random deviate. + Method + Renames KPOIS from TOMS as slightly modified by BWB to use RANF + instead of SUNIF. + For details see: + Ahrens, J.H. and Dieter, U. + Computer Generation of Poisson Deviates + From Modified Normal Distributions. + ACM Trans. Math. Software, 8, 2 + (June 1982),163-179 +********************************************************************** +********************************************************************** + + + P O I S S O N DISTRIBUTION + + +********************************************************************** +********************************************************************** + + FOR DETAILS SEE: + + AHRENS, J.H. AND DIETER, U. + COMPUTER GENERATION OF POISSON DEVIATES + FROM MODIFIED NORMAL DISTRIBUTIONS. + ACM TRANS. MATH. SOFTWARE, 8,2 (JUNE 1982), 163 - 179. + + (SLIGHTLY MODIFIED VERSION OF THE PROGRAM IN THE ABOVE ARTICLE) + +********************************************************************** + INTEGER FUNCTION IGNPOI(IR,MU) + INPUT: IR=CURRENT STATE OF BASIC RANDOM NUMBER GENERATOR + MU=MEAN MU OF THE POISSON DISTRIBUTION + OUTPUT: IGNPOI=SAMPLE FROM THE POISSON-(MU)-DISTRIBUTION + MUPREV=PREVIOUS MU, MUOLD=MU AT LAST EXECUTION OF STEP P OR B. + TABLES: COEFFICIENTS A0-A7 FOR STEP F. FACTORIALS FACT + COEFFICIENTS A(K) - FOR PX = FK*V*V*SUM(A(K)*V**K)-DEL + SEPARATION OF CASES A AND B +*/ +{ + //extern float sign( float num, float sign ); + static double a0 = -0.5; + static double a1 = 0.3333333; + static double a2 = -0.2500068; + static double a3 = 0.2000118; + static double a4 = -0.1661269; + static double a5 = 0.1421878; + static double a6 = -0.1384794; + static double a7 = 0.125006; + static double muold = -1.0E37; + static double muprev = -1.0E37; + static double fact[10] = + { + 1.0, 1.0, 2.0, 6.0, 24.0, 120.0, 720.0, 5040.0, 40320.0, 362880.0 + }; + static int ignpoi, j, k, kflag, l, m, ll; + // JJV I added a variable 'll' here - it is the 'l' for CASE A + static double b1, b2, c, c0, c1, c2, c3, d, del, difmuk, e, fk, fx, fy, g, omega, p, p0, px, py, q, s, + t, u, v, x, xx, pp[35]; + + if (*mu == muprev) + { + goto S10; + } + if (*mu < 10.0) + { + goto S120; + } + /* + C A S E A. (RECALCULATION OF S,D,L IF MU HAS CHANGED) + */ + // JJV This is the case where I changed 'l' to 'll' + // JJV Here 'll' is set once and used in a comparison once + muprev = *mu; + s = sqrt(*mu); + d = 6.0 * *mu * *mu; + /* + THE POISSON PROBABILITIES PK EXCEED THE DISCRETE NORMAL + PROBABILITIES FK WHENEVER K >= M(MU). L=IFIX(MU-1.1484) + IS AN UPPER BOUND TO M(MU) FOR ALL MU >= 10 . + */ + ll = (int) (*mu - 1.1484); +S10: + /* + STEP N. NORMAL SAMPLE - SNORM(IR) FOR STANDARD NORMAL DEVIATE + */ + g = *mu + s * C2F(snorm)(); + if (g < 0.0) + { + goto S20; + } + ignpoi = (int) (g); + /* + STEP I. IMMEDIATE ACCEPTANCE IF IGNPOI IS LARGE ENOUGH + */ + if (ignpoi >= ll) + { + return ignpoi; + } + /* + STEP S. SQUEEZE ACCEPTANCE - SUNIF(IR) FOR (0,1)-SAMPLE U + */ + fk = (double)ignpoi; + difmuk = *mu - fk; + u = C2F(ranf)(); + if (d*u >= difmuk * difmuk * difmuk) + { + return ignpoi; + } +S20: + /* + STEP P. PREPARATIONS FOR STEPS Q AND H. + (RECALCULATIONS OF PARAMETERS IF NECESSARY) + .3989423=(2*PI)**(-.5) .416667E-1=1./24. .1428571=1./7. + THE QUANTITIES B1, B2, C3, C2, C1, C0 ARE FOR THE HERMITE + APPROXIMATIONS TO THE DISCRETE NORMAL PROBABILITIES FK. + C=.1069/MU GUARANTEES MAJORIZATION BY THE 'HAT'-FUNCTION. + */ + if (*mu == muold) + { + goto S30; + } + muold = *mu; + omega = 0.3989423 / s; + b1 = 4.166667E-2 / *mu; + b2 = 0.3 * b1 * b1; + c3 = 0.1428571 * b1 * b2; + c2 = b2 - 15.0 * c3; + c1 = b1 - 6.0 * b2 + 45.0 * c3; + c0 = 1.0 - b1 + 3.0 * b2 - 15.0 * c3; + c = 0.1069 / *mu; +S30: + if (g < 0.0) + { + goto S50; + } + /* + 'SUBROUTINE' F IS CALLED (KFLAG=0 FOR CORRECT RETURN) + */ + kflag = 0; + goto S70; +S40: + /* + STEP Q. QUOTIENT ACCEPTANCE (RARE CASE) + */ + if (fy - u*fy <= py * exp(px - fx)) + { + return ignpoi; + } +S50: + /* + STEP E. EXPONENTIAL SAMPLE - SEXPO(IR) FOR STANDARD EXPONENTIAL + DEVIATE E AND SAMPLE T FROM THE LAPLACE 'HAT' + (IF T <= -.6744 THEN PK < FK FOR ALL MU >= 10.) + */ + e = C2F(sexpo)(); + u = C2F(ranf)(); + u += (u - 1.0); + t = 1.8 + fsign(e, u); + if (t <= -0.6744) + { + goto S50; + } + ignpoi = (int) (*mu + s * t); + fk = (double)ignpoi; + difmuk = *mu - fk; + /* + 'SUBROUTINE' F IS CALLED (KFLAG=1 FOR CORRECT RETURN) + */ + kflag = 1; + goto S70; +S60: + /* + STEP H. HAT ACCEPTANCE (E IS REPEATED ON REJECTION) + */ + if (c * Abs(u) > py * exp(px + e) - fy * exp(fx + e)) + { + goto S50; + } + return ignpoi; +S70: + /* + STEP F. 'SUBROUTINE' F. CALCULATION OF PX,PY,FX,FY. + CASE IGNPOI .LT. 10 USES FACTORIALS FROM TABLE FACT + */ + if (ignpoi >= 10) + { + goto S80; + } + px = - *mu; + py = pow((double) * mu, (double)ignpoi) / *(fact + ignpoi); + goto S110; +S80: + /* + CASE IGNPOI .GE. 10 USES POLYNOMIAL APPROXIMATION + A0-A7 FOR ACCURACY WHEN ADVISABLE + .8333333E-1=1./12. .3989423=(2*PI)**(-.5) + */ + del = 8.333333E-2 / fk; + del -= (4.8 * del * del * del); + v = difmuk / fk; + if (Abs(v) <= 0.25) + { + goto S90; + } + px = fk * log(1.0 + v) - difmuk - del; + goto S100; +S90: + px = fk * v * v * (((((((a7 * v + a6) * v + a5) * v + a4) * v + a3) * v + a2) * v + a1) * v + a0) - del; +S100: + py = 0.3989423 / sqrt(fk); +S110: + x = (0.5 - difmuk) / s; + xx = x * x; + fx = -0.5 * xx; + fy = omega * (((c3 * xx + c2) * xx + c1) * xx + c0); + if (kflag <= 0) + { + goto S40; + } + goto S60; +S120: + /* + C A S E B. (START NEW TABLE AND CALCULATE P0 IF NECESSARY) + */ + // JJV changed MUPREV assignment from 0.0 to initial value + muprev = -1.0E37; + // Jpc 1999: the next lines seams to produce a bug + // and I finaly commented them out + // IF (mu.EQ.muold) GO TO 130 + // JJV added argument checker here + // JJV added line label here + // 125 muold = mu + // if(mu == muold) goto S130; + // muold = mu; + m = Max(1L, (int) (*mu)); + l = 0; + p = exp(- *mu); + q = p0 = p; +S130: + /* + STEP U. UNIFORM SAMPLE FOR INVERSION METHOD + */ + u = C2F(ranf)(); + ignpoi = 0; + if (u <= p0) + { + return ignpoi; + } + /* + STEP T. TABLE COMPARISON UNTIL THE END PP(L) OF THE + PP-TABLE OF CUMULATIVE POISSON PROBABILITIES + (0.458=PP(9) FOR MU=10) + */ + if (l == 0) + { + goto S150; + } + j = 1; + if (u > 0.458) + { + j = Min(l, m); + } + for (k = j; k <= l; k++) + { + if (u <= *(pp + k - 1)) + { + goto S180; + } + } + if (l == 35) + { + goto S130; + } +S150: + /* + STEP C. CREATION OF NEW POISSON PROBABILITIES P + AND THEIR CUMULATIVES Q=PP(K) + */ + l += 1; + for (k = l; k <= 35; k++) + { + p = p* *mu / (double)k; + q += p; + *(pp + k - 1) = q; + if (u <= q) + { + goto S170; + } + } + l = 35; + goto S130; +S170: + l = k; +S180: + ignpoi = k; + return ignpoi; +} diff --git a/modules/randlib/src/c/kiss.c b/modules/randlib/src/c/kiss.c new file mode 100755 index 000000000..175e2c3ab --- /dev/null +++ b/modules/randlib/src/c/kiss.c @@ -0,0 +1,83 @@ +/* + * + * Copyright (C) 2010 - DIGITEO - Michael Baudin + * Copyright (C) 2004 - Bruno Pincon + * Copyright (C) 1999 - G. Marsaglia + * + * PURPOSE + * the kiss generator of G. Marsaglia + * generate random integers (uint) in [0, 2^32 - 1] + * the state is given by 4 integers (z, w, jsr, jcong) + * + * NOTES + * The code was given by G. Marsaglia at the end of a + * thread concerning RNG in C in several newsgroups + * (whom sci.math.num-analysis) "My offer of RNG's for + * C was an invitation to dance..." + * + * Slight modifications by Bruno Pincon for inclusion in + * Scilab (added set/get state routines) + * + * kiss is made of combinaison of severals others but + * they are not interfaced at the scilab level. + * + * Need that it is assumed that the + * unsigned int arithmetic is the classic 32 bits + * unsigned arithmetic modulo 2^32 (ie all is exact + * modulo 2^32) + * + * License: This code is released under public domain. + * (Compatible with CeCILL) + */ +#include <math.h> /* to use floor */ + +#include "sciprint.h" +#include "others_generators.h" +#include "localization.h" + +/* The Marsaglia 's macros : */ +#define znew (z=36969*(z&65535)+(z>>16)) +#define wnew (w=18000*(w&65535)+(w>>16)) +#define MWC ((znew<<16)+wnew ) +#define CONG (jcong=69069*jcong+1234567) +#define SHR3 (jsr^=(jsr<<17), jsr^=(jsr>>13), jsr^=(jsr<<5)) +#define KISS ((MWC^CONG)+SHR3) + +/* the kiss 's state (any int in [0,2^32-1] are OK ?) */ +static unsigned int z = 362436069, w = 521288629, jsr = 123456789, jcong = 380116160; + +unsigned long int kiss(void) +{ + return ( KISS ); +} + +int set_state_kiss(double g1, double g2, double g3, double g4) +{ + if (g1 == floor(g1) && g2 == floor(g2) && + g3 == floor(g3) && g4 == floor(g4) && + 0.0 <= g1 && g1 <= 4294967295.0 && + 0.0 <= g2 && g2 <= 4294967295.0 && + 0.0 <= g3 && g3 <= 4294967295.0 && + 0.0 <= g4 && g4 <= 4294967295.0 ) + { + z = (unsigned int) g1; + w = (unsigned int) g2; + jsr = (unsigned int) g3; + jcong = (unsigned int) g4; + return ( 1 ); + } + else + { + sciprint(_("Bad seeds for kiss, must be integers in [0,2^32-1]\n")); + return ( 0 ); + } +} + +void get_state_kiss(double g[]) +{ + g[0] = (double) z; + g[1] = (double) w; + g[2] = (double) jsr; + g[3] = (double) jcong; +} + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-clcg2.lo b/modules/randlib/src/c/libscirandlib_algo_la-clcg2.lo new file mode 100755 index 000000000..35c6dbd4f --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-clcg2.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-clcg2.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-clcg2.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-clcg4.lo b/modules/randlib/src/c/libscirandlib_algo_la-clcg4.lo new file mode 100755 index 000000000..41f32fa89 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-clcg4.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-clcg4.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-clcg4.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-fsultra.lo b/modules/randlib/src/c/libscirandlib_algo_la-fsultra.lo new file mode 100755 index 000000000..df844374a --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-fsultra.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-fsultra.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-fsultra.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-genbet.lo b/modules/randlib/src/c/libscirandlib_algo_la-genbet.lo new file mode 100755 index 000000000..07c3ccc11 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-genbet.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-genbet.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-genbet.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-ignbin.lo b/modules/randlib/src/c/libscirandlib_algo_la-ignbin.lo new file mode 100755 index 000000000..ad65d982e --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-ignbin.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-ignbin.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-ignbin.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-igngeom.lo b/modules/randlib/src/c/libscirandlib_algo_la-igngeom.lo new file mode 100755 index 000000000..a1c300770 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-igngeom.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-igngeom.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-igngeom.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-ignpoi.lo b/modules/randlib/src/c/libscirandlib_algo_la-ignpoi.lo new file mode 100755 index 000000000..dd03e3ee0 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-ignpoi.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-ignpoi.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-ignpoi.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-kiss.lo b/modules/randlib/src/c/libscirandlib_algo_la-kiss.lo new file mode 100755 index 000000000..3f5ef1eb2 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-kiss.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-kiss.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-kiss.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-mt.lo b/modules/randlib/src/c/libscirandlib_algo_la-mt.lo new file mode 100755 index 000000000..52469585e --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-mt.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-mt.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-mt.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-sexpo.lo b/modules/randlib/src/c/libscirandlib_algo_la-sexpo.lo new file mode 100755 index 000000000..c8dbdc5a7 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-sexpo.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-sexpo.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-sexpo.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-sgamma.lo b/modules/randlib/src/c/libscirandlib_algo_la-sgamma.lo new file mode 100755 index 000000000..4257e0a68 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-sgamma.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-sgamma.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-sgamma.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/libscirandlib_algo_la-urand.lo b/modules/randlib/src/c/libscirandlib_algo_la-urand.lo new file mode 100755 index 000000000..11404e162 --- /dev/null +++ b/modules/randlib/src/c/libscirandlib_algo_la-urand.lo @@ -0,0 +1,12 @@ +# src/c/libscirandlib_algo_la-urand.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscirandlib_algo_la-urand.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/c/mt.c b/modules/randlib/src/c/mt.c new file mode 100755 index 000000000..eadace364 --- /dev/null +++ b/modules/randlib/src/c/mt.c @@ -0,0 +1,205 @@ +/* + * + * Copyright (C) 2010 - DIGITEO - Michael Baudin + * Copyright (C) 2005 - Bruno Pincon + * Copyright (C) 2002 - Bruno Pincon + * Copyright (C) 1997, 1999 - Makoto Matsumoto and Takuji Nishimura + * + A C-program for MT19937: Integer version (1999/10/28) +*/ +/* genrand() generates one pseudorandom unsigned int (32bit) */ +/* which is uniformly distributed among 0 to 2^32-1 for each */ +/* call. sgenrand(seed) sets initial values to the working area */ +/* of 624 words. Before genrand(), sgenrand(seed) must be */ +/* called once. (seed is any 32-bit integer.) */ +/* Coded by Takuji Nishimura, considering the suggestions by */ +/* Topher Cooper and Marc Rieffel in July-Aug. 1997. */ + +/* This library is free software under the Artistic license: */ +/* see the file COPYING distributed together with this code. */ +/* For the verification of the code, its output sequence file */ +/* mt19937int.out is attached (2001/4/2) */ + +/* Any feedback is very welcome. For any question, comments, */ +/* see http://www.math.keio.ac.jp/matumoto/emt.html or email */ +/* matumoto@math.keio.ac.jp */ + +/* REFERENCE */ +/* M. Matsumoto and T. Nishimura, */ +/* "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform */ +/* Pseudo-Random Number Generator", */ +/* ACM Transactions on Modeling and Computer Simulation, */ +/* Vol. 8, No. 1, January 1998, pp 3--30. */ + + +/* + * NOTES + * slightly modified par Bruno Pincon for inclusion in scilab + * - names have changed (for uniformity with the others genators) + * - add get state routine + * - add a little verif when the state is changed with the simple + * procedure + * + * furthers modifications on May 25 2002 : + * + * 1/ corrections of the followings : + * + * bug 1 : the complete state was returned at the scilab level + * without the index mti. Now the complete state is a + * vector of dim 625 with mti as the first component + * bug 2 : the set_state doesn't work if the generator was not + * initialised => add a is_init var and returned + * the state given with the default initialisation. + * + * 2/ Following the modif in the new version of this generator I have + * changed the simple initialisation (but not put the init via array) + * + * Sept 2005 : fix for bug 1568 + */ + +#include <math.h> +#include "grand.h" /* to check prototypes */ +#include "sciprint.h" +#include "others_generators.h" +#include "localization.h" + +/* Period parameters */ +#define N 624 +#define M 397 +#define MATRIX_A 0x9908b0df /* constant vector a */ +#define UPPER_MASK 0x80000000 /* most significant w-r bits */ +#define LOWER_MASK 0x7fffffff /* least significant r bits */ + +/* Tempering parameters */ +#define TEMPERING_MASK_B 0x9d2c5680 +#define TEMPERING_MASK_C 0xefc60000 +#define TEMPERING_SHIFT_U(y) (y >> 11) +#define TEMPERING_SHIFT_S(y) (y << 7) +#define TEMPERING_SHIFT_T(y) (y << 15) +#define TEMPERING_SHIFT_L(y) (y >> 18) + +static unsigned int mt[N]; /* the array for the state vector */ +static int mti = N; +static int is_init = 0; +static double DEFAULT_SEED = 5489.0; + +unsigned long int randmt(void) +{ + unsigned int y; + static unsigned int mag01[2] = {0x0, MATRIX_A}; + /* mag01[x] = x * MATRIX_A for x=0,1 */ + + if (mti >= N) /* generate N words at one time */ + { + int kk; + + if ( ! is_init ) + { + set_state_mt_simple(DEFAULT_SEED); + } + + for (kk = 0; kk < N - M; kk++) + { + y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); + mt[kk] = mt[kk + M] ^ (y >> 1) ^ mag01[y & 0x1]; + } + for (; kk < N - 1; kk++) + { + y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); + mt[kk] = mt[kk + (M - N)] ^ (y >> 1) ^ mag01[y & 0x1]; + } + y = (mt[N - 1] & UPPER_MASK) | (mt[0] & LOWER_MASK); + mt[N - 1] = mt[M - 1] ^ (y >> 1) ^ mag01[y & 0x1]; + + mti = 0; + } + + y = mt[mti++]; + y ^= TEMPERING_SHIFT_U(y); + y ^= TEMPERING_SHIFT_S(y) & TEMPERING_MASK_B; + y ^= TEMPERING_SHIFT_T(y) & TEMPERING_MASK_C; + y ^= TEMPERING_SHIFT_L(y); + + return ( y ); +} + + +int set_state_mt_simple(double s) +{ + /* set the initial state with the simple procedure */ + unsigned int seed; + + if ( s == floor(s) && 0.0 <= s && s <= 4294967295.0) + { + seed = (unsigned int) s; + mt[0] = seed & 0xffffffff; + for (mti = 1; mti < N; mti++) + { + mt[mti] = (1812433253UL * (mt[mti - 1] ^ (mt[mti - 1] >> 30)) + mti); + /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ + /* In the previous versions, MSBs of the seed affect */ + /* only MSBs of the array mt[]. */ + /* 2002/01/09 modified by Makoto Matsumoto */ + mt[mti] &= 0xffffffffUL; /* for >32 bit machines */ + } + is_init = 1; + return ( 1 ); + } + else + { + sciprint(_("Bad seed for mt, must be an int in [0, 2^32-1]\n")); + return ( 0 ); + } +} + + +/* +* Initialization by "set_state_simple_mt()" is an example. Theoretically, +* there are 2^19937-1 possible states as an intial state. +* This function allows to choose any of 2^19937-1 ones. +* Essential bits in "seed_array[]" is following 19937 bits: +* (seed_array[0]&UPPER_MASK), seed_array[1], ..., seed_array[N-1]. +* (seed_array[0]&LOWER_MASK) is discarded. +* +* Theoretically, +* (seed_array[0]&UPPER_MASK), seed_array[1], ..., seed_array[N-1] +* can take any values except all zeros. +*/ + +int set_state_mt(double seed_array[]) + +{ + int i, mti_try; + + mti_try = (int) seed_array[0]; + if (mti_try < 1 || mti_try > 624) + { + sciprint(_("The first component of the mt state mt, must be an int in [1, 624]\n")); + return ( 0 ); + } + is_init = 1; + mti = mti_try; + for (i = 0; i < N; i++) + { + mt[i] = ((unsigned int) seed_array[i + 1]) & 0xffffffff; + } + return ( 1 ); +} + + +/* To return the state at the scilab level */ +void get_state_mt(double state[]) +{ + int i; + + if ( ! is_init ) + { + set_state_mt_simple(DEFAULT_SEED); + } + + state[0] = (double) mti; + for (i = 0; i < N; i++) + { + state[i + 1] = (double) mt[i]; + } +} diff --git a/modules/randlib/src/c/randlib.rc b/modules/randlib/src/c/randlib.rc new file mode 100755 index 000000000..b2832342b --- /dev/null +++ b/modules/randlib/src/c/randlib.rc @@ -0,0 +1,96 @@ +// Microsoft Visual C++ generated resource script. +// + + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +//#include "afxres.h" +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// French (France) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 5,5,2,0 + PRODUCTVERSION 5,5,2,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040c04b0" + BEGIN + VALUE "FileDescription", "randlib module" + VALUE "FileVersion", "5, 5, 2, 0" + VALUE "InternalName", "randlib module" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "randlib.dll" + VALUE "ProductName", "randlib module" + VALUE "ProductVersion", "5, 5, 2, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x40c, 1200 + END +END + +#endif // French (France) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/modules/randlib/src/c/randlib.vcxproj b/modules/randlib/src/c/randlib.vcxproj new file mode 100755 index 000000000..e9b76550c --- /dev/null +++ b/modules/randlib/src/c/randlib.vcxproj @@ -0,0 +1,261 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{34F8E361-D2D9-43B0-93D2-F6CF5FAF6CEB}</ProjectGuid> + <RootNamespace>randlib</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>false</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>false</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../includes;../../../localization/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <PreLinkEvent> + <Message>Make dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib_f.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)elementary_functions_f.lib" 1>NUL 2>NUL +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib_f.lib;elementary_functions_f.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libmmdd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../includes;../../../localization/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <PreLinkEvent> + <Message>Make dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib_f.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)elementary_functions_f.lib" 1>NUL 2>NUL +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib_f.lib;elementary_functions_f.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <IgnoreSpecificDefaultLibraries>libmmdd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../includes;../../../localization/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <PreLinkEvent> + <Message>Make dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib_f.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)elementary_functions_f.lib" 1>NUL 2>NUL +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib_f.lib;elementary_functions_f.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../includes;../../../localization/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/intl;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <PreLinkEvent> + <Message>Make dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib_f.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)elementary_functions_f.lib" 1>NUL 2>NUL +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib_f.lib;elementary_functions_f.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="clcg2.c" /> + <ClCompile Include="clcg4.c" /> + <ClCompile Include="DllmainRandlib.c" /> + <ClCompile Include="fsultra.c" /> + <ClCompile Include="genbet.c" /> + <ClCompile Include="..\..\sci_gateway\c\gw_randlib.c" /> + <ClCompile Include="ignbin.c" /> + <ClCompile Include="igngeom.c" /> + <ClCompile Include="ignpoi.c" /> + <ClCompile Include="kiss.c" /> + <ClCompile Include="mt.c" /> + <ClCompile Include="..\..\sci_gateway\c\sci_grand.c" /> + <ClCompile Include="sexpo.c" /> + <ClCompile Include="sgamma.c" /> + <ClCompile Include="urand.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\includes\clcg4.h" /> + <ClInclude Include="..\..\includes\dynlib_randlib.h" /> + <ClInclude Include="..\..\includes\grand.h" /> + <ClInclude Include="..\..\includes\gw_randlib.h" /> + <ClInclude Include="..\..\includes\others_generators.h" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\locales\randlib.pot" /> + <None Include="elementary_functions_f_Import.def" /> + <None Include="core_import.def" /> + <None Include="randlib_f_Import.def" /> + <None Include="..\..\Makefile.am" /> + <None Include="..\..\randlib.iss" /> + <None Include="..\..\sci_gateway\randlib_gateway.xml" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="randlib.rc" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj"> + <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj"> + <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\core\src\c\core.vcxproj"> + <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project> + </ProjectReference> + <ProjectReference Include="..\..\..\localization\src\localization.vcxproj"> + <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj"> + <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/modules/randlib/src/c/randlib.vcxproj.filters b/modules/randlib/src/c/randlib.vcxproj.filters new file mode 100755 index 000000000..cbb6c0135 --- /dev/null +++ b/modules/randlib/src/c/randlib.vcxproj.filters @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{c589a035-8331-47ce-8175-bf82bc45db6c}</UniqueIdentifier> + <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{253e7969-1685-4fd5-8faf-1470ebdfc965}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl</Extensions> + </Filter> + <Filter Include="localization"> + <UniqueIdentifier>{74fcaecf-1f1b-4912-91dc-8f3691c8ccbd}</UniqueIdentifier> + </Filter> + <Filter Include="Libraries Dependencies"> + <UniqueIdentifier>{14ef7e69-e958-4e76-b571-8506b4b6b686}</UniqueIdentifier> + </Filter> + <Filter Include="Libraries Dependencies\Imports"> + <UniqueIdentifier>{c9c3e3ae-b75a-4d06-92ed-0de6e36c209d}</UniqueIdentifier> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{a9c4d8a1-69fb-4b02-ae40-124cd3fda1bd}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="clcg2.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="clcg4.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="DllmainRandlib.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="fsultra.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="genbet.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\sci_gateway\c\gw_randlib.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ignbin.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="igngeom.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ignpoi.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="kiss.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="mt.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\sci_gateway\c\sci_grand.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="sexpo.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="sgamma.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="urand.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\includes\clcg4.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\includes\dynlib_randlib.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\includes\grand.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\includes\gw_randlib.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\includes\others_generators.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="core_import.def"> + <Filter>Libraries Dependencies\Imports</Filter> + </None> + <None Include="randlib_f_Import.def"> + <Filter>Libraries Dependencies\Imports</Filter> + </None> + <None Include="..\..\Makefile.am" /> + <None Include="..\..\randlib.iss" /> + <None Include="..\..\sci_gateway\randlib_gateway.xml" /> + <None Include="elementary_functions_f_Import.def"> + <Filter>Libraries Dependencies\Imports</Filter> + </None> + <None Include="..\..\locales\randlib.pot"> + <Filter>localization</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="randlib.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/modules/randlib/src/c/randlib_f_Import.def b/modules/randlib/src/c/randlib_f_Import.def new file mode 100755 index 000000000..b74b53c9c --- /dev/null +++ b/modules/randlib/src/c/randlib_f_Import.def @@ -0,0 +1,21 @@ +LIBRARY randlib_f.dll + + +EXPORTS +; --------------------------------------- +; randlib_f +; --------------------------------------- +genexp_ +genchi_ +gennf_ +gennch_ +genmn_ +setgmn_ +ignnbn_ +genprm_ +gennor_ +gengam_ +genmul_ +genf_ +phrtsd_ +snorm_ diff --git a/modules/randlib/src/c/sexpo.c b/modules/randlib/src/c/sexpo.c new file mode 100755 index 000000000..b96c03a81 --- /dev/null +++ b/modules/randlib/src/c/sexpo.c @@ -0,0 +1,97 @@ +#include <math.h> +#include "grand.h" +#include "core_math.h" + +double C2F(sexpo)(void) +/* +********************************************************************** + + + (STANDARD-) E X P O N E N T I A L DISTRIBUTION + + +********************************************************************** +********************************************************************** + +This source code was taken in the project "freemat"(BSD license) +This source code was modified by Gaüzère Sabine according to the +modifications done by JJV + + FOR DETAILS SEE: + + AHRENS, J.H. AND DIETER, U. + COMPUTER METHODS FOR SAMPLING FROM THE + EXPONENTIAL AND NORMAL DISTRIBUTIONS. + COMM. ACM, 15,10 (OCT. 1972), 873 - 882. + + ALL STATEMENT NUMBERS CORRESPOND TO THE STEPS OF ALGORITHM + 'SA' IN THE ABOVE PAPER (SLIGHTLY MODIFIED IMPLEMENTATION) + + Modified by Barry W. Brown, Feb 3, 1988 to use RANF instead of + SUNIF. The argument IR thus goes away. + +********************************************************************** + Q(N) = SUM(ALOG(2.0)**K/K!) K=1,..,N , THE HIGHEST N + (HERE 8) IS DETERMINED BY Q(N)=1.0 WITHIN STANDARD PRECISION +*/ +{ + /* ** OLD VALUES + static double q[8] = { + 0.69314718055995, 0.93337368751905, 0.98887779618387, 0.99849592529150, + 0.99982928110614, 0.99998331641007, 0.99999856914388, 0.99999989069256 + //0.6931472,0.9333737,0.9888778,0.9984959,0.9998293,0.9999833,0.9999986,0.9999999 + }; + */ + static double q[8] = + { + 0.69314718246459960938, + 0.93337368965148925781, + 0.98887777328491210938, + 0.99849587678909301758, + 0.99982929229736328125, + 0.99998331069946289062, + 0.99999862909317016602, + 0.99999988079071044922 + }; + static int i; + static double sexpo, a, u, ustar, umin; + + a = 0.0; + u = C2F(ranf)(); + goto S30; +S20: + a += q[0]; +S30: + u += u; + // JJV changed the following to reflect the true algorithm and + // JJV prevent unpredictable behavior if U is initially 0.5. + // IF (u.LE.1.0) GO TO 20 + if (u < 1.0) + { + goto S20; + } + u -= 1.0; + if (u > q[0]) + { + goto S60; + } + sexpo = a + u; + return sexpo; +S60: + i = 1; + ustar = C2F(ranf)(); + umin = ustar; +S70: + ustar = C2F(ranf)(); + if (ustar < umin) + { + umin = ustar; + } + i += 1; + if (u > q[i - 1]) + { + goto S70; + } + sexpo = a + umin * q[0]; + return sexpo; +} diff --git a/modules/randlib/src/c/sgamma.c b/modules/randlib/src/c/sgamma.c new file mode 100755 index 000000000..ce3b9dd0c --- /dev/null +++ b/modules/randlib/src/c/sgamma.c @@ -0,0 +1,315 @@ +#include <math.h> +#include "grand.h" +#include "core_math.h" + + +double fsign1 (double x, double y) +{ + if (y >= 0.0) + { + return Abs(x); + } + else + { + return -Abs(x); + } +} + +double C2F(sgamma)(double *a) +/* +********************************************************************** + + + (STANDARD-) G A M M A DISTRIBUTION + + +********************************************************************** +********************************************************************** + + PARAMETER A >= 1.0 ! + +********************************************************************** +This source code was taken in the project "freemat"(BSD license) +This source code was modified by Gaüzère Sabine according to the +modifications done by JJV + + FOR DETAILS SEE: + + AHRENS, J.H. AND DIETER, U. + GENERATING GAMMA VARIATES BY A + MODIFIED REJECTION TECHNIQUE. + COMM. ACM, 25,1 (JAN. 1982), 47 - 54. + + STEP NUMBERS CORRESPOND TO ALGORITHM 'GD' IN THE ABOVE PAPER + (STRAIGHTFORWARD IMPLEMENTATION) + + Modified by Barry W. Brown, Feb 3, 1988 to use RANF instead of + SUNIF. The argument IR thus goes away. + +********************************************************************** + + PARAMETER 0.0 < A < 1.0 ! + +********************************************************************** + + FOR DETAILS SEE: + + AHRENS, J.H. AND DIETER, U. + COMPUTER METHODS FOR SAMPLING FROM GAMMA, + BETA, POISSON AND BINOMIAL DISTRIBUTIONS. + COMPUTING, 12 (1974), 223 - 246. + + (ADAPTED IMPLEMENTATION OF ALGORITHM 'GS' IN THE ABOVE PAPER) + +********************************************************************** + INPUT: A =PARAMETER (MEAN) OF THE STANDARD GAMMA DISTRIBUTION + OUTPUT: SGAMMA = SAMPLE FROM THE GAMMA-(A)-DISTRIBUTION + COEFFICIENTS Q(K) - FOR Q0 = SUM(Q(K)*A**(-K)) + COEFFICIENTS A(K) - FOR Q = Q0+(T*T/2)*SUM(A(K)*V**K) + COEFFICIENTS E(K) - FOR EXP(Q)-1 = SUM(E(K)*Q**K) + PREVIOUS A PRE-SET TO ZERO - AA IS A', AAA IS A" + SQRT32 IS THE SQUAREROOT OF 32 = 5.656854249492380 +*/ +{ + //extern float sign( float num, float sign ); + static double q1 = 4.166669026017189026E-2; + static double q2 = 2.083148062229156494E-2; + static double q3 = 8.01191013306379318E-3; + static double q4 = 1.44121004268527031E-3; + static double q5 = -7.388000085484236E-5; + static double q6 = 2.4510998628102243E-4; + static double q7 = 2.4239999765995890E-4; + static double a1 = 0.33333331346511840820; + static double a2 = -0.25000301003456115723; + static double a3 = 0.20000620186328887939; + static double a4 = -0.16629210114479064941; + static double a5 = 0.14236569404602050781; + static double a6 = -0.13671770691871643066; + static double a7 = 0.12337949872016906738; + static double e1 = 1.0; + static double e2 = 0.49998968839645385742; + static double e3 = 0.16682900488376617432; + static double e4 = 4.077529907226562500E-2; + static double e5 = 1.029300037771463394E-2; + static double aa = 0.0; + static double aaa = 0.0; + static double sqrt32 = 5.65685415267944335938; + static double sgamma, s2, s, d, t, x, u, r, q0, b, si, c, v, q, e, w, p, b0; + if (*a == aa) + { + goto S10; + } + if (*a < 1.0) + { + goto S130; + } + /* + STEP 1: RECALCULATIONS OF S2,S,D IF A HAS CHANGED + */ + aa = *a; + s2 = *a - 0.5; + s = sqrt(s2); + d = sqrt32 - 12.0 * s; +S10: + /* + STEP 2: T=STANDARD NORMAL DEVIATE, + X=(S,1/2)-NORMAL DEVIATE. + IMMEDIATE ACCEPTANCE (I) + */ + t = C2F(snorm)(); + x = s + 0.5 * t; + sgamma = x * x; + if (t >= 0.0) + { + return sgamma; + } + /* + STEP 3: U= 0,1 -UNIFORM SAMPLE. SQUEEZE ACCEPTANCE (S) + */ + u = C2F(ranf)(); + if (d*u <= t * t * t) + { + return sgamma; + } + /* + STEP 4: RECALCULATIONS OF Q0,B,SI,C IF NECESSARY + */ + if (*a == aaa) + { + goto S40; + } + aaa = *a; + r = 1.0 / *a; + q0 = ((((((q7 * r + q6) * r + q5) * r + q4) * r + q3) * r + q2) * r + q1) * r; + /* + APPROXIMATION DEPENDING ON SIZE OF PARAMETER A + THE CONSTANTS IN THE EXPRESSIONS FOR B, SI AND + C WERE ESTABLISHED BY NUMERICAL EXPERIMENTS + */ + if (*a <= 3.686) + { + goto S30; //3.68600010871887207031 + } + if (*a <= 13.022) + { + goto S20; //13.02200031280517578125 + } + /* + CASE 3: A .GT. 13.022 + */ + b = 1.76999998092651367188; + si = 0.75; + c = 0.15150000154972076416 / s; + goto S40; +S20: + /* + CASE 2: 3.686 .LT. A .LE. 13.022 + */ + b = 1.65400004386901855469 + 7.60000012814998627E-3 * s2; + si = 1.67999994754791259766 / s + 0.27500000596046447754; + c = 6.199999898672103882E-2 / s + 2.400000020861625671E-2; + goto S40; +S30: + /* + CASE 1: A .LE. 3.686 + */ + b = 0.46299999952316284180 + s + 0.17800000309944152832 * s2; + si = 1.23500001430511474609; + c = 0.19499999284744262695 / s - 7.900000363588333130E-2 + 1.5999999642372131348E-1 * s; +S40: + /* + STEP 5: NO QUOTIENT TEST IF X NOT POSITIVE + */ + if (x <= 0.0) + { + goto S70; + } + /* + STEP 6: CALCULATION OF V AND QUOTIENT Q + */ + v = t / (s + s); + if (Abs(v) <= 0.25) + { + goto S50; + } + q = q0 - s * t + 0.25 * t * t + (s2 + s2) * log(1.0 + v); + goto S60; +S50: + q = q0 + 0.5 * t * t * ((((((a7 * v + a6) * v + a5) * v + a4) * v + a3) * v + a2) * v + a1) * v; +S60: + /* + STEP 7: QUOTIENT ACCEPTANCE (Q) + */ + if (log(1.0 - u) <= q) + { + return sgamma; + } +S70: + /* + STEP 8: E=STANDARD EXPONENTIAL DEVIATE + U= 0,1 -UNIFORM DEVIATE + T=(B,SI)-DOUBLE EXPONENTIAL (LAPLACE) SAMPLE + */ + e = C2F(sexpo)(); + u = C2F(ranf)(); + u += (u - 1.0); + t = b + fsign1(si * e, u); + /* + STEP 9: REJECTION IF T .LT. TAU(1) = -.71874483771719 + */ + if (t < -0.7187449) + { + goto S70; //-0.71874487400054931641 + } + /* + STEP 10: CALCULATION OF V AND QUOTIENT Q + */ + v = t / (s + s); + if (Abs(v) <= 0.25) + { + goto S90; + } + q = q0 - s * t + 0.25 * t * t + (s2 + s2) * log(1.0 + v); + goto S100; +S90: + q = q0 + 0.5 * t * t * ((((((a7 * v + a6) * v + a5) * v + a4) * v + a3) * v + a2) * v + a1) * v; +S100: + /* + STEP 11: HAT ACCEPTANCE (H) (IF Q NOT POSITIVE GO TO STEP 8) + */ + if (q <= 0.0) + { + goto S70; + } + if (q <= 0.5) + { + goto S110; + } + // JJV modified the code through line 125 to handle large Q case + if (q < 15.0) + { + goto S105; + } + // JJV Here Q is large enough that Q = log(exp(Q) - 1.0) (for DOUBLE PRECISION Q) + // JJV so reformulate test at 120 in terms of one EXP, if not too big + // JJV 87.49823 is close to the largest DOUBLE PRECISION which can be + // JJV exponentiated (87.49823 = log(1.0E38)) + if ((q + e - 0.5 * t * t) > 87.49823) + { + goto S125; //87.498222998046875 + } + if (c * Abs(u) > exp(q + e - 0.5 * t * t)) + { + goto S70; + } + goto S125; +S105: + w = exp(q) - 1.0; + goto S120; +S110: + w = ((((e5 * q + e4) * q + e3) * q + e2) * q + e1) * q; +S120: + /* + IF T IS REJECTED, SAMPLE AGAIN AT STEP 8 + */ + if (c * Abs(u) > w * exp(e - 0.5 * t * t)) + { + goto S70; + } +S125: + x = s + 0.5 * t; + sgamma = x * x; + return sgamma; + /* + ALTERNATE METHOD FOR PARAMETERS A BELOW 1 (.3678794=EXP(-1.)) + */ + // JJV changed B to B0 (which was added to declarations for this) + // JJV in 130 to END to fix rare and subtle bug. + // JJV Line: '130 aa = 0.0' was removed (unnecessary, wasteful). + // JJV Reasons: the state of AA only serves to tell the A .GE. 1.0 + // JJV case if certain A-dependant constants need to be recalculated. + // JJV The A .LT. 1.0 case (here) no longer changes any of these, and + // JJV the recalculation of B (which used to change with an + // JJV A .LT. 1.0 call) is governed by the state of AAA anyway. +S130: + b0 = 1.0 + 0.3678794 * (*a); //0.36787939071655273438 +S140: + p = b0 * C2F(ranf)(); + if (p >= 1.0) + { + goto S150; + } + sgamma = exp(log(p) / *a); + if (C2F(sexpo)() < sgamma) + { + goto S140; + } + return sgamma; +S150: + sgamma = -log((b0 - p) / *a); + if (C2F(sexpo)() < (1.0 - *a)*log(sgamma)) + { + goto S140; + } + return sgamma; +} diff --git a/modules/randlib/src/c/urand.c b/modules/randlib/src/c/urand.c new file mode 100755 index 000000000..ef0b75063 --- /dev/null +++ b/modules/randlib/src/c/urand.c @@ -0,0 +1,72 @@ +/* + * + * Copyright (C) 2010 - DIGITEO - Michael Baudin + * Copyright (C) 2004 - Bruno Pincon + * Copyright (C) 1973 - CLEVE B. MOLER + * Copyright (C) 1973 - MICHAEL A. MALCOLM + * + * PURPOSE + * the basic rand generator of Scilab : s <- (a*s + c) mod m + * with : + * m = 2^{31} + * a = 843314861 + * c = 453816693 + * + * s must be in [0,m-1] when user changes seed with set_state_urand + * period = m + * + * NOTES + * a/ Rewritten (in C) so as to output integers like all the others + * generators (and also to have the same manner to set/get the state) + * b/ unsigned int arithmetic must be the classic 32 bits unsigned + * arithmetic (ie also is exact modulo 2^32). + * + * URAND, A UNIVERSAL RANDOM NUMBER GENERATOR + * BY, MICHAEL A. MALCOLM, CLEVE B. MOLER, + * STAN-CS-73-334, JANUARY 1973, + * COMPUTER SCIENCE DEPARTMENT, + * School of Humanities and Sciences, STANFORD UNIVERSITY, + * ftp://reports.stanford.edu/pub/cstr/reports/cs/tr/73/334/CS-TR-73-334.pdf + * + * + */ + + +#include <math.h> /* to use floor */ +#include "sciprint.h" +#include "others_generators.h" +#include "localization.h" + +static unsigned int s = 0; + +unsigned long int urandc(void) +{ + s = 843314861ul * s + 453816693ul; /* => on obtient ici un resultat modulo 2^32 */ + + /* il suffit du test suivant pour obtenir le modulo 2^31 */ + if (s >= 2147483648ul) + { + s -= 2147483648ul; + } + + return ( s ); +} + +int set_state_urand(double g) +{ + if ( g == floor(g) && 0 <= g && g <= 2147483647 ) + { + s = (unsigned int) g; + return ( 1 ); + } + else + { + sciprint(_("\nBad seed for urand, must be an int in [0, 2147483647]\n")); + return ( 0 ); + } +} + +void get_state_urand(double g[]) +{ + g[0] = (double) s; +} diff --git a/modules/randlib/src/fortran/.deps/.dirstamp b/modules/randlib/src/fortran/.deps/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/randlib/src/fortran/.deps/.dirstamp diff --git a/modules/randlib/src/fortran/.dirstamp b/modules/randlib/src/fortran/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/randlib/src/fortran/.dirstamp diff --git a/modules/randlib/src/fortran/.libs/genchi.o b/modules/randlib/src/fortran/.libs/genchi.o Binary files differnew file mode 100755 index 000000000..633985947 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/genchi.o diff --git a/modules/randlib/src/fortran/.libs/genexp.o b/modules/randlib/src/fortran/.libs/genexp.o Binary files differnew file mode 100755 index 000000000..ecb3d0cb9 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/genexp.o diff --git a/modules/randlib/src/fortran/.libs/genf.o b/modules/randlib/src/fortran/.libs/genf.o Binary files differnew file mode 100755 index 000000000..2461d4e55 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/genf.o diff --git a/modules/randlib/src/fortran/.libs/gengam.o b/modules/randlib/src/fortran/.libs/gengam.o Binary files differnew file mode 100755 index 000000000..998b7e7ea --- /dev/null +++ b/modules/randlib/src/fortran/.libs/gengam.o diff --git a/modules/randlib/src/fortran/.libs/genmn.o b/modules/randlib/src/fortran/.libs/genmn.o Binary files differnew file mode 100755 index 000000000..f55d238f6 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/genmn.o diff --git a/modules/randlib/src/fortran/.libs/genmul.o b/modules/randlib/src/fortran/.libs/genmul.o Binary files differnew file mode 100755 index 000000000..5ab696c5e --- /dev/null +++ b/modules/randlib/src/fortran/.libs/genmul.o diff --git a/modules/randlib/src/fortran/.libs/gennch.o b/modules/randlib/src/fortran/.libs/gennch.o Binary files differnew file mode 100755 index 000000000..28b3df20a --- /dev/null +++ b/modules/randlib/src/fortran/.libs/gennch.o diff --git a/modules/randlib/src/fortran/.libs/gennf.o b/modules/randlib/src/fortran/.libs/gennf.o Binary files differnew file mode 100755 index 000000000..007bf3235 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/gennf.o diff --git a/modules/randlib/src/fortran/.libs/gennor.o b/modules/randlib/src/fortran/.libs/gennor.o Binary files differnew file mode 100755 index 000000000..dfeeb154c --- /dev/null +++ b/modules/randlib/src/fortran/.libs/gennor.o diff --git a/modules/randlib/src/fortran/.libs/genprm.o b/modules/randlib/src/fortran/.libs/genprm.o Binary files differnew file mode 100755 index 000000000..f20f55dd7 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/genprm.o diff --git a/modules/randlib/src/fortran/.libs/genunf.o b/modules/randlib/src/fortran/.libs/genunf.o Binary files differnew file mode 100755 index 000000000..dc2da3291 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/genunf.o diff --git a/modules/randlib/src/fortran/.libs/ignnbn.o b/modules/randlib/src/fortran/.libs/ignnbn.o Binary files differnew file mode 100755 index 000000000..89e9c9ae9 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/ignnbn.o diff --git a/modules/randlib/src/fortran/.libs/phrtsd.o b/modules/randlib/src/fortran/.libs/phrtsd.o Binary files differnew file mode 100755 index 000000000..5731b95ee --- /dev/null +++ b/modules/randlib/src/fortran/.libs/phrtsd.o diff --git a/modules/randlib/src/fortran/.libs/setgmn.o b/modules/randlib/src/fortran/.libs/setgmn.o Binary files differnew file mode 100755 index 000000000..c61150f89 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/setgmn.o diff --git a/modules/randlib/src/fortran/.libs/snorm.o b/modules/randlib/src/fortran/.libs/snorm.o Binary files differnew file mode 100755 index 000000000..e4d53a4d7 --- /dev/null +++ b/modules/randlib/src/fortran/.libs/snorm.o diff --git a/modules/randlib/src/fortran/Output_stream_Import.def b/modules/randlib/src/fortran/Output_stream_Import.def new file mode 100755 index 000000000..f64196130 --- /dev/null +++ b/modules/randlib/src/fortran/Output_stream_Import.def @@ -0,0 +1,8 @@ + LIBRARY output_stream.dll + + +EXPORTS +; +;output_stream +; +basout_
\ No newline at end of file diff --git a/modules/randlib/src/fortran/core_Import.def b/modules/randlib/src/fortran/core_Import.def new file mode 100755 index 000000000..7d5391440 --- /dev/null +++ b/modules/randlib/src/fortran/core_Import.def @@ -0,0 +1,22 @@ + LIBRARY core.dll + + +EXPORTS +; +;core +; +iop_ + +; +; explicit imports (COMMON) to fix warning LNK4049: locally defined symbol +; +stack_ +adre_ +vstk_ +recu_ +errgst_ +com_ +cha1_ +intersci_ +; + diff --git a/modules/randlib/src/fortran/genchi.f b/modules/randlib/src/fortran/genchi.f new file mode 100755 index 000000000..f7c411cd7 --- /dev/null +++ b/modules/randlib/src/fortran/genchi.f @@ -0,0 +1,44 @@ + DOUBLE PRECISION FUNCTION genchi(df) +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENCHI( DF ) +C Generate random value of CHIsquare variable +C +C +C Function +C +C +C Generates random deviate from the distribution of a chisquare +C with DF degrees of freedom random variable. +C +C +C Arguments +C +C +C DF --> Degrees of freedom of the chisquare +C (Must be positive) +C DOUBLE PRECISION DF +C +C +C Method +C +C +C Uses relation between chisquare and gamma. +C +C********************************************************************** +C .. Scalar Arguments .. + DOUBLE PRECISION df +C .. +C .. External Functions .. +C DOUBLE PRECISION gengam +C EXTERNAL gengam + DOUBLE PRECISION sgamma + EXTERNAL sgamma +C .. +C .. Executable Statements .. +C JJV changed this to call sgamma directly +C 10 genchi = 2.0*gengam(1.0,df/2.0) + 10 genchi = 2.0*sgamma(df/2.0) + RETURN + + END diff --git a/modules/randlib/src/fortran/genchi.lo b/modules/randlib/src/fortran/genchi.lo new file mode 100755 index 000000000..904a0bcd4 --- /dev/null +++ b/modules/randlib/src/fortran/genchi.lo @@ -0,0 +1,12 @@ +# src/fortran/genchi.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/genchi.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/genexp.f b/modules/randlib/src/fortran/genexp.f new file mode 100755 index 000000000..ab6ad120b --- /dev/null +++ b/modules/randlib/src/fortran/genexp.f @@ -0,0 +1,55 @@ + DOUBLE PRECISION FUNCTION genexp(av) + +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENEXP( AV ) +C +C GENerate EXPonential random deviate +C +C +C Function +C +C +C Generates a single random deviate from an exponential +C distribution with mean AV. +C +C +C Arguments +C +C +C AV --> The mean of the exponential distribution from which +C a random deviate is to be generated. +C DOUBLE PRECISION AV +C JJV (AV >= 0) +C +C GENEXP <-- The random deviate. +C DOUBLE PRECISION GENEXP +C +C +C Method +C +C +C Renames SEXPO from TOMS as slightly modified by BWB to use RANF +C instead of SUNIF. +C +C For details see: +C +C Ahrens, J.H. and Dieter, U. +C Computer Methods for Sampling From the +C Exponential and Normal Distributions. +C Comm. ACM, 15,10 (Oct. 1972), 873 - 882. +C +C********************************************************************** +C .. Scalar Arguments .. + DOUBLE PRECISION av +C .. +C .. External Functions .. + DOUBLE PRECISION sexpo + EXTERNAL sexpo +C .. +C .. Executable Statements .. +C JJV added check to ensure AV >= 0.0 + 10 genexp = sexpo()*av + RETURN + + END diff --git a/modules/randlib/src/fortran/genexp.lo b/modules/randlib/src/fortran/genexp.lo new file mode 100755 index 000000000..6e7182181 --- /dev/null +++ b/modules/randlib/src/fortran/genexp.lo @@ -0,0 +1,12 @@ +# src/fortran/genexp.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/genexp.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/genf.f b/modules/randlib/src/fortran/genf.f new file mode 100755 index 000000000..a918282ef --- /dev/null +++ b/modules/randlib/src/fortran/genf.f @@ -0,0 +1,68 @@ + DOUBLE PRECISION FUNCTION genf(dfn,dfd) +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENF( DFN, DFD ) +C GENerate random deviate from the F distribution +C +C +C Function +C +C +C Generates a random deviate from the F (variance ratio) +C distribution with DFN degrees of freedom in the numerator +C and DFD degrees of freedom in the denominator. +C +C +C Arguments +C +C +C DFN --> Numerator degrees of freedom +C (Must be positive) +C DOUBLE PRECISION DFN +C DFD --> Denominator degrees of freedom +C (Must be positive) +C DOUBLE PRECISION DFD +C +C +C Method +C +C +C Directly generates ratio of chisquare variates +C +C********************************************************************** + include 'stack.h' +C .. Scalar Arguments .. + DOUBLE PRECISION dfd,dfn +C .. +C .. Local Scalars .. + DOUBLE PRECISION xden,xnum +C .. +C JJV changed this code to call sgamma directly +C .. External Functions .. +C DOUBLE PRECISION genchi +C EXTERNAL genchi + DOUBLE PRECISION sgamma + EXTERNAL sgamma +C .. +C .. Executable Statements .. + 10 xnum = 2.0*sgamma(dfn/2.0)/dfn + +C GENF = ( GENCHI( DFN ) / DFN ) / ( GENCHI( DFD ) / DFD ) + xden = 2.0*sgamma(dfd/2.0)/dfd +C JJV changed constant so that it will not underflow at compile time +C JJV while not slowing generator by using double precision or logs. +C IF (.NOT. (xden.LE. (1.0E-38*xnum))) GO TO 20 + IF (.NOT. (xden.LE. (1.0E-37*xnum))) GO TO 20 + call basout(io,wte,'F: generated numbers would cause overflow') +c WRITE (*,*) ' Numerator ',xnum,' Denominator ',xden +C JJV next 2 lines changed to maintain truncation of large deviates. +C WRITE (*,*) ' GENF returning 1.0E38' +C genf = 1.0E38 + call basout(io,wte,' GENF returning 1.0E37') + genf = 1.0E37 + GO TO 30 + + 20 genf = xnum/xden + 30 RETURN + + END diff --git a/modules/randlib/src/fortran/genf.lo b/modules/randlib/src/fortran/genf.lo new file mode 100755 index 000000000..cd708e369 --- /dev/null +++ b/modules/randlib/src/fortran/genf.lo @@ -0,0 +1,12 @@ +# src/fortran/genf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/genf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/gengam.f b/modules/randlib/src/fortran/gengam.f new file mode 100755 index 000000000..4e97c1eb6 --- /dev/null +++ b/modules/randlib/src/fortran/gengam.f @@ -0,0 +1,67 @@ + DOUBLE PRECISION FUNCTION gengam(a,r) +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENGAM( A, R ) +C GENerates random deviates from GAMma distribution +C +C +C Function +C +C +C Generates random deviates from the gamma distribution whose +C density is +C (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X) +C +C +C Arguments +C +C +C JJV added the argument ranges supported +C A --> Location parameter of Gamma distribution +C DOUBLE PRECISION A ( A > 0 ) +C +C R --> Shape parameter of Gamma distribution +C DOUBLE PRECISION R ( R > 0 ) +C +C +C Method +C +C +C Renames SGAMMA from TOMS as slightly modified by BWB to use RANF +C instead of SUNIF. +C +C For details see: +C (Case R >= 1.0) +C Ahrens, J.H. and Dieter, U. +C Generating Gamma Variates by a +C Modified Rejection Technique. +C Comm. ACM, 25,1 (Jan. 1982), 47 - 54. +C Algorithm GD +C +C JJV altered the following to reflect sgamma argument ranges +C (Case 0.0 < R < 1.0) +C Ahrens, J.H. and Dieter, U. +C Computer Methods for Sampling from Gamma, +C Beta, Poisson and Binomial Distributions. +C Computing, 12 (1974), 223-246/ +C Adapted algorithm GS. +C +C********************************************************************** +C .. Scalar Arguments .. + DOUBLE PRECISION a,r +C .. +C .. External Functions .. + DOUBLE PRECISION sgamma + EXTERNAL sgamma +C .. +C .. Executable Statements .. + +C JJV added argument value checker +C JPC : argument checks are moved in the interface +C JJV end addition + + 10 gengam = sgamma(r)/a +C gengam = gengam/a + RETURN + + END diff --git a/modules/randlib/src/fortran/gengam.lo b/modules/randlib/src/fortran/gengam.lo new file mode 100755 index 000000000..503a1fb8c --- /dev/null +++ b/modules/randlib/src/fortran/gengam.lo @@ -0,0 +1,12 @@ +# src/fortran/gengam.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/gengam.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/genmn.f b/modules/randlib/src/fortran/genmn.f new file mode 100755 index 000000000..a73982f0c --- /dev/null +++ b/modules/randlib/src/fortran/genmn.f @@ -0,0 +1,82 @@ + SUBROUTINE genmn(parm,x,work) +C********************************************************************** +C +C SUBROUTINE GENMN(PARM,X,WORK) +C GENerate Multivariate Normal random deviate +C +C +C Arguments +C +C +C PARM --> Parameters needed to generate multivariate normal +C deviates (MEANV and Cholesky decomposition of +C COVM). Set by a previous call to SETGMN. +C 1 : 1 - size of deviate, P +C 2 : P + 1 - mean vector +C P+2 : P*(P+3)/2 + 1 - upper half of cholesky +C decomposition of cov matrix +C DOUBLE PRECISION PARM(*) +C +C X <-- Vector deviate generated. +C DOUBLE PRECISION X(P) +C +C WORK <--> Scratch array +C DOUBLE PRECISION WORK(P) +C +C +C Method +C +C +C 1) Generate P independent standard normal deviates - Ei ~ N(0,1) +C +C 2) Using Cholesky decomposition find A s.t. trans(A)*A = COVM +C +C 3) trans(A)E + MEANV ~ N(MEANV,COVM) +C +C********************************************************************** +C .. Array Arguments .. + DOUBLE PRECISION parm(*),work(*),x(*) +C .. +C .. Local Scalars .. + DOUBLE PRECISION ae + INTEGER i,icount,j,p +C .. +C .. External Functions .. + DOUBLE PRECISION snorm + EXTERNAL snorm +C .. +C .. Intrinsic Functions .. + INTRINSIC int +C .. +C .. Executable Statements .. + p = int(parm(1)) +C +C Generate P independent normal deviates - WORK ~ N(0,1) +C + DO 10,i = 1,p + work(i) = snorm() + 10 CONTINUE + DO 30,i = 1,p +C +C PARM (P+2 : P*(P+3)/2 + 1) contains A, the Cholesky +C decomposition of the desired covariance matrix. +C trans(A)(1,1) = PARM(P+2) +C trans(A)(2,1) = PARM(P+3) +C trans(A)(2,2) = PARM(P+2+P) +C trans(A)(3,1) = PARM(P+4) +C trans(A)(3,2) = PARM(P+3+P) +C trans(A)(3,3) = PARM(P+2-1+2P) ... +C +C trans(A)*WORK + MEANV ~ N(MEANV,COVM) +C + icount = 0 + ae = 0.0 + DO 20,j = 1,i + icount = icount + j - 1 + ae = ae + parm(i+ (j-1)*p-icount+p+1)*work(j) + 20 CONTINUE + x(i) = ae + parm(i+1) + 30 CONTINUE + RETURN +C + END diff --git a/modules/randlib/src/fortran/genmn.lo b/modules/randlib/src/fortran/genmn.lo new file mode 100755 index 000000000..7bf5139e1 --- /dev/null +++ b/modules/randlib/src/fortran/genmn.lo @@ -0,0 +1,12 @@ +# src/fortran/genmn.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/genmn.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/genmul.f b/modules/randlib/src/fortran/genmul.f new file mode 100755 index 000000000..7b2be05c3 --- /dev/null +++ b/modules/randlib/src/fortran/genmul.f @@ -0,0 +1,83 @@ + SUBROUTINE genmul(n,p,ncat,ix) +C********************************************************************** +C +C SUBROUTINE GENMUL( N, P, NCAT, IX ) +C GENerate an observation from the MULtinomial distribution +C +C +C Arguments +C +C +C N --> Number of events that will be classified into one of +C the categories 1..NCAT +C INTEGER N +C +C P --> Vector of probabilities. P(i) is the probability that +C an event will be classified into category i. Thus, P(i) +C must be [0,1]. Only the first NCAT-1 P(i) must be defined +C since P(NCAT) is 1.0 minus the sum of the first +C NCAT-1 P(i). +C DOUBLE PRECISION P(NCAT-1) +C +C NCAT --> Number of categories. Length of P and IX. +C INTEGER NCAT +C +C IX <-- Observation from multinomial distribution. All IX(i) +C will be nonnegative and their sum will be N. +C INTEGER IX(NCAT) +C +C +C Method +C +C +C Algorithm from page 559 of +C +C Devroye, Luc +C +C Non-Uniform Random Variate Generation. Springer-Verlag, +C New York, 1986. +C +C********************************************************************** +C .. Scalar Arguments .. + INTEGER n,ncat +C .. +C .. Array Arguments .. + DOUBLE PRECISION p(*) + INTEGER ix(*) +C .. +C .. Local Scalars .. + DOUBLE PRECISION prob,sum + INTEGER i,icat,ntot +C .. +C .. External Functions .. + INTEGER ignbin + EXTERNAL ignbin +C .. +C .. Intrinsic Functions .. + INTRINSIC abs +C .. +C .. Executable Statements .. + +C Check Arguments +C see Rand.c +C Initialize variables + ntot = n + sum = 1.0 + DO 20,i = 1,ncat + ix(i) = 0 + 20 CONTINUE + +C Generate the observation + DO 30,icat = 1,ncat - 1 + prob = p(icat)/sum + ix(icat) = ignbin(ntot,prob) + ntot = ntot - ix(icat) + IF (ntot.LE.0) RETURN + sum = sum - p(icat) + 30 CONTINUE + ix(ncat) = ntot + +C Finished + RETURN + + END diff --git a/modules/randlib/src/fortran/genmul.lo b/modules/randlib/src/fortran/genmul.lo new file mode 100755 index 000000000..bf819972c --- /dev/null +++ b/modules/randlib/src/fortran/genmul.lo @@ -0,0 +1,12 @@ +# src/fortran/genmul.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/genmul.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/gennch.f b/modules/randlib/src/fortran/gennch.f new file mode 100755 index 000000000..0619a4d7e --- /dev/null +++ b/modules/randlib/src/fortran/gennch.f @@ -0,0 +1,64 @@ + DOUBLE PRECISION FUNCTION gennch(df,xnonc) +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENNCH( DF, XNONC ) +C Generate random value of Noncentral CHIsquare variable +C +C +C Function +C +C + +C Generates random deviate from the distribution of a noncentral +C chisquare with DF degrees of freedom and noncentrality parameter +C XNONC. +C +C +C Arguments +C +C +C DF --> Degrees of freedom of the chisquare +C (Must be >= 1.0) +C DOUBLE PRECISION DF +C +C XNONC --> Noncentrality parameter of the chisquare +C (Must be >= 0.0) +C DOUBLE PRECISION XNONC +C +C +C Method +C +C +C Uses fact that noncentral chisquare is the sum of a chisquare +C deviate with DF-1 degrees of freedom plus the square of a normal +C deviate with mean sqrt(XNONC) and standard deviation 1. +C +C********************************************************************** +C .. Scalar Arguments .. + DOUBLE PRECISION df,xnonc +C .. +C .. External Functions .. +C JJV changed these to call SGAMMA and SNORM directly +C DOUBLE PRECISION genchi,gennor +C EXTERNAL genchi,gennor + DOUBLE PRECISION sgamma,snorm + EXTERNAL sgamma,snorm +C .. +C .. Intrinsic Functions .. + INTRINSIC sqrt +C .. +C JJV changed abort to df < 1, and added case: df = 1 +C .. Executable Statements .. +C JJV changed this to call SGAMMA and SNORM directly +C gennch = genchi(df-1.0) + gennor(sqrt(xnonc),1.0)**2 + + 10 IF (df.GE.1.000001) GO TO 20 +C JJV case DF = 1.0 + gennch = (snorm() + sqrt(xnonc))**2 + GO TO 30 + +C JJV case DF > 1.0 + 20 gennch = 2.0*sgamma((df-1.0)/2.0) + (snorm() + sqrt(xnonc))**2 + 30 RETURN + + END diff --git a/modules/randlib/src/fortran/gennch.lo b/modules/randlib/src/fortran/gennch.lo new file mode 100755 index 000000000..e47a41312 --- /dev/null +++ b/modules/randlib/src/fortran/gennch.lo @@ -0,0 +1,12 @@ +# src/fortran/gennch.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/gennch.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/gennf.f b/modules/randlib/src/fortran/gennf.f new file mode 100755 index 000000000..6c821965f --- /dev/null +++ b/modules/randlib/src/fortran/gennf.f @@ -0,0 +1,86 @@ + DOUBLE PRECISION FUNCTION gennf(dfn,dfd,xnonc) + +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENNF( DFN, DFD, XNONC ) +C GENerate random deviate from the Noncentral F distribution +C +C +C Function +C +C +C Generates a random deviate from the noncentral F (variance ratio) +C distribution with DFN degrees of freedom in the numerator, and DFD +C degrees of freedom in the denominator, and noncentrality parameter +C XNONC. +C +C +C Arguments +C +C +C DFN --> Numerator degrees of freedom +C (Must be >= 1.0) +C DOUBLE PRECISION DFN +C DFD --> Denominator degrees of freedom +C (Must be positive) +C DOUBLE PRECISION DFD +C +C XNONC --> Noncentrality parameter +C (Must be nonnegative) +C DOUBLE PRECISION XNONC +C +C +C Method +C +C +C Directly generates ratio of noncentral numerator chisquare variate +C to central denominator chisquare variate. +C +C********************************************************************** + include 'stack.h' +C .. Scalar Arguments .. + DOUBLE PRECISION dfd,dfn,xnonc +C .. +C .. Local Scalars .. + DOUBLE PRECISION xden,xnum +C .. +C .. External Functions .. +C JJV changed the code to call SGAMMA and SNORM directly +C DOUBLE PRECISION genchi,gennch +C EXTERNAL genchi,gennch + DOUBLE PRECISION sgamma,snorm + EXTERNAL sgamma,snorm +C .. +C .. Executable Statements .. +C JJV changed the argument checker to allow DFN = 1.0 +C JJV in the same way as GENNCH was changed. +C GENNF = ( GENNCH( DFN, XNONC ) / DFN ) / ( GENCHI( DFD ) / DFD ) +C JJV changed this to call SGAMMA and SNORM directly +C xnum = gennch(dfn,xnonc)/dfn + 10 IF (dfn.GE.1.000001) GO TO 20 +C JJV case dfn = 1.0 - here I am treating dfn as exactly 1.0 + xnum = (snorm() + sqrt(xnonc))**2 + GO TO 30 + +C JJV case dfn > 1.0 + 20 xnum = (2.0*sgamma((dfn-1.0)/2.0) + (snorm()+sqrt(xnonc))**2)/dfn + +C xden = genchi(dfd)/dfd + 30 xden = 2.0*sgamma(dfd/2.0)/dfd + +C JJV changed constant so that it will not underflow at compile time +C JJV while not slowing generator by using double precision or logs. +C IF (.NOT. (xden.LE. (1.0E-38*xnum))) GO TO 40 + IF (.NOT. (xden.LE. (1.0E-37*xnum))) GO TO 40 + call basout(io,wte,'nf: Generated numbers would cause overflow') +C JJV next 2 lines changed to maintain truncation of large deviates. +C WRITE (*,*) ' GENNF returning 1.0E38' +C gennf = 1.0E38 + call basout(io,wte,' returning 1.0E37') + gennf = 1.0E37 + GO TO 50 + + 40 gennf = xnum/xden + 50 RETURN + + END diff --git a/modules/randlib/src/fortran/gennf.lo b/modules/randlib/src/fortran/gennf.lo new file mode 100755 index 000000000..0ce016b9b --- /dev/null +++ b/modules/randlib/src/fortran/gennf.lo @@ -0,0 +1,12 @@ +# src/fortran/gennf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/gennf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/gennor.f b/modules/randlib/src/fortran/gennor.f new file mode 100755 index 000000000..657c14ab9 --- /dev/null +++ b/modules/randlib/src/fortran/gennor.f @@ -0,0 +1,56 @@ + DOUBLE PRECISION FUNCTION gennor(av,sd) +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENNOR( AV, SD ) +C +C GENerate random deviate from a NORmal distribution +C +C +C Function +C +C +C Generates a single random deviate from a normal distribution +C with mean, AV, and standard deviation, SD. +C +C +C Arguments +C +C +C AV --> Mean of the normal distribution. +C DOUBLE PRECISION AV +C +C SD --> Standard deviation of the normal distribution. +C DOUBLE PRECISION SD +C JJV (SD >= 0) +C +C GENNOR <-- Generated normal deviate. +C DOUBLE PRECISION GENNOR +C +C +C Method +C +C +C Renames SNORM from TOMS as slightly modified by BWB to use RANF +C instead of SUNIF. +C +C For details see: +C Ahrens, J.H. and Dieter, U. +C Extensions of Forsythe's Method for Random +C Sampling from the Normal Distribution. +C Math. Comput., 27,124 (Oct. 1973), 927 - 937. +C +C +C********************************************************************** +C .. Scalar Arguments .. + DOUBLE PRECISION av,sd +C .. +C .. External Functions .. + DOUBLE PRECISION snorm + EXTERNAL snorm +C .. +C .. Executable Statements .. +C JJV added check to ensure SD >= 0.0 + 10 gennor = sd*snorm() + av + RETURN + + END diff --git a/modules/randlib/src/fortran/gennor.lo b/modules/randlib/src/fortran/gennor.lo new file mode 100755 index 000000000..b7432164a --- /dev/null +++ b/modules/randlib/src/fortran/gennor.lo @@ -0,0 +1,12 @@ +# src/fortran/gennor.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/gennor.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/genprm.f b/modules/randlib/src/fortran/genprm.f new file mode 100755 index 000000000..dd9dda3af --- /dev/null +++ b/modules/randlib/src/fortran/genprm.f @@ -0,0 +1,46 @@ + SUBROUTINE genprm(array,larray) +C********************************************************************** +C +C SUBROUTINE GENPRM( ARRAY, LARRAY ) +C GENerate random PeRMutation of array +C +C +C Arguments +C +C +C ARRAY <--> On output ARRAY is a random permutation of its +C value on input +C DOUBLE PRECISION ARRAY( LARRAY ) +C +C LARRAY <--> Length of ARRAY +C INTEGER LARRAY +C +C Modification by Bruno to handle permutation of a double precision +C array (15/11/2001) and to handle the changes in ignuin +C +C********************************************************************** + implicit none +C .. Scalar Arguments .. + INTEGER larray +C .. +C .. Array Arguments .. + DOUBLE PRECISION array(larray) +C .. +C .. Local Scalars .. + INTEGER i, iwhich + DOUBLE PRECISION elt, llarray +C .. +C .. External Functions .. + DOUBLE PRECISION ignuin + EXTERNAL ignuin +C .. +C .. Executable Statements .. + llarray = dble(larray) + DO i = 1,larray + iwhich = int(ignuin(dble(i),llarray)) + elt = array(iwhich) + array(iwhich) = array(i) + array(i) = elt + END DO + + END diff --git a/modules/randlib/src/fortran/genprm.lo b/modules/randlib/src/fortran/genprm.lo new file mode 100755 index 000000000..68ef33f53 --- /dev/null +++ b/modules/randlib/src/fortran/genprm.lo @@ -0,0 +1,12 @@ +# src/fortran/genprm.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/genprm.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/genunf.f b/modules/randlib/src/fortran/genunf.f new file mode 100755 index 000000000..698221712 --- /dev/null +++ b/modules/randlib/src/fortran/genunf.f @@ -0,0 +1,37 @@ + DOUBLE PRECISION FUNCTION genunf(low,high) +C********************************************************************** +C +C DOUBLE PRECISION FUNCTION GENUNF( LOW, HIGH ) +C +C GeNerate Uniform DOUBLE PRECISION between LOW and HIGH +C +C +C Function +C +C +C Generates a DOUBLE PRECISION uniformly distributed between LOW and HIGH. +C +C +C Arguments +C +C +C LOW --> Low bound (exclusive) on DOUBLE PRECISION value to be generated +C DOUBLE PRECISION LOW +C +C HIGH --> High bound (exclusive) on DOUBLE PRECISION value to be generated +C DOUBLE PRECISION HIGH +C +C********************************************************************** +C .. Scalar Arguments .. + DOUBLE PRECISION high,low +C .. +C .. External Functions .. + DOUBLE PRECISION ranf + EXTERNAL ranf +C .. +C .. Executable Statements .. + 10 genunf = low + (high-low)*ranf() + + RETURN + + END diff --git a/modules/randlib/src/fortran/genunf.lo b/modules/randlib/src/fortran/genunf.lo new file mode 100755 index 000000000..75a451ebd --- /dev/null +++ b/modules/randlib/src/fortran/genunf.lo @@ -0,0 +1,12 @@ +# src/fortran/genunf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/genunf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/ignnbn.f b/modules/randlib/src/fortran/ignnbn.f new file mode 100755 index 000000000..6720b6f08 --- /dev/null +++ b/modules/randlib/src/fortran/ignnbn.f @@ -0,0 +1,75 @@ + INTEGER FUNCTION ignnbn(n,p) +C********************************************************************** +C +C INTEGER FUNCTION IGNNBN( N, P ) +C +C GENerate Negative BiNomial random deviate +C +C +C Function +C +C +C Generates a single random deviate from a negative binomial +C distribution. +C +C +C Arguments +C +C +C N --> Required number of events. +C INTEGER N +C JJV (N > 0) +C +C P --> The probability of an event during a Bernoulli trial. +C DOUBLE PRECISION P +C JJV (0.0 < P < 1.0) +C +C +C +C Method +C +C +C Algorithm from page 480 of +C +C Devroye, Luc +C +C Non-Uniform Random Variate Generation. Springer-Verlag, +C New York, 1986. +C +C********************************************************************** +C .. +C .. Scalar Arguments .. + DOUBLE PRECISION p + INTEGER n +C .. +C .. Local Scalars .. + DOUBLE PRECISION y,a,r +C .. +C .. External Functions .. +C JJV changed to call SGAMMA directly +C DOUBLE PRECISION gengam + DOUBLE PRECISION sgamma + INTEGER ignpoi +C EXTERNAL gengam,ignpoi + EXTERNAL sgamma,ignpoi +C .. +C .. Intrinsic Functions .. + INTRINSIC real +C .. +C .. Executable Statements .. +C Check Arguments +C JJV changed argumnet checker to abort if N <= 0 +C See Rand,c +C Generate Y, a random gamma (n,(1-p)/p) variable +C JJV Note: the above parametrization is consistent with Devroye, +C JJV but gamma (p/(1-p),n) is the equivalent in our code + 10 r = dble(n) + a = p/ (1.0-p) +C y = gengam(a,r) + y = sgamma(r)/a + +C Generate a random Poisson(y) variable + ignnbn = ignpoi(y) + RETURN + + END diff --git a/modules/randlib/src/fortran/ignnbn.lo b/modules/randlib/src/fortran/ignnbn.lo new file mode 100755 index 000000000..a97832ff2 --- /dev/null +++ b/modules/randlib/src/fortran/ignnbn.lo @@ -0,0 +1,12 @@ +# src/fortran/ignnbn.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/ignnbn.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/linpack_f_Import.def b/modules/randlib/src/fortran/linpack_f_Import.def new file mode 100755 index 000000000..5aed4eaf8 --- /dev/null +++ b/modules/randlib/src/fortran/linpack_f_Import.def @@ -0,0 +1,10 @@ + LIBRARY linpack_f.dll + + +EXPORTS +; +;linpack_f +; +dpofa_ + + diff --git a/modules/randlib/src/fortran/phrtsd.f b/modules/randlib/src/fortran/phrtsd.f new file mode 100755 index 000000000..4ec178a43 --- /dev/null +++ b/modules/randlib/src/fortran/phrtsd.f @@ -0,0 +1,86 @@ + SUBROUTINE phrtsd(phrase,phrasel,seed1,seed2) +C********************************************************************** +C +C SUBROUTINE PHRTSD( PHRASE, SEED1, SEED2 ) +C PHRase To SeeDs +C +C +C Function +C +C +C Uses a phrase (character string) to generate two seeds for the RGN +C random number generator. +C +C +C Arguments +C +C +C PHRASE --> Phrase to be used for random number generation +C CHARACTER*(*) PHRASE +C +C SEED1 <-- First seed for RGN generator +C INTEGER SEED1 +C +C SEED2 <-- Second seed for RGN generator +C INTEGER SEED2 +C +C +C Note +C +C +C Trailing blanks are eliminated before the seeds are generated. +C +C Generated seed values will fall in the range 1..2^30 +C (1..1,073,741,824) +C +C********************************************************************** +C .. Parameters .. + CHARACTER*(*) table + PARAMETER (table='abcdefghijklmnopqrstuvwxyz'// + + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'//'0123456789'// + + '!@#$%^&*()_+[];:''"<>?,./') + INTEGER twop30 + PARAMETER (twop30=1073741824) +C .. +C .. Scalar Arguments .. + INTEGER seed1,seed2 + CHARACTER phrase* (*) + INTEGER phrasel +C .. +C .. Local Scalars .. + INTEGER i,ichr,j,lphr +C .. +C .. Local Arrays .. + INTEGER shift(0:4),values(5) +C .. +C .. Intrinsic Functions .. + INTRINSIC index,mod +C .. +C JJV added Save statement for variable in Data statement +C .. Save statements .. + SAVE shift +C JJV end addition +C .. +C .. Data statements .. + DATA shift/1,64,4096,262144,16777216/ +C .. +C .. Executable Statements .. + seed1 = 1234567890 + seed2 = 123456789 + lphr = phrasel + IF (lphr.LT.1) RETURN + DO 30,i = 1,lphr + ichr = mod(index(table,phrase(i:i)),64) + IF (ichr.EQ.0) ichr = 63 + DO 10,j = 1,5 + values(j) = ichr - j + IF (values(j).LT.1) values(j) = values(j) + 63 + 10 CONTINUE + DO 20,j = 1,5 + seed1 = mod(seed1+shift(j-1)*values(j),twop30) + seed2 = mod(seed2+shift(j-1)*values(6-j),twop30) + 20 CONTINUE + 30 CONTINUE + RETURN + + END diff --git a/modules/randlib/src/fortran/phrtsd.lo b/modules/randlib/src/fortran/phrtsd.lo new file mode 100755 index 000000000..70680e99a --- /dev/null +++ b/modules/randlib/src/fortran/phrtsd.lo @@ -0,0 +1,12 @@ +# src/fortran/phrtsd.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/phrtsd.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/randlib_Import.def b/modules/randlib/src/fortran/randlib_Import.def new file mode 100755 index 000000000..8c743121a --- /dev/null +++ b/modules/randlib/src/fortran/randlib_Import.def @@ -0,0 +1,10 @@ +LIBRARY randlib.dll + + +EXPORTS + sgamma_ + sexpo_ + ignuin_ + ignbin_ + ignpoi_ + ranf_
\ No newline at end of file diff --git a/modules/randlib/src/fortran/randlib_f.rc b/modules/randlib/src/fortran/randlib_f.rc new file mode 100755 index 000000000..f1f950fd6 --- /dev/null +++ b/modules/randlib/src/fortran/randlib_f.rc @@ -0,0 +1,96 @@ +// Microsoft Visual C++ generated resource script. +// + + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +//#include "afxres.h" +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// French (France) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 5,5,2,0 + PRODUCTVERSION 5,5,2,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040c04b0" + BEGIN + VALUE "FileDescription", "randlib_f module" + VALUE "FileVersion", "5, 5, 2, 0" + VALUE "InternalName", "randlib_f module" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "scirandlib_f.dll" + VALUE "ProductName", "randlib_f module" + VALUE "ProductVersion", "5, 5, 2, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x40c, 1200 + END +END + +#endif // French (France) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/modules/randlib/src/fortran/randlib_f.vfproj b/modules/randlib/src/fortran/randlib_f.vfproj new file mode 100755 index 000000000..f6fb3138b --- /dev/null +++ b/modules/randlib/src/fortran/randlib_f.vfproj @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8"?> +<VisualStudioProject ProjectType="typeDynamicLibrary" ProjectCreator="Intel Fortran" Keyword="Dll" Version="11.0" ProjectIdGuid="{BB8D4E6F-F09E-49FC-8BCB-9F496F639F60}"> + <Platforms> + <Platform Name="Win32"/> + <Platform Name="x64"/></Platforms> + <Configurations> + <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)bin\" IntermediateDirectory="$(ProjectDir)$(ConfigurationName)" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.dll;$(TargetPath)" ConfigurationType="typeDynamicLibrary"> + <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="../../../core/includes" PreprocessorDefinitions="WIN32;FORDLL" AlternateParameterSyntax="false" F77RuntimeCompatibility="true" FPS4Libs="false" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreadedDebugDLL"/> + <Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)bin\$(ProjectName).dll" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" ModuleDefinitionFile="randlib_f.def" GenerateDebugInformation="true" SubSystem="subSystemWindows" ImportLibrary="$(SolutionDir)bin\randlib_f.lib" LinkDLL="true" AdditionalDependencies="../../../../bin/blasplus.lib core.lib randlib.lib output_stream.lib linpack_f.lib"/> + <Tool Name="VFResourceCompilerTool"/> + <Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/> + <Tool Name="VFCustomBuildTool"/> + <Tool Name="VFPreLinkEventTool" CommandLine="setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .." Description="Build $(ProjectName).def"/> + <Tool Name="VFPreBuildEventTool" CommandLine="lib /DEF:"$(InputDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)linpack_f.lib" 1>NUL 2>NUL" Description="Build Dependencies"/> + <Tool Name="VFPostBuildEventTool"/> + <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration> + <Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)bin\" IntermediateDirectory="$(ProjectDir)$(ConfigurationName)" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.dll;$(TargetPath)" ConfigurationType="typeDynamicLibrary"> + <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="../../../core/includes" PreprocessorDefinitions="WIN32;FORDLL" AlternateParameterSyntax="false" F77RuntimeCompatibility="true" FPS4Libs="false" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreadedDLL"/> + <Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)bin\$(ProjectName).dll" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" ModuleDefinitionFile="randlib_f.def" SubSystem="subSystemWindows" ImportLibrary="$(SolutionDir)bin\randlib_f.lib" LinkDLL="true" AdditionalDependencies="../../../../bin/blasplus.lib core.lib randlib.lib output_stream.lib linpack_f.lib"/> + <Tool Name="VFResourceCompilerTool"/> + <Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/> + <Tool Name="VFCustomBuildTool"/> + <Tool Name="VFPreLinkEventTool" CommandLine="setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .." Description="Build $(ProjectName).def"/> + <Tool Name="VFPreBuildEventTool" CommandLine="lib /DEF:"$(InputDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:"$(InputDir)linpack_f.lib" 1>NUL 2>NUL" Description="Build Dependencies"/> + <Tool Name="VFPostBuildEventTool"/> + <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration> + <Configuration Name="Debug|x64" OutputDirectory="$(SolutionDir)bin\" IntermediateDirectory="$(ProjectDir)$(ConfigurationName)" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.dll;$(TargetPath)" ConfigurationType="typeDynamicLibrary"> + <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="../../../core/includes" PreprocessorDefinitions="WIN32;FORDLL" AlternateParameterSyntax="false" F77RuntimeCompatibility="true" FPS4Libs="false" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreadedDebugDLL"/> + <Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)bin\$(ProjectName).dll" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" ModuleDefinitionFile="randlib_f.def" GenerateDebugInformation="true" SubSystem="subSystemWindows" ImportLibrary="$(SolutionDir)bin\randlib_f.lib" LinkDLL="true" AdditionalDependencies="../../../../bin/blasplus.lib core.lib randlib.lib output_stream.lib linpack_f.lib"/> + <Tool Name="VFResourceCompilerTool"/> + <Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/> + <Tool Name="VFCustomBuildTool"/> + <Tool Name="VFPreLinkEventTool" CommandLine="setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .." Description="Build $(ProjectName).def"/> + <Tool Name="VFPreBuildEventTool" CommandLine="lib /DEF:"$(InputDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)linpack_f.lib" 1>NUL 2>NUL" Description="Build Dependencies"/> + <Tool Name="VFPostBuildEventTool"/> + <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration> + <Configuration Name="Release|x64" OutputDirectory="$(SolutionDir)bin\" IntermediateDirectory="$(ProjectDir)$(ConfigurationName)" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.dll;$(TargetPath)" ConfigurationType="typeDynamicLibrary"> + <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="../../../core/includes" PreprocessorDefinitions="WIN32;FORDLL" AlternateParameterSyntax="false" F77RuntimeCompatibility="true" FPS4Libs="false" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreadedDLL"/> + <Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)bin\$(ProjectName).dll" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" ModuleDefinitionFile="randlib_f.def" SubSystem="subSystemWindows" ImportLibrary="$(SolutionDir)bin\randlib_f.lib" LinkDLL="true" AdditionalDependencies="../../../../bin/blasplus.lib core.lib randlib.lib output_stream.lib linpack_f.lib"/> + <Tool Name="VFResourceCompilerTool"/> + <Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/> + <Tool Name="VFCustomBuildTool"/> + <Tool Name="VFPreLinkEventTool" CommandLine="setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .." Description="Build $(ProjectName).def"/> + <Tool Name="VFPreBuildEventTool" CommandLine="lib /DEF:"$(InputDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(InputDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:"$(InputDir)linpack_f.lib" 1>NUL 2>NUL" Description="Build Dependencies"/> + <Tool Name="VFPostBuildEventTool"/> + <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration></Configurations> + <Files> + <Filter Name="Header Files" Filter="fi;fd"/> + <Filter Name="Library dependencies"> + <File RelativePath=".\core_import.def"/> + <File RelativePath=".\linpack_f_Import.def"/> + <File RelativePath=".\Output_stream_Import.def"/> + <File RelativePath=".\randlib_Import.def"/></Filter> + <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + <File RelativePath=".\randlib_f.rc"/></Filter> + <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl"> + <File RelativePath=".\genchi.f"/> + <File RelativePath=".\genexp.f"/> + <File RelativePath=".\genf.f"/> + <File RelativePath=".\gengam.f"/> + <File RelativePath=".\genmn.f"/> + <File RelativePath=".\genmul.f"/> + <File RelativePath=".\gennch.f"/> + <File RelativePath=".\gennf.f"/> + <File RelativePath=".\gennor.f"/> + <File RelativePath=".\genprm.f"/> + <File RelativePath=".\genunf.f"/> + <File RelativePath=".\ignnbn.f"/> + <File RelativePath=".\phrtsd.f"/> + <File RelativePath=".\setgmn.f"/> + <File RelativePath=".\snorm.f"/></Filter> + <File RelativePath="..\..\Makefile.am"/> + <File RelativePath="..\..\sci_gateway\randlib_gateway.xml"/></Files> + <Globals/></VisualStudioProject> diff --git a/modules/randlib/src/fortran/randlib_f2c.vcxproj b/modules/randlib/src/fortran/randlib_f2c.vcxproj new file mode 100755 index 000000000..558623f3b --- /dev/null +++ b/modules/randlib/src/fortran/randlib_f2c.vcxproj @@ -0,0 +1,304 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectName>randlib_f</ProjectName> + <ProjectGuid>{BB8D4E6F-F09E-49FC-8BCB-9F496F639F60}</ProjectGuid> + <RootNamespace>randlib_f2c</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + <Import Project="..\..\..\..\Visual-Studio-settings\f2c.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PreBuildEvent> + <Message>Build Dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)linpack_f.lib" 1>NUL 2>NUL</Command> + </PreBuildEvent> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../libs/f2c;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RANDLIB_F2C_EXPORTS;FORDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <PreLinkEvent> + <Message>Build $(ProjectName).def</Message> + <Command>setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .. +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib.lib;output_stream.lib;linpack_f.lib;../../../../bin/libf2c.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <ModuleDefinitionFile>randlib_f.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PreBuildEvent> + <Message>Build Dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)linpack_f.lib" 1>NUL 2>NUL</Command> + </PreBuildEvent> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../libs/f2c;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RANDLIB_F2C_EXPORTS;FORDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <PreLinkEvent> + <Message>Build $(ProjectName).def</Message> + <Command>setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .. +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib.lib;output_stream.lib;linpack_f.lib;../../../../bin/libf2c.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <ModuleDefinitionFile>randlib_f.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PreBuildEvent> + <Message>Build Dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)linpack_f.lib" 1>NUL 2>NUL</Command> + </PreBuildEvent> + <ClCompile> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../../libs/f2c;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RANDLIB_F2C_EXPORTS;FORDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <PreLinkEvent> + <Message>Build $(ProjectName).def</Message> + <Command>setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .. +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib.lib;output_stream.lib;linpack_f.lib;../../../../bin/libf2c.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <ModuleDefinitionFile>randlib_f.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <PreBuildEvent> + <Message>Build Dependencies</Message> + <Command>lib /DEF:"$(ProjectDir)core_import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)core.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)randlib_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)randlib.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)output_stream_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)output_stream.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)linpack_f.lib" 1>NUL 2>NUL</Command> + </PreBuildEvent> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../../libs/f2c;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RANDLIB_F2C_EXPORTS;FORDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <PreLinkEvent> + <Message>Build $(ProjectName).def</Message> + <Command>setlocal EnableDelayedExpansion +cd $(ConfigurationName) +set LIST_OBJ= +for %%f in (*.obj) do set LIST_OBJ=!LIST_OBJ! %%f +"$(SolutionDir)bin\dumpexts" -o $(ProjectName).def $(ProjectName).dll %LIST_OBJ% +copy $(ProjectName).def ..\$(ProjectName).def >nul +del *.def >nul +cd .. +</Command> + </PreLinkEvent> + <Link> + <AdditionalDependencies>core.lib;randlib.lib;output_stream.lib;linpack_f.lib;../../../../bin/libf2c.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <ModuleDefinitionFile>randlib_f.def</ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="genchi.c" /> + <ClCompile Include="genexp.c" /> + <ClCompile Include="genf.c" /> + <ClCompile Include="gengam.c" /> + <ClCompile Include="genmn.c" /> + <ClCompile Include="genmul.c" /> + <ClCompile Include="gennch.c" /> + <ClCompile Include="gennf.c" /> + <ClCompile Include="gennor.c" /> + <ClCompile Include="genprm.c" /> + <ClCompile Include="genunf.c" /> + <ClCompile Include="ignnbn.c" /> + <ClCompile Include="phrtsd.c" /> + <ClCompile Include="setgmn.c" /> + <ClCompile Include="snorm.c" /> + </ItemGroup> + <ItemGroup> + <f2c_rule Include="genchi.f" /> + <f2c_rule Include="genexp.f" /> + <f2c_rule Include="genf.f" /> + <f2c_rule Include="gengam.f" /> + <f2c_rule Include="genmn.f" /> + <f2c_rule Include="genmul.f" /> + <f2c_rule Include="gennch.f" /> + <f2c_rule Include="gennf.f" /> + <f2c_rule Include="gennor.f" /> + <f2c_rule Include="genprm.f" /> + <f2c_rule Include="genunf.f" /> + <f2c_rule Include="ignnbn.f" /> + <f2c_rule Include="phrtsd.f" /> + <f2c_rule Include="setgmn.f" /> + <f2c_rule Include="snorm.f" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\Makefile.am" /> + <None Include="..\..\sci_gateway\randlib_gateway.xml" /> + <None Include="core_import.def" /> + <None Include="linpack_f_Import.def" /> + <None Include="Output_stream_Import.def" /> + <None Include="randlib_Import.def" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj"> + <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + <Import Project="..\..\..\..\Visual-Studio-settings\f2c.targets" /> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/modules/randlib/src/fortran/randlib_f2c.vcxproj.filters b/modules/randlib/src/fortran/randlib_f2c.vcxproj.filters new file mode 100755 index 000000000..63fe12948 --- /dev/null +++ b/modules/randlib/src/fortran/randlib_f2c.vcxproj.filters @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + <Filter Include="Fortran files"> + <UniqueIdentifier>{7e9d3719-3f18-46aa-b279-81572ed0acfc}</UniqueIdentifier> + </Filter> + <Filter Include="Libraries Dependencies"> + <UniqueIdentifier>{ba572d34-bfe7-4584-993a-638724d545ef}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="genchi.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="genexp.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="genf.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="gengam.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="genmn.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="genmul.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="gennch.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="gennf.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="gennor.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="genprm.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="genunf.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ignnbn.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="phrtsd.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="setgmn.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="snorm.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <f2c_rule Include="genchi.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="genexp.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="genf.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="gengam.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="genmn.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="genmul.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="gennch.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="gennf.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="gennor.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="genprm.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="genunf.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="ignnbn.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="phrtsd.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="setgmn.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + <f2c_rule Include="snorm.f"> + <Filter>Fortran files</Filter> + </f2c_rule> + </ItemGroup> + <ItemGroup> + <None Include="..\..\Makefile.am" /> + <None Include="..\..\sci_gateway\randlib_gateway.xml" /> + <None Include="core_import.def"> + <Filter>Libraries Dependencies</Filter> + </None> + <None Include="Output_stream_Import.def"> + <Filter>Libraries Dependencies</Filter> + </None> + <None Include="randlib_Import.def"> + <Filter>Libraries Dependencies</Filter> + </None> + <None Include="linpack_f_Import.def"> + <Filter>Libraries Dependencies</Filter> + </None> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/modules/randlib/src/fortran/setgmn.f b/modules/randlib/src/fortran/setgmn.f new file mode 100755 index 000000000..ab42534c7 --- /dev/null +++ b/modules/randlib/src/fortran/setgmn.f @@ -0,0 +1,103 @@ + SUBROUTINE setgmn(meanv,covm,ldcovm,p,parm,ierr) +C SUBROUTINE setgmn(meanv,covm,p,parm) +C JJV changed this routine to take leading dimension of COVM +C JJV argument and pass it to SPOFA, making it easier to use +C JJV if the COVM which is used is contained in a larger matrix +C JJV and to make the routine more consistent with LINPACK. +C JJV Changes are in comments, declarations, and the call to SPOFA. +C********************************************************************** +C +C SUBROUTINE SETGMN( MEANV, COVM, LDCOVM, P, PARM) +C SET Generate Multivariate Normal random deviate +C +C +C Function +C +C +C Places P, MEANV, and the Cholesky factoriztion of COVM +C in PARM for GENMN. +C +C +C Arguments +C +C +C MEANV --> Mean vector of multivariate normal distribution. +C DOUBLE PRECISION MEANV(P) +C +C COVM <--> (Input) Covariance matrix of the multivariate +C normal distribution. This routine uses only the +C (1:P,1:P) slice of COVM, but needs to know LDCOVM. +C +C (Output) Destroyed on output +C DOUBLE PRECISION COVM(LDCOVM,P) +C +C LDCOVM --> Leading actual dimension of COVM. +C INTEGER LDCOVM +C +C P --> Dimension of the normal, or length of MEANV. +C INTEGER P +C +C PARM <-- Array of parameters needed to generate multivariate +C normal deviates (P, MEANV and Cholesky decomposition +C of COVM). +C 1 : 1 - P +C 2 : P + 1 - MEANV +C P+2 : P*(P+3)/2 + 1 - Cholesky decomposition of COVM +C DOUBLE PRECISION PARM(P*(P+3)/2 + 1) +C +C********************************************************************** +C .. Scalar Arguments .. +C INTEGER p + include 'stack.h' + INTEGER p, ldcovm +C .. +C .. Array Arguments .. +C DOUBLE PRECISION covm(p,p),meanv(p),parm(p* (p+3)/2+1) + DOUBLE PRECISION covm(ldcovm,p),meanv(p),parm(p* (p+3)/2+1) +C .. +C .. Local Scalars .. + INTEGER i,icount,info,j +C .. +C .. External Subroutines .. + EXTERNAL dpofa +C .. +C .. Executable Statements .. +C +C +C TEST THE INPUT +C + 10 parm(1) = p +C +C PUT P AND MEANV INTO PARM +C + DO 20,i = 2,p + 1 + parm(i) = meanv(i-1) + 20 CONTINUE +C +C Cholesky decomposition to find A s.t. trans(A)*(A) = COVM +C +C CALL dpofa(covm,p,p,info) + CALL dpofa(covm,ldcovm,p,info) + ierr=0 + IF (.NOT. (info.NE.0)) GO TO 30 + call basout(io,wte,"Rand: COV not positive definite") + ierr=1 + return + 30 icount = p + 1 +C +C PUT UPPER HALF OF A, WHICH IS NOW THE CHOLESKY FACTOR, INTO PARM +C COVM(1,1) = PARM(P+2) +C COVM(1,2) = PARM(P+3) +C : +C COVM(1,P) = PARM(2P+1) +C COVM(2,2) = PARM(2P+2) ... +C + DO 50,i = 1,p + DO 40,j = i,p + icount = icount + 1 + parm(icount) = covm(i,j) + 40 CONTINUE + 50 CONTINUE + RETURN +C + END diff --git a/modules/randlib/src/fortran/setgmn.lo b/modules/randlib/src/fortran/setgmn.lo new file mode 100755 index 000000000..839a692f5 --- /dev/null +++ b/modules/randlib/src/fortran/setgmn.lo @@ -0,0 +1,12 @@ +# src/fortran/setgmn.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/setgmn.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/fortran/snorm.f b/modules/randlib/src/fortran/snorm.f new file mode 100755 index 000000000..a427d2e4f --- /dev/null +++ b/modules/randlib/src/fortran/snorm.f @@ -0,0 +1,138 @@ + DOUBLE PRECISION FUNCTION snorm() +C**********************************************************************C +C C +C C +C (STANDARD-) N O R M A L DISTRIBUTION C +C C +C C +C**********************************************************************C +C**********************************************************************C +C C +C FOR DETAILS SEE: C +C C +C AHRENS, J.H. AND DIETER, U. C +C EXTENSIONS OF FORSYTHE'S METHOD FOR RANDOM C +C SAMPLING FROM THE NORMAL DISTRIBUTION. C +C MATH. COMPUT., 27,124 (OCT. 1973), 927 - 937. C +C C +C ALL STATEMENT NUMBERS CORRESPOND TO THE STEPS OF ALGORITHM 'FL' C +C (M=5) IN THE ABOVE PAPER (SLIGHTLY MODIFIED IMPLEMENTATION) C +C C +C Modified by Barry W. Brown, Feb 3, 1988 to use RANF instead of C +C SUNIF. The argument IR thus goes away. C +C C +C**********************************************************************C +C +C +C THE DEFINITIONS OF THE CONSTANTS A(K), D(K), T(K) AND +C H(K) ARE ACCORDING TO THE ABOVEMENTIONED ARTICLE +C +C .. Local Scalars .. + DOUBLE PRECISION aa,s,tt,u,ustar,w,y + INTEGER i +C .. +C .. Local Arrays .. + DOUBLE PRECISION a(32),d(31),h(31),t(31) +C .. +C .. External Functions .. + DOUBLE PRECISION ranf + EXTERNAL ranf +C .. +C .. Intrinsic Functions .. + INTRINSIC float,int +C .. +C .. Save statement .. +C JJV added a Save statement for arrays initialized in Data statmts + SAVE a,d,t,h +C .. +C .. Data statements .. + DATA a/0.0,.3917609E-1,.7841241E-1,.1177699,.1573107,.1970991, + + .2372021,.2776904,.3186394,.3601299,.4022501,.4450965, + + .4887764,.5334097,.5791322,.6260990,.6744898,.7245144, + + .7764218,.8305109,.8871466,.9467818,1.009990,1.077516, + + 1.150349,1.229859,1.318011,1.417797,1.534121,1.675940, + + 1.862732,2.153875/ + DATA d/5*0.0,.2636843,.2425085,.2255674,.2116342,.1999243, + + .1899108,.1812252,.1736014,.1668419,.1607967,.1553497, + + .1504094,.1459026,.1417700,.1379632,.1344418,.1311722, + + .1281260,.1252791,.1226109,.1201036,.1177417,.1155119, + + .1134023,.1114027,.1095039/ + DATA t/.7673828E-3,.2306870E-2,.3860618E-2,.5438454E-2, + + .7050699E-2,.8708396E-2,.1042357E-1,.1220953E-1,.1408125E-1, + + .1605579E-1,.1815290E-1,.2039573E-1,.2281177E-1,.2543407E-1, + + .2830296E-1,.3146822E-1,.3499233E-1,.3895483E-1,.4345878E-1, + + .4864035E-1,.5468334E-1,.6184222E-1,.7047983E-1,.8113195E-1, + + .9462444E-1,.1123001,.1364980,.1716886,.2276241,.3304980, + + .5847031/ + DATA h/.3920617E-1,.3932705E-1,.3950999E-1,.3975703E-1, + + .4007093E-1,.4045533E-1,.4091481E-1,.4145507E-1,.4208311E-1, + + .4280748E-1,.4363863E-1,.4458932E-1,.4567523E-1,.4691571E-1, + + .4833487E-1,.4996298E-1,.5183859E-1,.5401138E-1,.5654656E-1, + + .5953130E-1,.6308489E-1,.6737503E-1,.7264544E-1,.7926471E-1, + + .8781922E-1,.9930398E-1,.1155599,.1404344,.1836142,.2790016, + + .7010474/ +C .. +C .. Executable Statements .. +C + 10 u = 1.0- ranf() + s = 0.0 + IF (u.GT.0.5) s = 1.0 + u = u + u - s + 20 u = 32.0*u + i = int(u) + IF (i.EQ.32) i = 31 + IF (i.EQ.0) GO TO 100 +C +C START CENTER +C + 30 ustar = u - float(i) + aa = a(i) + 40 IF (ustar.LE.t(i)) GO TO 60 + w = (ustar-t(i))*h(i) +C +C EXIT (BOTH CASES) +C + 50 y = aa + w + snorm = y + IF (s.EQ.1.0) snorm = -y + RETURN +C +C CENTER CONTINUED +C + 60 u = ranf() + w = u* (a(i+1)-aa) + tt = (0.5*w+aa)*w + GO TO 80 + + 70 tt = u + ustar = ranf() + 80 IF (ustar.GT.tt) GO TO 50 + 90 u = ranf() + IF (ustar.GE.u) GO TO 70 + ustar = ranf() + GO TO 40 +C +C START TAIL +C + 100 i = 6 + aa = a(32) + GO TO 120 + + 110 aa = aa + d(i) + i = i + 1 + 120 u = u + u + IF (u.LT.1.0) GO TO 110 + 130 u = u - 1.0 + 140 w = u*d(i) + tt = (0.5*w+aa)*w + GO TO 160 + + 150 tt = u + 160 ustar = ranf() + IF (ustar.GT.tt) GO TO 50 + 170 u = ranf() + IF (ustar.GE.u) GO TO 150 + u = ranf() + GO TO 140 + + END diff --git a/modules/randlib/src/fortran/snorm.lo b/modules/randlib/src/fortran/snorm.lo new file mode 100755 index 000000000..77ddd6703 --- /dev/null +++ b/modules/randlib/src/fortran/snorm.lo @@ -0,0 +1,12 @@ +# src/fortran/snorm.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/snorm.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/randlib/src/norandlib/norandlib.c b/modules/randlib/src/norandlib/norandlib.c new file mode 100755 index 000000000..55e104040 --- /dev/null +++ b/modules/randlib/src/norandlib/norandlib.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Allan CORNET <allan.cornet@inria.fr> + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#include "gw_randlib.h" +#include "localization.h" +#include "Scierror.h" +/*--------------------------------------------------------------------------*/ +int gw_randlib(void) +{ + Scierror(999, _("Scilab randlib interface not installed.\n")); + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/randlib/src/norandlib/norandlib.rc b/modules/randlib/src/norandlib/norandlib.rc new file mode 100755 index 000000000..3e8f2e5ed --- /dev/null +++ b/modules/randlib/src/norandlib/norandlib.rc @@ -0,0 +1,97 @@ +// Microsoft Visual C++ generated resource script. +// + + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +//#include "afxres.h" +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// French (France) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 5,5,2,0 + PRODUCTVERSION 5,5,2,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040c04b0" + BEGIN + VALUE "FileDescription", "norandlib module" + VALUE "FileVersion", "5, 5, 2, 0" + VALUE "InternalName", "norandlib module" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "norandlib.dll" + VALUE "ProductName", " norandlib" + VALUE "ProductVersion", "5, 5, 2, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x40c, 1200 + END +END + +#endif // French (France) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/modules/randlib/src/norandlib/norandlib.vcxproj b/modules/randlib/src/norandlib/norandlib.vcxproj new file mode 100755 index 000000000..c282353aa --- /dev/null +++ b/modules/randlib/src/norandlib/norandlib.vcxproj @@ -0,0 +1,195 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{E5038304-761D-448C-B358-48CA2883778A}</ProjectGuid> + <RootNamespace>norandlib</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>false</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>false</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + </Midl> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>false</WholeProgramOptimization> + <AdditionalIncludeDirectories>../../../core/includes;../../../output_stream/includes;../../../localization/includes;../../../../libs/intl;../../../api_scilab/includes;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;RANDLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <AdditionalDependencies>../../../../bin/libintl.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile> + <GenerateDebugInformation>false</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary> + <TargetMachine>MachineX64</TargetMachine> + <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="norandlib.c" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="norandlib.rc" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj"> + <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\..\..\localization\src\localization.vcxproj"> + <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj"> + <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/modules/randlib/src/norandlib/norandlib.vcxproj.filters b/modules/randlib/src/norandlib/norandlib.vcxproj.filters new file mode 100755 index 000000000..9f1741838 --- /dev/null +++ b/modules/randlib/src/norandlib/norandlib.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + <Filter Include="Libraries Dependencies"> + <UniqueIdentifier>{09fbfb47-e12a-4000-ba4c-56d41f44f748}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="norandlib.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="norandlib.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/modules/randlib/tests/nonreg_tests/bug_12606.dia.ref b/modules/randlib/tests/nonreg_tests/bug_12606.dia.ref new file mode 100755 index 000000000..d02d4404f --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_12606.dia.ref @@ -0,0 +1,25 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 12606 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12606 +// +// <-- Short Description --> +// overloads names for grand() are not standard: %#_Rand() instead of %#_grand() +// Save warning mode and turn off warnings +status = warning("query"); +warning("off"); +function r=%b_grand(arg) + r="boolean overload for grand is %b_grand() as expected"; +endfunction +assert_checkequal(grand(%t),"boolean overload for grand is %b_grand() as expected"); +// Revert to the previous warning mode +warning(status); diff --git a/modules/randlib/tests/nonreg_tests/bug_12606.tst b/modules/randlib/tests/nonreg_tests/bug_12606.tst new file mode 100755 index 000000000..849c8d293 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_12606.tst @@ -0,0 +1,28 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 12606 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12606 +// +// <-- Short Description --> +// overloads names for grand() are not standard: %#_Rand() instead of %#_grand() + +// Save warning mode and turn off warnings +status = warning("query"); +warning("off"); + +function r=%b_grand(arg) + r="boolean overload for grand is %b_grand() as expected"; +endfunction +assert_checkequal(grand(%t),"boolean overload for grand is %b_grand() as expected"); + +// Revert to the previous warning mode +warning(status); diff --git a/modules/randlib/tests/nonreg_tests/bug_1568.dia.ref b/modules/randlib/tests/nonreg_tests/bug_1568.dia.ref new file mode 100755 index 000000000..6fda586f5 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_1568.dia.ref @@ -0,0 +1,36 @@ +// <-- Non-regression test for bug 1568 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=1568 +// +// <-- Short Description --> +// The random number generator grand() does not always produce the same +// result starting from the same seed, as shown by the following +// transcript of a Scilab session: +// +// $ scilab -nw +// ------------------------------------------- +// scilab-3.1.1 +// +// Copyright (c) 1989-2005 +// Consortium Scilab (INRIA, ENPC) +// ------------------------------------------- +// +// +// Startup execution: +// loading initial environment +// +// -->grand('setsd',12) +// +// -->grand(1,'prm',[1:5]') +// ans = +// ... +// Copyright INRIA +// Scilab Project - Pierre MARECHAL +// Copyright INRIA 2005 +// Date : 21 octobre 2005 +grand('setsd',12); +A = grand(1,'prm',[1:5]'); +grand('setsd',12); +B = grand(1,'prm',[1:5]'); +if or(A<>B) then bugmes();quit;end diff --git a/modules/randlib/tests/nonreg_tests/bug_1568.tst b/modules/randlib/tests/nonreg_tests/bug_1568.tst new file mode 100755 index 000000000..2cdbe0351 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_1568.tst @@ -0,0 +1,41 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2005-2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr> +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- Non-regression test for bug 1568 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=1568 +// +// <-- Short Description --> +// The random number generator grand() does not always produce the same +// result starting from the same seed, as shown by the following +// transcript of a Scilab session: +// +// $ scilab -nw +// ------------------------------------------- +// scilab-3.1.1 +// +// Copyright (c) 1989-2005 +// Consortium Scilab (INRIA, ENPC) +// ------------------------------------------- +// +// +// Startup execution: +// loading initial environment +// +// -->grand('setsd',12) +// +// -->grand(1,'prm',[1:5]') +// ans = +// ... + +grand('setsd',12); +A = grand(1,'prm',[1:5]'); +grand('setsd',12); +B = grand(1,'prm',[1:5]'); + +if or(A<>B) then pause,end diff --git a/modules/randlib/tests/nonreg_tests/bug_2964.dia.ref b/modules/randlib/tests/nonreg_tests/bug_2964.dia.ref new file mode 100755 index 000000000..5ad73091a --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_2964.dia.ref @@ -0,0 +1,18 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2005-2008 - INRIA - Serge Steer +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- Non-regression test for bug 2964 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=2964 +// +// <-- Short Description --> +// the function grand with option 'mul' does not accept probability one as an argument. +y=grand(1,'mul',1,1); +if or(y<>[1;0]) then bugmes();quit;end +y=grand(1,'mul',1,ones(10,1)/10); +if y($)<>0 then bugmes();quit;end +if sum(y)<>1 then bugmes();quit;end diff --git a/modules/randlib/tests/nonreg_tests/bug_2964.tst b/modules/randlib/tests/nonreg_tests/bug_2964.tst new file mode 100755 index 000000000..1c8a0327b --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_2964.tst @@ -0,0 +1,20 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2005-2008 - INRIA - Serge Steer +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- Non-regression test for bug 2964 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=2964 +// +// <-- Short Description --> +// the function grand with option 'mul' does not accept probability one as an argument. +y=grand(1,'mul',1,1); +if or(y<>[1;0]) then pause,end + +y=grand(1,'mul',1,ones(10,1)/10); +if y($)<>0 then pause,end +if sum(y)<>1 then pause,end diff --git a/modules/randlib/tests/nonreg_tests/bug_4839.dia.ref b/modules/randlib/tests/nonreg_tests/bug_4839.dia.ref new file mode 100755 index 000000000..9d59ba4b2 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_4839.dia.ref @@ -0,0 +1,16 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- Non-regression test for bug 4839 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=4839 +// +// <-- Short Description --> +// grand does not perform well with multivariate gaussian +A = [5 3 1;3 5 1; 1 1 5]; +computed = grand(10,'mn',[0 0 0]',A); +assert_checkalmostequal ( size(computed) , [3 10] ); diff --git a/modules/randlib/tests/nonreg_tests/bug_4839.tst b/modules/randlib/tests/nonreg_tests/bug_4839.tst new file mode 100755 index 000000000..fd4722948 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_4839.tst @@ -0,0 +1,20 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- Non-regression test for bug 4839 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=4839 +// +// <-- Short Description --> +// grand does not perform well with multivariate gaussian + + + +A = [5 3 1;3 5 1; 1 1 5]; +computed = grand(10,'mn',[0 0 0]',A); +assert_checkalmostequal ( size(computed) , [3 10] ); + diff --git a/modules/randlib/tests/nonreg_tests/bug_5207.dia.ref b/modules/randlib/tests/nonreg_tests/bug_5207.dia.ref new file mode 100755 index 000000000..fa6f1423a --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_5207.dia.ref @@ -0,0 +1,45 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Antoine ELIAS +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 5207 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=5207 +// +// <-- Short Description --> +// grand did not managed 3-D inputs/outputs +//dimension as input parameters +//init mt generator with seed = 1337 +grand("setsd", 1337); +a = grand(3, 4, 5, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5, "def"); +ref = matrix(ref, [3, 4, 5]); +assert_checkequal(a, ref); +grand("setsd", 1337); +a = grand(3, 4, 5, 6, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5 * 6, "def"); +ref = matrix(ref, [3, 4, 5, 6]); +assert_checkequal(a, ref); +//dimension from size of input parameter +grand("setsd", 1337); +Z = zeros(3,4,5); +a = grand(Z, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5, "def"); +ref = matrix(ref, [3, 4, 5]); +assert_checkequal(a, ref); +grand("setsd", 1337); +Z = zeros(3,4,5,6); +a = grand(Z, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5 * 6, "def"); +ref = matrix(ref, [3, 4, 5, 6]); +assert_checkequal(a, ref); diff --git a/modules/randlib/tests/nonreg_tests/bug_5207.tst b/modules/randlib/tests/nonreg_tests/bug_5207.tst new file mode 100755 index 000000000..ea54c2fef --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_5207.tst @@ -0,0 +1,51 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Antoine ELIAS +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 5207 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=5207 +// +// <-- Short Description --> +// grand did not managed 3-D inputs/outputs + +//dimension as input parameters + +//init mt generator with seed = 1337 +grand("setsd", 1337); +a = grand(3, 4, 5, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5, "def"); +ref = matrix(ref, [3, 4, 5]); +assert_checkequal(a, ref); + +grand("setsd", 1337); +a = grand(3, 4, 5, 6, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5 * 6, "def"); +ref = matrix(ref, [3, 4, 5, 6]); +assert_checkequal(a, ref); + +//dimension from size of input parameter +grand("setsd", 1337); +Z = zeros(3,4,5); +a = grand(Z, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5, "def"); +ref = matrix(ref, [3, 4, 5]); +assert_checkequal(a, ref); + +grand("setsd", 1337); +Z = zeros(3,4,5,6); +a = grand(Z, "def"); +grand("setsd", 1337); +ref = grand(1, 3 * 4 * 5 * 6, "def"); +ref = matrix(ref, [3, 4, 5, 6]); +assert_checkequal(a, ref); + diff --git a/modules/randlib/tests/nonreg_tests/bug_6690.dia.ref b/modules/randlib/tests/nonreg_tests/bug_6690.dia.ref new file mode 100755 index 000000000..b5afacd00 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_6690.dia.ref @@ -0,0 +1,178 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// Set the seed to always get the same random numbers +rand("seed", 0); +grand("setsd", 0); +// +// 1. Permute some column vectors, and check that the output is basically correct. +// +// With Complexes. +// +X = (2:10)'; +P = grand(5,"prm",X*%i); +assert_checkequal ( isreal(P) , %f ); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , X*%i*ones(1,5) ); +// +// With Integers. +// +P = grand(5,"prm",int8(X)); +assert_checkequal ( typeof(P) , "int8" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , int8(X)*ones(1,5) ); +// +P = grand(5,"prm",int16(X)); +assert_checkequal ( typeof(P) , "int16" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , int16(X)*ones(1,5) ); +// +P = grand(5,"prm",int32(X)); +assert_checkequal ( typeof(P) , "int32" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , int32(X)*ones(1,5) ); +// +// With Strings. +// +X = string(X); +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "string" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , ["3" "9" "5" "7" "10" "6" "8" "2" "4"]'); +// +// With Booleans. +// +X = [%f %t %t %t %t %f]'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "boolean" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , [%t %f %t %t %f %t]' ); +// +// With Polynomials. +// +s = poly(0,"s"); +X = [0 s 1+s 1+s^2 s^4]'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "polynomial" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , [1+s^2 1+s s s^4 0]' ); +// +// With Sparses. +// +X = sparse([1 2 3 0 0 0 0 5 6])'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "sparse" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , sparse([0 0 0 3 5 6 2 1 0])' ); +// +// 2. With row vectors / matrices. +// +X = 2:10; +P = grand(1,"prm",X); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +X(2, :) = 12:20; +P = grand(2,"prm",X*%i); +refP = [ +13 9 20 3 10 2 4 5 15 +19 14 6 18 12 16 7 8 17 ]; +refP(:, :, 2) = [ +14 7 8 9 13 10 15 19 4 +12 5 2 17 6 16 18 3 20 ]; +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( P, refP*%i ); +// +// With Integers. +// +X_int = int32(X); +P = grand(2,"prm",X_int); +refP = int32([ +5 17 20 7 15 10 2 13 4 +3 16 8 12 19 9 18 14 6 ]); +refP(:, :, 2) = int32([ +16 13 6 2 20 19 18 14 7 +9 12 3 8 15 17 10 4 5 ]); +assert_checkequal ( size(P) , [size(X_int) 2] ); +assert_checkequal ( P, refP ); +// +// With Strings. +// +X_str = string(X); +P = grand(2,"prm",X_str); +refP = string([ +19 7 14 10 18 17 5 3 4 +9 15 2 20 13 12 6 8 16 ]); +refP(:, :, 2) = string([ +13 20 9 6 8 14 3 4 16 +15 5 19 2 18 12 7 10 17 ]); +assert_checkequal ( size(P) , [size(X_str) 2] ); +assert_checkequal ( P, refP ); +// +// With Hypermatrices. +// +X(:, :, 2) = X+20; +P = grand(2,"prm",X); +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( members(P, 2:40), ones(P) ); +// +// Of Complexes. +// +P = grand(2,"prm",X*%i); +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( members(P, (2:40)*%i), ones(P) ); +// +// Of Integers. +// +P = grand(2,"prm",int16(X)); +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( members(P, int16(2:40)), ones(P) ); +// +// Of Strings. +// +Xs = string(X); +Ps = grand(2,"prm",Xs); +assert_checkequal ( size(Ps) , [size(Xs) 2] ); +assert_checkequal ( members(Ps, string(2:40)), ones(Ps) ); +// +// Of Booleans. +// +Xb = floor(10*rand(2, 9, 2)); +Xb = Xb<5; +Pb = grand(2,"prm",Xb); +refPb = gsort(Pb+0,"g","i"); +assert_checkequal ( size(Pb) , [size(Xb) 2] ); +assert_checkequal ( refPb(1:36), zeros(36, 1) ); +assert_checkequal ( refPb(37:72), ones(36, 1) ); +// +// Of Ploynomials. +// +Xp = matrix(X(:)+s, 2, 9, 2); +Pp = grand(2,"prm",Xp); +refPp = matrix(Pp(:)-s, 2, 9, 2, 2); +refPp = gsort(coeff(refPp(:)),"g","i"); +assert_checkequal ( size(Pp) , [size(Xp) 2] ); +assert_checkequal ( members(2:40, refPp), 2*([ones(1,9) 0 ones(1,9) 0 ones(1,9) 0 ones(1,9)]) ); +// +// Sparse hypermatrices do not exist yet. +// +// +// Bug #6689 +// +X = [%i 1-%i 2+3*%i].'; +P = grand(4, "prm", X); +refP = [ +2+3*%i %i 2+3*%i 1-%i +%i 2+3*%i %i %i +1-%i 1-%i 1-%i 2+3*%i ]; +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , [3 4] ); +assert_checkequal ( P , refP ); +refMsg = msprintf(_("%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n"), "grand"); +assert_checkerror("grand(2, ""prm"", list())", refMsg); diff --git a/modules/randlib/tests/nonreg_tests/bug_6690.tst b/modules/randlib/tests/nonreg_tests/bug_6690.tst new file mode 100755 index 000000000..331fa85b3 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_6690.tst @@ -0,0 +1,182 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// Set the seed to always get the same random numbers +rand("seed", 0); +grand("setsd", 0); + +// +// 1. Permute some column vectors, and check that the output is basically correct. +// +// With Complexes. +// +X = (2:10)'; +P = grand(5,"prm",X*%i); +assert_checkequal ( isreal(P) , %f ); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , X*%i*ones(1,5) ); +// +// With Integers. +// +P = grand(5,"prm",int8(X)); +assert_checkequal ( typeof(P) , "int8" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , int8(X)*ones(1,5) ); +// +P = grand(5,"prm",int16(X)); +assert_checkequal ( typeof(P) , "int16" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , int16(X)*ones(1,5) ); +// +P = grand(5,"prm",int32(X)); +assert_checkequal ( typeof(P) , "int32" ); +assert_checkequal ( size(P) , [9 5] ); +assert_checkequal ( gsort(P,"r","i") , int32(X)*ones(1,5) ); +// +// With Strings. +// +X = string(X); +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "string" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , ["3" "9" "5" "7" "10" "6" "8" "2" "4"]'); +// +// With Booleans. +// +X = [%f %t %t %t %t %f]'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "boolean" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , [%t %f %t %t %f %t]' ); +// +// With Polynomials. +// +s = poly(0,"s"); +X = [0 s 1+s 1+s^2 s^4]'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "polynomial" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , [1+s^2 1+s s s^4 0]' ); +// +// With Sparses. +// +X = sparse([1 2 3 0 0 0 0 5 6])'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "sparse" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( P , sparse([0 0 0 3 5 6 2 1 0])' ); + +// +// 2. With row vectors / matrices. +// +X = 2:10; +P = grand(1,"prm",X); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +X(2, :) = 12:20; +P = grand(2,"prm",X*%i); +refP = [ +13 9 20 3 10 2 4 5 15 +19 14 6 18 12 16 7 8 17 ]; +refP(:, :, 2) = [ +14 7 8 9 13 10 15 19 4 +12 5 2 17 6 16 18 3 20 ]; +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( P, refP*%i ); +// +// With Integers. +// +X_int = int32(X); +P = grand(2,"prm",X_int); +refP = int32([ +5 17 20 7 15 10 2 13 4 +3 16 8 12 19 9 18 14 6 ]); +refP(:, :, 2) = int32([ +16 13 6 2 20 19 18 14 7 +9 12 3 8 15 17 10 4 5 ]); +assert_checkequal ( size(P) , [size(X_int) 2] ); +assert_checkequal ( P, refP ); +// +// With Strings. +// +X_str = string(X); +P = grand(2,"prm",X_str); +refP = string([ +19 7 14 10 18 17 5 3 4 +9 15 2 20 13 12 6 8 16 ]); +refP(:, :, 2) = string([ +13 20 9 6 8 14 3 4 16 +15 5 19 2 18 12 7 10 17 ]); +assert_checkequal ( size(P) , [size(X_str) 2] ); +assert_checkequal ( P, refP ); +// +// With Hypermatrices. +// +X(:, :, 2) = X+20; +P = grand(2,"prm",X); +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( members(P, 2:40), ones(P) ); +// +// Of Complexes. +// +P = grand(2,"prm",X*%i); +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( members(P, (2:40)*%i), ones(P) ); +// +// Of Integers. +// +P = grand(2,"prm",int16(X)); +assert_checkequal ( size(P) , [size(X) 2] ); +assert_checkequal ( members(P, int16(2:40)), ones(P) ); +// +// Of Strings. +// +Xs = string(X); +Ps = grand(2,"prm",Xs); +assert_checkequal ( size(Ps) , [size(Xs) 2] ); +assert_checkequal ( members(Ps, string(2:40)), ones(Ps) ); +// +// Of Booleans. +// +Xb = floor(10*rand(2, 9, 2)); +Xb = Xb<5; +Pb = grand(2,"prm",Xb); +refPb = gsort(Pb+0,"g","i"); +assert_checkequal ( size(Pb) , [size(Xb) 2] ); +assert_checkequal ( refPb(1:36), zeros(36, 1) ); +assert_checkequal ( refPb(37:72), ones(36, 1) ); +// +// Of Ploynomials. +// +Xp = matrix(X(:)+s, 2, 9, 2); +Pp = grand(2,"prm",Xp); +refPp = matrix(Pp(:)-s, 2, 9, 2, 2); +refPp = gsort(coeff(refPp(:)),"g","i"); +assert_checkequal ( size(Pp) , [size(Xp) 2] ); +assert_checkequal ( members(2:40, refPp), 2*([ones(1,9) 0 ones(1,9) 0 ones(1,9) 0 ones(1,9)]) ); +// +// Sparse hypermatrices do not exist yet. +// + +// +// Bug #6689 +// +X = [%i 1-%i 2+3*%i].'; +P = grand(4, "prm", X); +refP = [ +2+3*%i %i 2+3*%i 1-%i +%i 2+3*%i %i %i +1-%i 1-%i 1-%i 2+3*%i ]; +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , [3 4] ); +assert_checkequal ( P , refP ); + +refMsg = msprintf(_("%s: Wrong type for input argument: Matrix (full or sparse) or Hypermatrix of Reals, Complexes, Integers, Booleans, Strings or Polynomials expected.\n"), "grand"); +assert_checkerror("grand(2, ""prm"", list())", refMsg); diff --git a/modules/randlib/tests/nonreg_tests/bug_8597.dia.ref b/modules/randlib/tests/nonreg_tests/bug_8597.dia.ref new file mode 100755 index 000000000..2e5ffa3a2 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_8597.dia.ref @@ -0,0 +1,27 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- ENGLISH IMPOSED --> +// +// <-- Non-regression test for bug 8597 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=8597 +// +// <-- Short Description --> +// Uncontrolled message of grand/clcg4 should be displayed as warning +warning("off"); +grand('setgen',"clcg4"); +grand('setsd',123456,123456,123456,123456); +warning("on"); +grand('setgen',"clcg4"); +grand('setsd',123456,123456,123456,123456); +WARNING: be aware that you may have lost synchronization + between the virtual generator %d and the others. + use grand("setall", s1, s2, s3, s4) if you want to recover it. diff --git a/modules/randlib/tests/nonreg_tests/bug_8597.tst b/modules/randlib/tests/nonreg_tests/bug_8597.tst new file mode 100755 index 000000000..e861fc04e --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_8597.tst @@ -0,0 +1,26 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- ENGLISH IMPOSED --> +// +// <-- Non-regression test for bug 8597 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=8597 +// +// <-- Short Description --> +// Uncontrolled message of grand/clcg4 should be displayed as warning + +warning("off"); +grand('setgen',"clcg4"); +grand('setsd',123456,123456,123456,123456); + +warning("on"); +grand('setgen',"clcg4"); +grand('setsd',123456,123456,123456,123456); diff --git a/modules/randlib/tests/nonreg_tests/bug_9159.dia.ref b/modules/randlib/tests/nonreg_tests/bug_9159.dia.ref new file mode 100755 index 000000000..3f3f36643 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_9159.dia.ref @@ -0,0 +1,18 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - Digiteo - Allan CORNET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 9159 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9159 +// +// <-- Short Description --> +// grand(1,3,'uin',1,0) crashed scilab. +if execstr("grand(1,3,''uin'',1,0)", "errcatch") <> 999 then bugmes();quit;end +if execstr("grand(1,3,''unf'',1,0)", "errcatch") <> 999 then bugmes();quit;end diff --git a/modules/randlib/tests/nonreg_tests/bug_9159.tst b/modules/randlib/tests/nonreg_tests/bug_9159.tst new file mode 100755 index 000000000..870bdee4e --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_9159.tst @@ -0,0 +1,19 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - Digiteo - Allan CORNET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 9159 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9159 +// +// <-- Short Description --> +// grand(1,3,'uin',1,0) crashed scilab. + +if execstr("grand(1,3,''uin'',1,0)", "errcatch") <> 999 then pause, end +if execstr("grand(1,3,''unf'',1,0)", "errcatch") <> 999 then pause, end diff --git a/modules/randlib/tests/nonreg_tests/bug_9584.dia.ref b/modules/randlib/tests/nonreg_tests/bug_9584.dia.ref new file mode 100755 index 000000000..70bb60816 --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_9584.dia.ref @@ -0,0 +1,22 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 9584 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9584 +// +// <-- Short Description --> +// grand returns non-empty matrix for negative size argument +errMsg1 = msprintf(_("%s: Wrong value for input argument #%d: Positive scalar expected.\n"),"grand",1); +errMsg2 = msprintf(_("%s: Wrong value for input argument #%d: Positive scalar expected.\n"),"grand",2); +assert_checkequal(grand(1,0,'def'),[]); +assert_checkerror("grand(-1,1,""def"");", errMsg1); +assert_checkerror("grand(1,-1,""def"");", errMsg2); +assert_checkequal(size(grand(-1,-1,'def')),[-1,-1]); //size(eye())==[-1 -1] diff --git a/modules/randlib/tests/nonreg_tests/bug_9584.tst b/modules/randlib/tests/nonreg_tests/bug_9584.tst new file mode 100755 index 000000000..51477659e --- /dev/null +++ b/modules/randlib/tests/nonreg_tests/bug_9584.tst @@ -0,0 +1,23 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- Non-regression test for bug 9584 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=9584 +// +// <-- Short Description --> +// grand returns non-empty matrix for negative size argument + +errMsg1 = msprintf(_("%s: Wrong value for input argument #%d: Positive scalar expected.\n"),"grand",1); +errMsg2 = msprintf(_("%s: Wrong value for input argument #%d: Positive scalar expected.\n"),"grand",2); +assert_checkequal(grand(1,0,'def'),[]); +assert_checkerror("grand(-1,1,""def"");", errMsg1); +assert_checkerror("grand(1,-1,""def"");", errMsg2); +assert_checkequal(size(grand(-1,-1,'def')),[-1,-1]); //size(eye())==[-1 -1] diff --git a/modules/randlib/tests/unit_tests/grand_clcg4.dia.ref b/modules/randlib/tests/unit_tests/grand_clcg4.dia.ref new file mode 100755 index 000000000..413af850e --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_clcg4.dia.ref @@ -0,0 +1,115 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ????-2008 - INRIA +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +grand('setgen','clcg4'); +// Low level test for grand +//********************************************************************** +// A test program for the bottom level routines +// Scilab implementation of tstbot.f +//********************************************************************** +NB = 10 + NB = + + 10. +NR = 1000 + NR = + + 1000. +answer = ones(NB,NR); +genlst = [1,5,10,20,32] + genlst = + + 1. 5. 10. 20. 32. +nbad = 0; +str = ['For five virtual generators of the 101';.. + ' This test generates'+string(NB)+' numbers then resets the block';.. + ' and does it again';.. + ' Any disagreements are reported -- there should be none']; + +write (%io(2),str); +For five virtual generators of the 101 + This test generates10 numbers then resets the block + and does it again + Any disagreements are reported -- there should be none +// +// Set up Generators +// +grand('setall',12345,54321,6789,9876); +// +// For a selected set of generators +// +for ixgen = 1:5 + igen = genlst(ixgen) + grand('setcgn',igen); + write(%io(2),' Testing generator '+string(igen)); + // + // Use NB blocks + // + grand('initgn',-1); + SD=grand('getsd');iseed1=SD(1);iseed2=SD(2); + for iblock = 1:NB + // Generate NR numbers + answer(iblock,1:NR)= grand(1,NR,'lgi'); + grand('initgn',1); + end + grand('initgn',-1); + // + // Do it again and compare answers + // + SD=grand('getsd');iseed1=SD(1);iseed2=SD(2); + // + // Use NB blocks + // + for iblock = 1:NB + + // Generate NR numbers + itmp = grand(1,NR,'lgi'); + if itmp<>answer(iblock,:) then + str=[' Disagreement on regeneration of numbers';... + ' Block '+string(iblock)+' N within Block ']; + write(%io(2),str); + end + + if itmp<>answer(iblock,:) then bugmes();quit;end + + grand('initgn',1); + + end + + write (%io(2), ' Finished testing generator '+string(igen)); + write (%io(2), ' Test completed successfully'); + +end + igen = + + 1. + Testing generator 1 + Finished testing generator 1 + Test completed successfully + igen = + + 5. + Testing generator 5 + Finished testing generator 5 + Test completed successfully + igen = + + 10. + Testing generator 10 + Finished testing generator 10 + Test completed successfully + igen = + + 20. + Testing generator 20 + Finished testing generator 20 + Test completed successfully + igen = + + 32. + Testing generator 32 + Finished testing generator 32 + Test completed successfully diff --git a/modules/randlib/tests/unit_tests/grand_clcg4.tst b/modules/randlib/tests/unit_tests/grand_clcg4.tst new file mode 100755 index 000000000..c7f3e76e7 --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_clcg4.tst @@ -0,0 +1,80 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) ????-2008 - INRIA +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +grand('setgen','clcg4'); + +// Low level test for grand + +//********************************************************************** +// A test program for the bottom level routines +// Scilab implementation of tstbot.f +//********************************************************************** +NB = 10 +NR = 1000 +answer = ones(NB,NR); +genlst = [1,5,10,20,32] +nbad = 0; + +str = ['For five virtual generators of the 101';.. + ' This test generates'+string(NB)+' numbers then resets the block';.. + ' and does it again';.. + ' Any disagreements are reported -- there should be none']; + +write (%io(2),str); + +// +// Set up Generators +// + +grand('setall',12345,54321,6789,9876); + +// +// For a selected set of generators +// + +for ixgen = 1:5 + igen = genlst(ixgen) + grand('setcgn',igen); + write(%io(2),' Testing generator '+string(igen)); + // + // Use NB blocks + // + grand('initgn',-1); + SD=grand('getsd');iseed1=SD(1);iseed2=SD(2); + for iblock = 1:NB + // Generate NR numbers + answer(iblock,1:NR)= grand(1,NR,'lgi'); + grand('initgn',1); + end + grand('initgn',-1); + // + // Do it again and compare answers + // + SD=grand('getsd');iseed1=SD(1);iseed2=SD(2); + // + // Use NB blocks + // + for iblock = 1:NB + + // Generate NR numbers + itmp = grand(1,NR,'lgi'); + if itmp<>answer(iblock,:) then + str=[' Disagreement on regeneration of numbers';... + ' Block '+string(iblock)+' N within Block ']; + write(%io(2),str); + end + + if itmp<>answer(iblock,:) then pause,end + + grand('initgn',1); + + end + + write (%io(2), ' Finished testing generator '+string(igen)); + write (%io(2), ' Test completed successfully'); + +end diff --git a/modules/randlib/tests/unit_tests/grand_generators.dia.ref b/modules/randlib/tests/unit_tests/grand_generators.dia.ref new file mode 100755 index 000000000..5810b2751 --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_generators.dia.ref @@ -0,0 +1,499 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gaüzere +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +function checkMeanVariance2arg ( m , n , name , A , B , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + R=grand(m,n,name,A,B); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction +function checkMeanVariance0arg ( m , n , name , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + R=grand(m,n,name); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction +function checkLaw0arg ( name , cdffun , N , NC , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + R = grand(1,N,name); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X) + TheoricPDF = diff(CDF); + assert_checktrue ( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkPieceLaw0arg ( name , cdffun , N , NC , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + R=grand(N,1,name); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkPieceLaw2arg ( name , cdffun , N , NC , A , B , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + R=grand(N,1,name,A,B); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X,A,B) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function [x,y] = histcompute(n,data) + // + // Computes the histogram of a data. + // + // Parameters + // n : a 1-by-1 matrix of floating point integers, the number of classes. + // data : a matrix of doubles, the data + // x : 1-by-n+1 matrix of doubles, the classes of the histogram + // y : 1-by-n+1 matrix of doubles, the empirical probability that one value in data which fall in each class + x = linspace(min(data), max(data), n+1); + [ind , y] = dsearch(data, x) + y = y./length(data) +endfunction +function p = mycdfdef (X) + p = X +endfunction +function p = mycdfuin (X,A,B) + p = (floor(X)-A+1)/(B-A+1) +endfunction +function p = mycdflgi (X) + // Here, A and B are read from the environment + p = (floor(X)-A+1)/(B-A+1) +endfunction +// +// These tests makes checks that all uniform generators are correct. +// We run the following actions : 'setgen', 'getgen', 'setsd','getsd' +// We also check the first ten uniform numbers from each generator with a known seed. +// seedsize : size of the state for each generator +// MinInt : minimum of the uniform integer interval for random number generation +// MaxInt : maximum of the uniform integer interval for random number generation +// +NGen = 6; +generators = ["mt" "kiss" "clcg2" "clcg4" "fsultra" "urand"]; +seedsize = [625 4 2 4 40 1]; +MinInt = [0 0 0 0 0 0]; +MaxInt = [2^32-1 2^32-1 2147483561 2^31-2 2^32-1 2^31-1]; +rtol = 1.e-2; +// The number of classes in the histogram +// NC must be even. +NC = 2*12; +N=10000; +// +// The default generator must be Mersenne-Twister +S=grand('getgen'); +assert_checkequal ( S , "mt" ); +// The maximum integer generable with uin option +UinMax = 2147483560; +//////////////////////////////////////////////////////////////////// +// +// "mt" +// +kgen = 1; +gen = "mt"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',0); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.5488135 0.6027634 0.4236548 0.4375872 0.9636628 0.7917250 +0.5928446 0.8579456 0.6235637 0.2975346 0.2726563 0.8121687 +0.7151894 0.5448832 0.6458941 0.891773 0.3834415 0.5288949 +0.8442657 0.8472517 0.3843817 0.0567130 0.4776651 0.4799772 +]; +grand('setsd',0); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 2357136044. 2588848963. 1819583497. 1879422756. 4138900056. 3400433126. + 2546248239. 3684848379. 2678185683. 1277901399. 1171049868. 3488238119. + 3071714933. 2340255427. 2774094101. 3830135878. 1646868794. 2271586391. + 3626093760. 3638918503. 1650906866. 243580376. 2051556033. 2061486254. +]; +grand('setsd',0); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "kiss" +// +kgen = 2; +gen = "kiss"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',0,0,0,0); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456,123456,123456,123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ + 2.874450D-04 9.423555D-01 7.707249D-02 2.078324D-02 4.746445D-01 1.895302D-01 + 8.538282D-01 5.493145D-01 3.200836D-01 4.775516D-01 2.245108D-01 6.637360D-01 + 5.815227D-02 6.006782D-01 8.569004D-01 1.235649D-02 7.357421D-01 5.837571D-01 + 5.196679D-01 2.448867D-01 2.568304D-01 4.503826D-01 9.680347D-01 5.214808D-01 +]; +grand('setsd',0,0,0,0); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 1234567. 4047385867. 331023823. 89263315. 2038582807. 814026139. + 3667164066. 2359287638. 1374748746. 2051068542. 964266482. 2850724518. + 249762113. 2579893349. 3680359369. 53070701. 3159988049. 2507217781. + 2231956628. 1051780200. 1103078268. 1934378448. 4157677412. 2239743032. +]; +grand('setsd',0,0,0,0); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "clcg2" +// +kgen = 3; +gen = "clcg2"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',1,1); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456,123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.9999997 0.0369445 0.2041364 0.9100817 0.6998243 0.9596867 +0.9745196 0.1617119 0.1673069 0.1117162 0.9502824 0.9149753 +0.6474839 0.6646450 0.6549574 0.2990212 0.0918107 0.4411791 +0.3330856 0.0846729 0.1288161 0.2654475 0.9023415 0.0735483 +]; +grand('setsd',1,1); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-5 ); +// +// Check integers +expected = [ + 2147482884. 79337801. 438379562. 1954385533. 1502861091. 2060911403. + 2092764894. 347273588. 359288887. 239908781. 2040715732. 1964894377. + 1390461064. 1427314282. 1406510214. 642143055. 197161966. 947424871. + 715295839. 181833602. 276630551. 570044126. 1937763493. 157943826. +]; +grand('setsd',1,1); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "clcg4" +// +kgen = 4; +gen = "clcg4"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +warning("off"); +grand('setsd',1,1,1,1); +warning("on"); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +warning("off"); +grand('setsd',123456,123456,123456,123456); +warning("on"); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.9999661 0.0552914 0.6345306 0.0640227 0.2885048 0.2781458 +0.6852419 0.1806991 0.8665501 0.0981421 0.2660715 0.4279616 +0.4370514 0.4956021 0.6870544 0.8501209 0.1271038 0.4554926 +0.4202952 0.2903676 0.5712601 0.4764120 0.1818799 0.3121748 +]; +warning("off"); +grand('setsd',1,1,1,1); +warning("on"); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 2147410798. 118737467. 1362644105. 137487708. 619559402. 597313629. + 1471545799. 388048305. 1860902184. 210758531. 571384155. 919040470. + 938560647. 1064297484. 1475437993. 1825620628. 272953383. 978162913. + 902576998. 623559632. 1226771622. 1023086907. 390584072. 670390361. +]; +warning("off"); +grand('setsd',1,1,1,1); +warning("on"); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "fsultra" +// +kgen = 5; +gen = "fsultra"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',1,1); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456,123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.3314877 0.3699260 0.4383216 0.99706 0.0577929 0.4836669 +0.5826624 0.9600475 0.2037475 0.6774254 0.4450278 0.3082941 +0.1630857 0.2033307 0.4214824 0.6372521 0.0782678 0.4409892 +0.7211611 0.1833922 0.8065496 0.6375251 0.2572713 0.8039582 +]; +grand('setsd',1,1); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 1423728774. 1588820113. 1882577034. 4282340079. 248218608. 2077333598. + 2502516061. 4123372468. 875088704. 2909519830. 1911379739. 1324113135. + 700447838. 873298853. 1810253313. 2736976953. 336157762. 1894034123. + 3097363227. 787663378. 3464104206. 2738149622. 1104971606. 3452974260. +]; +grand('setsd',1,1); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "urand" +// +kgen = 6; +gen = "urand"; +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',1); +S=grand('getsd'); +assert_checkequal ( S , 1 ); +// +grand('setsd',123456); +S=grand('getsd'); +assert_checkequal ( S , 123456 ); +// +// Check numbers +expected = [ +0.6040239 0.5321420 0.2276811 0.8979351 0.8925854 0.6928366 +0.0079647 0.4138784 0.6656067 0.8274020 0.0848163 0.6776849 +0.6643966 0.5036204 0.9694369 0.0664231 0.2566682 0.4284010 +0.9832111 0.6850569 0.0775390 0.1099766 0.6507795 0.3725794 +]; +grand('setsd',1); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-5 ); +// +// Check integers +expected = [ + 1297131554. 1142766270. 488941338. 1928300854. 1916812562. 1487855278. + 17103983. 888797147. 1429379591. 1776832243. 182141599. 1455317259. + 1426780792. 1081516660. 2081849904. 142642604. 551190760. 919984100. + 2111429773. 1471148505. 166513637. 236172977. 1397538365. 800108169. +]; +grand('setsd',1); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); diff --git a/modules/randlib/tests/unit_tests/grand_generators.tst b/modules/randlib/tests/unit_tests/grand_generators.tst new file mode 100755 index 000000000..0c73d3bdf --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_generators.tst @@ -0,0 +1,522 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gaüzere +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +function checkMeanVariance2arg ( m , n , name , A , B , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + + R=grand(m,n,name,A,B); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction + +function checkMeanVariance0arg ( m , n , name , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + + R=grand(m,n,name); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction + +function checkLaw0arg ( name , cdffun , N , NC , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + + R = grand(1,N,name); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X) + TheoricPDF = diff(CDF); + assert_checktrue ( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkPieceLaw0arg ( name , cdffun , N , NC , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + + R=grand(N,1,name); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkPieceLaw2arg ( name , cdffun , N , NC , A , B , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + + R=grand(N,1,name,A,B); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X,A,B) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function [x,y] = histcompute(n,data) + // + // Computes the histogram of a data. + // + // Parameters + // n : a 1-by-1 matrix of floating point integers, the number of classes. + // data : a matrix of doubles, the data + // x : 1-by-n+1 matrix of doubles, the classes of the histogram + // y : 1-by-n+1 matrix of doubles, the empirical probability that one value in data which fall in each class + x = linspace(min(data), max(data), n+1); + [ind , y] = dsearch(data, x) + y = y./length(data) +endfunction + +function p = mycdfdef (X) + p = X +endfunction + +function p = mycdfuin (X,A,B) + p = (floor(X)-A+1)/(B-A+1) +endfunction + +function p = mycdflgi (X) + // Here, A and B are read from the environment + p = (floor(X)-A+1)/(B-A+1) +endfunction + + +// +// These tests makes checks that all uniform generators are correct. +// We run the following actions : 'setgen', 'getgen', 'setsd','getsd' +// We also check the first ten uniform numbers from each generator with a known seed. +// seedsize : size of the state for each generator +// MinInt : minimum of the uniform integer interval for random number generation +// MaxInt : maximum of the uniform integer interval for random number generation +// +NGen = 6; +generators = ["mt" "kiss" "clcg2" "clcg4" "fsultra" "urand"]; +seedsize = [625 4 2 4 40 1]; +MinInt = [0 0 0 0 0 0]; +MaxInt = [2^32-1 2^32-1 2147483561 2^31-2 2^32-1 2^31-1]; + +rtol = 1.e-2; + +// The number of classes in the histogram +// NC must be even. +NC = 2*12; +N=10000; + +// +// The default generator must be Mersenne-Twister +S=grand('getgen'); +assert_checkequal ( S , "mt" ); + +// The maximum integer generable with uin option +UinMax = 2147483560; + +//////////////////////////////////////////////////////////////////// +// +// "mt" +// +kgen = 1; +gen = "mt"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',0); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.5488135 0.6027634 0.4236548 0.4375872 0.9636628 0.7917250 +0.5928446 0.8579456 0.6235637 0.2975346 0.2726563 0.8121687 +0.7151894 0.5448832 0.6458941 0.891773 0.3834415 0.5288949 +0.8442657 0.8472517 0.3843817 0.0567130 0.4776651 0.4799772 +]; +grand('setsd',0); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 2357136044. 2588848963. 1819583497. 1879422756. 4138900056. 3400433126. + 2546248239. 3684848379. 2678185683. 1277901399. 1171049868. 3488238119. + 3071714933. 2340255427. 2774094101. 3830135878. 1646868794. 2271586391. + 3626093760. 3638918503. 1650906866. 243580376. 2051556033. 2061486254. +]; +grand('setsd',0); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); + +//////////////////////////////////////////////////////////////////// +// +// "kiss" +// +kgen = 2; +gen = "kiss"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',0,0,0,0); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456,123456,123456,123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ + 2.874450D-04 9.423555D-01 7.707249D-02 2.078324D-02 4.746445D-01 1.895302D-01 + 8.538282D-01 5.493145D-01 3.200836D-01 4.775516D-01 2.245108D-01 6.637360D-01 + 5.815227D-02 6.006782D-01 8.569004D-01 1.235649D-02 7.357421D-01 5.837571D-01 + 5.196679D-01 2.448867D-01 2.568304D-01 4.503826D-01 9.680347D-01 5.214808D-01 +]; +grand('setsd',0,0,0,0); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 1234567. 4047385867. 331023823. 89263315. 2038582807. 814026139. + 3667164066. 2359287638. 1374748746. 2051068542. 964266482. 2850724518. + 249762113. 2579893349. 3680359369. 53070701. 3159988049. 2507217781. + 2231956628. 1051780200. 1103078268. 1934378448. 4157677412. 2239743032. +]; +grand('setsd',0,0,0,0); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "clcg2" +// +kgen = 3; +gen = "clcg2"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',1,1); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456,123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.9999997 0.0369445 0.2041364 0.9100817 0.6998243 0.9596867 +0.9745196 0.1617119 0.1673069 0.1117162 0.9502824 0.9149753 +0.6474839 0.6646450 0.6549574 0.2990212 0.0918107 0.4411791 +0.3330856 0.0846729 0.1288161 0.2654475 0.9023415 0.0735483 +]; +grand('setsd',1,1); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-5 ); +// +// Check integers +expected = [ + 2147482884. 79337801. 438379562. 1954385533. 1502861091. 2060911403. + 2092764894. 347273588. 359288887. 239908781. 2040715732. 1964894377. + 1390461064. 1427314282. 1406510214. 642143055. 197161966. 947424871. + 715295839. 181833602. 276630551. 570044126. 1937763493. 157943826. +]; +grand('setsd',1,1); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "clcg4" +// +kgen = 4; +gen = "clcg4"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +warning("off"); +grand('setsd',1,1,1,1); +warning("on"); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +warning("off"); +grand('setsd',123456,123456,123456,123456); +warning("on"); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.9999661 0.0552914 0.6345306 0.0640227 0.2885048 0.2781458 +0.6852419 0.1806991 0.8665501 0.0981421 0.2660715 0.4279616 +0.4370514 0.4956021 0.6870544 0.8501209 0.1271038 0.4554926 +0.4202952 0.2903676 0.5712601 0.4764120 0.1818799 0.3121748 +]; +warning("off"); +grand('setsd',1,1,1,1); +warning("on"); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 2147410798. 118737467. 1362644105. 137487708. 619559402. 597313629. + 1471545799. 388048305. 1860902184. 210758531. 571384155. 919040470. + 938560647. 1064297484. 1475437993. 1825620628. 272953383. 978162913. + 902576998. 623559632. 1226771622. 1023086907. 390584072. 670390361. +]; +warning("off"); +grand('setsd',1,1,1,1); +warning("on"); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "fsultra" +// +kgen = 5; +gen = "fsultra"; +sdsize = seedsize(kgen); +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',1,1); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +grand('setsd',123456,123456); +S=grand('getsd'); +assert_checkequal ( typeof(S) , "constant" ); +assert_checkequal ( size(S) , [sdsize 1] ); +// +// Check numbers +expected = [ +0.3314877 0.3699260 0.4383216 0.99706 0.0577929 0.4836669 +0.5826624 0.9600475 0.2037475 0.6774254 0.4450278 0.3082941 +0.1630857 0.2033307 0.4214824 0.6372521 0.0782678 0.4409892 +0.7211611 0.1833922 0.8065496 0.6375251 0.2572713 0.8039582 +]; +grand('setsd',1,1); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-6 ); +// +// Check integers +expected = [ + 1423728774. 1588820113. 1882577034. 4282340079. 248218608. 2077333598. + 2502516061. 4123372468. 875088704. 2909519830. 1911379739. 1324113135. + 700447838. 873298853. 1810253313. 2736976953. 336157762. 1894034123. + 3097363227. 787663378. 3464104206. 2738149622. 1104971606. 3452974260. +]; +grand('setsd',1,1); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); +//////////////////////////////////////////////////////////////////// +// +// "urand" +// +kgen = 6; +gen = "urand"; +grand('setgen',gen); +S=grand('getgen'); +assert_checkequal ( S , gen ); +// +grand('setsd',1); +S=grand('getsd'); +assert_checkequal ( S , 1 ); +// +grand('setsd',123456); +S=grand('getsd'); +assert_checkequal ( S , 123456 ); +// +// Check numbers +expected = [ +0.6040239 0.5321420 0.2276811 0.8979351 0.8925854 0.6928366 +0.0079647 0.4138784 0.6656067 0.8274020 0.0848163 0.6776849 +0.6643966 0.5036204 0.9694369 0.0664231 0.2566682 0.4284010 +0.9832111 0.6850569 0.0775390 0.1099766 0.6507795 0.3725794 +]; +grand('setsd',1); +computed = grand(4,6,"def"); +assert_checkalmostequal ( computed , expected, 1.e-5 ); +// +// Check integers +expected = [ + 1297131554. 1142766270. 488941338. 1928300854. 1916812562. 1487855278. + 17103983. 888797147. 1429379591. 1776832243. 182141599. 1455317259. + 1426780792. 1081516660. 2081849904. 142642604. 551190760. 919984100. + 2111429773. 1471148505. 166513637. 236172977. 1397538365. 800108169. +]; +grand('setsd',1); +computed = grand(4,6,"lgi"); +assert_checkequal ( computed , expected ); +// +// Check distribution of uniform numbers in [0,1[ +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); +// +// Check distribution of uniform integers in [A,B] +A = MinInt(kgen); +B = MaxInt(kgen); +checkMeanVariance0arg ( 400 , 800 , "lgi" , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , 0 , UinMax , rtol ); +checkPieceLaw0arg ( "lgi" , mycdflgi , N , NC , rtol ); + diff --git a/modules/randlib/tests/unit_tests/grand_hypermat.dia.ref b/modules/randlib/tests/unit_tests/grand_hypermat.dia.ref new file mode 100755 index 000000000..2995e1005 --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_hypermat.dia.ref @@ -0,0 +1,98 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> +// Run with test_run('randlib', 'grand_hypermat', ['no_check_error_output']) +/////////////////////////////////////////////////////////////////////////////// +// +// Dimensions +mat = grand(100, 101, 102, 'unf', 0, 1); +assert_checktrue(size(mat) == [100 101 102]); +/////////////////////////////////////////////////////////////////////////////// +// +// Generators +// The grand(i, j, ...) should be equal to the first element of grand(i, j, k, ...). +// mt generator +grand('setgen', 'mt'); +grand('setsd', 0); +expected = grand(4, 6, 'def'); +grand('setsd', 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 0); +expected = grand(4, 6, 'lgi'); +grand('setsd', 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); +// kiss generator +grand('setgen', 'kiss'); +grand('setsd', 0, 0, 0, 0); +expected = grand(4, 6, 'def'); +grand('setsd', 0, 0, 0, 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 0, 0, 0, 0); +expected = grand(4, 6, 'lgi'); +grand('setsd', 0, 0, 0, 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); +// clcg2 generator +grand('setgen', 'clcg2'); +grand('setsd', 1, 1); +expected = grand(4, 6, 'def'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 1, 1); +expected = grand(4, 6, 'lgi'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); +// clcg4 generator +grand('setgen', 'clcg4'); +warning('off'); +grand('setsd',1,1,1,1); +warning('on'); +expected = grand(4, 6, 'def'); +warning('off'); +grand('setsd',1,1,1,1); // Resetting the seed to obtain the same results +warning('on'); +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +warning('off'); +grand('setsd',1,1,1,1); // Resetting the seed to obtain the same results +warning('on'); +expected = grand(4, 6, 'lgi'); +warning('off'); +grand('setsd',1,1,1,1); // Resetting the seed to obtain the same results +warning('on'); +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); +// fsultra generator +grand('setgen', 'fsultra'); +grand('setsd', 1, 1); +expected = grand(4, 6, 'def'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 1, 1); +expected = grand(4, 6, 'lgi'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); +// urand generator +grand('setgen', 'urand'); +grand('setsd', 1); +expected = grand(4, 6, 'def'); +grand('setsd', 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 1); +expected = grand(4, 6, 'lgi'); +grand('setsd', 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); diff --git a/modules/randlib/tests/unit_tests/grand_hypermat.tst b/modules/randlib/tests/unit_tests/grand_hypermat.tst new file mode 100755 index 000000000..08702c6a3 --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_hypermat.tst @@ -0,0 +1,109 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- CLI SHELL MODE --> +// <-- ENGLISH IMPOSED --> + +// Run with test_run('randlib', 'grand_hypermat', ['no_check_error_output']) + + +/////////////////////////////////////////////////////////////////////////////// +// +// Dimensions +mat = grand(100, 101, 102, 'unf', 0, 1); +assert_checktrue(size(mat) == [100 101 102]); + +/////////////////////////////////////////////////////////////////////////////// +// +// Generators +// The grand(i, j, ...) should be equal to the first element of grand(i, j, k, ...). + +// mt generator +grand('setgen', 'mt'); +grand('setsd', 0); +expected = grand(4, 6, 'def'); +grand('setsd', 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 0); +expected = grand(4, 6, 'lgi'); +grand('setsd', 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); + +// kiss generator +grand('setgen', 'kiss'); +grand('setsd', 0, 0, 0, 0); +expected = grand(4, 6, 'def'); +grand('setsd', 0, 0, 0, 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 0, 0, 0, 0); +expected = grand(4, 6, 'lgi'); +grand('setsd', 0, 0, 0, 0); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); + +// clcg2 generator +grand('setgen', 'clcg2'); +grand('setsd', 1, 1); +expected = grand(4, 6, 'def'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 1, 1); +expected = grand(4, 6, 'lgi'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); + +// clcg4 generator +grand('setgen', 'clcg4'); +warning('off'); +grand('setsd',1,1,1,1); +warning('on'); +expected = grand(4, 6, 'def'); +warning('off'); +grand('setsd',1,1,1,1); // Resetting the seed to obtain the same results +warning('on'); +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +warning('off'); +grand('setsd',1,1,1,1); // Resetting the seed to obtain the same results +warning('on'); +expected = grand(4, 6, 'lgi'); +warning('off'); +grand('setsd',1,1,1,1); // Resetting the seed to obtain the same results +warning('on'); +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); + +// fsultra generator +grand('setgen', 'fsultra'); +grand('setsd', 1, 1); +expected = grand(4, 6, 'def'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 1, 1); +expected = grand(4, 6, 'lgi'); +grand('setsd', 1, 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); + +// urand generator +grand('setgen', 'urand'); +grand('setsd', 1); +expected = grand(4, 6, 'def'); +grand('setsd', 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'def'); +assert_checkequal(expected, computed(:, :, 1)); +grand('setsd', 1); +expected = grand(4, 6, 'lgi'); +grand('setsd', 1); // Resetting the seed to obtain the same results +computed = grand(4, 6, 5, 'lgi'); +assert_checkequal(expected, computed(:, :, 1)); diff --git a/modules/randlib/tests/unit_tests/grand_laws.dia.ref b/modules/randlib/tests/unit_tests/grand_laws.dia.ref new file mode 100755 index 000000000..bbbf1562c --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_laws.dia.ref @@ -0,0 +1,594 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gaüzere +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +function [x,y] = histcompute(n,data) + // + // Computes the histogram of a data. + // + // Parameters + // n : a 1-by-1 matrix of floating point integers, the number of classes. + // data : a matrix of doubles, the data + // x : 1-by-n+1 matrix of doubles, the classes of the histogram + // y : 1-by-n+1 matrix of doubles, the empirical probability that one value in data which fall in each class + x = linspace(min(data), max(data), n+1); + [ind , y] = dsearch(data, x) + y = y./length(data) +endfunction +function checkLaw0arg ( name , cdffun , N , NC , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + R = grand(1,N,name); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkLaw1arg ( name , cdffun , N , NC , A , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + R = grand(1,N,name,A); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X,A) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkLaw2arg ( name , cdffun , N , NC , A , B , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + R = grand(1,N,name,A,B); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X,A,B) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkLaw3arg ( name , cdffun , N , NC , A , B , C , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // C : a 1-by-1 matrix of doubles, the value of the 3d parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + R = grand(1,N,name,A,B,C); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X,A,B,C) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkPieceLaw1arg ( name , cdffun , N , NC , A , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + R=grand(N,1,name,A); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X,A) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkPieceLaw2arg ( name , cdffun , N , NC , A , B , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + R=grand(N,1,name,A,B); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X,A,B) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction +function checkMeanVariance0arg ( m , n , name , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + R=grand(m,n,name); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction +function checkMeanVariance1arg ( m , n , name , A , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + R=grand(m,n,name,A); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction +function checkMeanVariance2arg ( m , n , name , A , B , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + R=grand(m,n,name,A,B); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction +function checkMeanVariance3arg ( m , n , name , A , B , C , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // C : a 1-by-1 matrix of doubles, the value of the 3d parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + R=grand(m,n,name,A,B,C); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction +// +// Calling sequences +// +// Y=grand(m,n,'nor',Av,Sd) : OK +// Y=grand(m,n,'poi',mu) : OK +// Y=grand(m,n,'exp',Av) : OK +// Y=grand(m,n,'bet',A,B) : OK +// Y=grand(m,n,'bin',N,p) : OK +// Y=grand(m,n,'gam',shape,scale) : OK +// Y=grand(m,n,'f',Dfn,Dfd) : OK +// Y=grand(m,n,'chi', Df) : OK +// Y=grand(m,n,'nbn',N,p) : OK +// Y=grand(m,n,'nch',Df,Xnon) : OK +// Y=grand(m,n,'nf',Dfn,Dfd,Xnon) : OK +// Y=grand(n,'mn',Mean,Cov) : OK +// Y=grand(m,n,'geom', p) : OK +// Y=grand(m,n,'def') : OK +// Y=grand(m,n,'unf',Low,High) : OK +// Y=grand(m,n,'uin',Low,High) : OK +// Y=grand(n,'markov',P,x0) : TODO +// Y=grand(n,'mul',nb,P) : TODO +// Y=grand(n,'prm',vect) : in grand_prm.tst +// Y=grand(m,n,'lgi') : in grand_generators.tst +// S=grand('getgen') : in grand_generators.tst +// grand('setgen',gen) : in grand_generators.tst +// S=grand('getsd') : in grand_generators.tst +// grand('setsd',S) : in grand_generators.tst +// For CLCG4 only: +// grand('setcgn',G) : in grand_clcg4.tst +// S=grand('getcgn') : TODO +// grand('initgn',I) : in grand_clcg4.tst +// grand('setall',s1,s2,s3,s4) : in grand_clcg4.tst +// grand('advnst',K) : TODO +// +// Rationale for the unit tests of random number generators. +// +// There are several ways to check the output of random number generators. +// +// 1. Uniform random number generators are based on deterministic integer sequences. +// These integers are then scaled into the [0,1[ interval. +// When we set the seed to a constant (e.g. seed = 0, or seed=123456), +// the doubles which are produced are always the same. +// This does not check the quality of the generator. +// But it does check that the generator under evaluation is, indeed, the +// expected generator. +// +// 2. Non-uniform random numbers have a given mean and a variance which +// can be predicted by there associated distribution function. +// The problem is there to set the relative tolerance. +// The convergence of the sample mean to the expectation is driven by the +// law of large numbers. +// The standard deviation of the sample mean is sigma/sqrt(n), +// meaning that to reduce the shift by a factor 2, we have to use 4x more points. +// +// 3. The quality of a random number generator can be assessed by +// statistical tests. +// The Kolmogorov-Smirnov test is based on the comparison between the +// empirical CDF and the theoretical CDF. The difference between the two is +// a random variable, which must evolve according to the Normal distribution function. +// Then, the sum of the squares of the differences should evolve according to the +// Chi-square distribution function. By inverting this last distribution, we can +// compute the probability that the empirical distribution matches the theoretical distribution. +// +// 4. The empirical histogram must match the theoretical histogram. +// The number of classes is NC. +// The classes XC are computed from NC and the actual output ; X has NC+1 entries. +// The empirical histogram is the probability that X is the intervals defined by X. +// The theoretical histogram is computed by differences +// of the cumulated probability distribution function. +// The histograms can be graphically compared with the statements: +// plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram +// plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram +// +// +// In this script, we check the non-uniform random numbers. +// We use the strategies #2 and #4. +// The strategy #3 should be used in a future version of the tests (it requires to +// develop the kstest function). +// +rtol = 1.e-2; +// The number of classes in the histogram +// NC must be even. +NC = 2*12; +N=10000; +// Set the seed to always get the same random numbers +grand("setsd",0); +///////////////////////////////////////////////////////////// +// +// 'exp' +// +function p = mycdfexp(X,A) + p = 1 - exp(-(1/A)*X); +endfunction +A = 20; +checkMeanVariance1arg ( 400 , 800 , 'exp' , A , A , A^2 , 2*rtol ); +// +for A = linspace(0.1,50,10) + checkLaw1arg ( "exp" , mycdfexp , N , NC , A , 2*rtol ); +end +///////////////////////////////////////////////////////////// +// +// 'gam' +// +function p = mycdfgam (X,A,B) + p = cdfgam("PQ",X,A*ones(X),B*ones(X)); +endfunction +A = 5; +B = 3; +checkMeanVariance2arg ( 400 , 800 , 'gam' , A , B , A/B , A/(B^2) , rtol ); +// +for A = linspace(1,15,4) + for B = linspace(1,15,4) + checkLaw2arg ( 'gam' , mycdfgam , N , NC , A , B , rtol ); + end +end +///////////////////////////////////////////////////////////// +// +// 'bet' +// +function p = mycdfbet (X,A,B) + p = cdfbet("PQ",X,1-X,A*ones(X),B*ones(X)); +endfunction +A=3; +B=10; +checkMeanVariance2arg ( 400 , 800 , 'bet' , A , B , A/(A+B) , (A*B)/((A+B)^2*(A+B+1)) , rtol ); +// +for A = linspace(1,20,4) + for B = linspace(1,20,4) + checkLaw2arg ( 'bet' , mycdfbet , N , NC , A , B , 2*rtol ); + end +end +///////////////////////////////////////////////////////////// +// +// 'poi' +// +// Caution : this is a piecewise distribution +function p = mycdfpoi (X,A) + p = cdfpoi("PQ",X,A*ones(X)); +endfunction +A = 10; +checkMeanVariance1arg ( 400 , 800 , 'poi' , A , A , A , rtol ); +// +for A = floor(linspace(50,70,10)) + checkPieceLaw1arg ( 'poi' , mycdfpoi , N , NC , A , rtol ); +end +///////////////////////////////////////////////////////////// +// +// 'bin' +// +// Caution : this is a piecewise distribution +function p = mycdfbin (X,A,B) + p = cdfbin("PQ",X,A*ones(X),B*ones(X),(1-B)*ones(X)); +endfunction +A = 10; +B = 0.4; +checkMeanVariance2arg ( 400 , 800 , 'bin' , A , B , A*B , A*B*(1-B) , rtol ); +// +for A = floor(linspace(10,50,4)) +for B = linspace(0.1,0.9,4) + checkPieceLaw2arg ( 'bin' , mycdfbin , N , NC , A , B , 2*rtol ); +end +end +///////////////////////////////////////////////////////////// +// +// 'nor' +// +function p = mycdfnor (X,A,B) + p = cdfnor("PQ",X,A*ones(X),B*ones(X)); +endfunction +A = 7; +B = 12; +checkMeanVariance2arg ( 400 , 800 , 'nor' , A , B , A , B^2 , rtol ); +// +// +for A = linspace(1,20,4) + for B = linspace(1,20,4) + checkLaw2arg ( 'nor' , mycdfnor , N , NC , A , B , rtol ); + end +end +///////////////////////////////////////////////////////////// +// +// 'f' +// +function p = mycdff (X,A,B) + p = cdff("PQ",X,A*ones(X),B*ones(X)); +endfunction +// +// Increase the tolerance for this test. +A = 7; +B = 12; +checkMeanVariance2arg ( 400 , 800 , 'f' , A , B , B/(B-2) , (2*B^2*(A+B-2))/(A*(B-2)^2*(B-4)) , 4*rtol ); +// +for A = floor(linspace(1,20,4)) + for B = floor(linspace(5,20,4)) + checkLaw2arg ( 'f' , mycdff , N , NC , A , B , 2*rtol ); + end +end +///////////////////////////////////////////////////////////// +// +// 'chi' +// +function p = mycdfchi (X,A) + p = cdfchi("PQ",X,A*ones(X)); +endfunction +A = 7; +checkMeanVariance1arg ( 400 , 800 , 'chi' , A , A , 2*A , rtol ); +// Increase the tolerance for this test. +for A = floor(linspace(1,20,10)) + checkLaw1arg ( 'chi' , mycdfchi , N , NC , A , 2*rtol ); +end +///////////////////////////////////////////////////////////// +// +// 'nbn' +// +// This is a piecewise function. +function p = mycdfnbn (X,A,B) + p = cdfnbn("PQ",X,A*ones(X),B*ones(X),(1-B)*ones(X)); +endfunction +A = 7; +B = 0.1; +checkMeanVariance2arg ( 400 , 800 , 'nbn' , A , B , A*(1-B)/B , A*(1-B)/B^2 , rtol ); +// Increase the tolerance for this test. +for A = floor(linspace(1,20,4)) +for B = linspace(0.1,0.9,4) + checkPieceLaw2arg ( 'nbn' , mycdfnbn , N , NC , A , B , 2*rtol ); +end +end +///////////////////////////////////////////////////////////// +// +// 'nch' +// +function p = mycdfnch (X,A,B) + p = cdfchn("PQ",X,A*ones(X),B*ones(X)); +endfunction +A = 4; +B = 3; +checkMeanVariance2arg ( 400 , 800 , 'nch' , A , B , A+B , 2*(A+2*B) , rtol ); +for A = floor(linspace(1,20,4)) +for B = floor(linspace(1,20,4)) + checkLaw2arg ( 'nch' , mycdfnch , N , NC , A , B , 2*rtol ); +end +end +///////////////////////////////////////////////////////////// +// +// 'nf' +// http://mathworld.wolfram.com/NoncentralF-Distribution.html +// +function p = mycdfnf (X,A,B,C) + p = cdffnc("PQ",X,A*ones(X),B*ones(X),C*ones(X)); +endfunction +A = 4; +B = 3; +C = 10; +checkMeanVariance3arg ( 400 , 800 , 'nf' , A , B , C , ((C+A)*B)/(A*(B-2)) , [] , 4*rtol ); +for A = floor(linspace(1,20,4)) +for B = floor(linspace(1,20,4)) +for C = floor(linspace(1,20,4)) + checkLaw3arg ( 'nf' , mycdfnf , N , NC , A , B , C , 2*rtol ); +end +end +end +///////////////////////////////////////////////////////////// +// +// "mn" +// +n = 2^16; +A = [1;2;3]; +// The covariance matrix B is symetric, positive definite. +// Its diagonal entries are [4;6;5], the variances. +B = [4,2,3;2,6,4;3,4,5]; + R=grand(n,"mn",A,B); + assert_checkequal ( size(R) , [3,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R,"c") , A , 2*rtol ); + assert_checkalmostequal ( variance(R,"c") , [4;6;5] , rtol ); +// +// No CDF for this function => no histogram test. +///////////////////////////////////////////////////////////// +// +// "geom" +// http://en.wikipedia.org/wiki/Geometric_distribution +// +A = 0.1; +checkMeanVariance1arg ( 400 , 800 , "geom" , A , 1/A , (1-A)/A^2 , rtol ); +function p = mycdfgeom (X,A) + p = 1 -(1-A)^X +endfunction +// +for A = linspace(0.1,0.9,10) + checkPieceLaw1arg ( "geom" , mycdfgeom , N , NC , A , 2*rtol ); +end +///////////////////////////////////////////////////////////// +// +// "unf" +// http://en.wikipedia.org/wiki/Uniform_distribution_(continuous) +// +A = 0.1; +B = 2.3; +checkMeanVariance2arg ( 400 , 800 , "unf" , A , B , (A+B)/2 , (B-A)^2/12 , rtol ); +function p = mycdfunf (X,A,B) + p = (X-A)/(B-A) +endfunction +// +for A = linspace(0.1,0.9,4) +for B = linspace(2.5,4.2,4) + checkLaw2arg ( "unf" , mycdfunf , N , NC , A , B , rtol ); +end +end +///////////////////////////////////////////////////////////// +// +// "uin" +// http://en.wikipedia.org/wiki/Uniform_distribution_(discrete) +// +// Piecewise. +A = 10; +B = 20; +checkMeanVariance2arg ( 400 , 800 , "uin" , A , B , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); +function p = mycdfuin (X,A,B) + p = (floor(X)-A+1)/(B-A+1) +endfunction +// +for A = floor(linspace(10,20,4)) +for B = floor(linspace(30,40,4)) + checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , A , B , rtol ); +end +end +///////////////////////////////////////////////////////////// +// +// "def" +// http://en.wikipedia.org/wiki/Uniform_distribution_(continuous) +// +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); +function p = mycdfdef (X) + p = X +endfunction +// +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); diff --git a/modules/randlib/tests/unit_tests/grand_laws.tst b/modules/randlib/tests/unit_tests/grand_laws.tst new file mode 100755 index 000000000..722e0ef88 --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_laws.tst @@ -0,0 +1,677 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gaüzere +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> + +function [x,y] = histcompute(n,data) + // + // Computes the histogram of a data. + // + // Parameters + // n : a 1-by-1 matrix of floating point integers, the number of classes. + // data : a matrix of doubles, the data + // x : 1-by-n+1 matrix of doubles, the classes of the histogram + // y : 1-by-n+1 matrix of doubles, the empirical probability that one value in data which fall in each class + x = linspace(min(data), max(data), n+1); + [ind , y] = dsearch(data, x) + y = y./length(data) +endfunction + +function checkLaw0arg ( name , cdffun , N , NC , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + + R = grand(1,N,name); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkLaw1arg ( name , cdffun , N , NC , A , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + + R = grand(1,N,name,A); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X,A) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkLaw2arg ( name , cdffun , N , NC , A , B , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + + R = grand(1,N,name,A,B); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X,A,B) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkLaw3arg ( name , cdffun , N , NC , A , B , C , rtol ) + // + // Check the random number generator for a continuous distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // C : a 1-by-1 matrix of doubles, the value of the 3d parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + + R = grand(1,N,name,A,B,C); + [X,EmpiricalPDF] = histcompute(NC,R); + CDF = cdffun(X,A,B,C) + TheoricPDF = diff(CDF); + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkPieceLaw1arg ( name , cdffun , N , NC , A , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + + R=grand(N,1,name,A); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X,A) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkPieceLaw2arg ( name , cdffun , N , NC , A , B , rtol ) + // + // Check the random number generator for a piecewise distribution function. + // + // Parameters + // name: a 1-by-1 string, the name of the distribution function + // cdffun : a function, the Cumulated Distribution Function + // NC : a 1-by-1 matrix of floating point integers, the number of classes + // N : a 1-by-1 matrix of floating point integers, the number of random values to test + // A : a 1-by-1 matrix of doubles, the value of the parameter + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + // + // Description + // Compare the empirical histogram with the theoretical histogram. + // The classes of the histogram are computed from the random samples, + // from which the unique entries are extracted. + + R=grand(N,1,name,A,B); + X = unique(R); + for k = 1 : size(X,"*") + EmpiricalPDF(k) = length(find(R==X(k))); + end + EmpiricalPDF = EmpiricalPDF./N; + CDF = cdffun(X,A,B) + TheoricPDF=[CDF(1);diff(CDF)]; + assert_checktrue( abs(EmpiricalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpiricalPDF,"bo-"); // Empirical Histogram + plot(X,TheoricPDF,"rox-"); // Theoretical Histogram + end +endfunction + +function checkMeanVariance0arg ( m , n , name , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + + R=grand(m,n,name); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction + + +function checkMeanVariance1arg ( m , n , name , A , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + + R=grand(m,n,name,A); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction + +function checkMeanVariance2arg ( m , n , name , A , B , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + + R=grand(m,n,name,A,B); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction + + +function checkMeanVariance3arg ( m , n , name , A , B , C , mu , va , rtol ) + // Check the mean and variance of random numbers. + // + // Parameters + // m : a 1-by-1 matrix of floating point integers, the number of rows + // n : a 1-by-1 matrix of floating point integers, the number of columns + // name: a 1-by-1 string, the name of the distribution function + // A : a 1-by-1 matrix of doubles, the value of the 1st parameter + // B : a 1-by-1 matrix of doubles, the value of the 2nd parameter + // C : a 1-by-1 matrix of doubles, the value of the 3d parameter + // mu : a 1-by-1 matrix of doubles, the expected mean + // va : a 1-by-1 matrix of doubles, the expected variance. If va==[], then the variance is not checked. + // rtol : a 1-by-1 matrix of doubles, the relative tolerance + + R=grand(m,n,name,A,B,C); + assert_checkequal ( size(R) , [m,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R) , mu , rtol ); + if ( va<>[] ) then + assert_checkalmostequal ( variance(R) , va , rtol ); + end +endfunction + +// +// Calling sequences +// +// Y=grand(m,n,'nor',Av,Sd) : OK +// Y=grand(m,n,'poi',mu) : OK +// Y=grand(m,n,'exp',Av) : OK +// Y=grand(m,n,'bet',A,B) : OK +// Y=grand(m,n,'bin',N,p) : OK +// Y=grand(m,n,'gam',shape,scale) : OK +// Y=grand(m,n,'f',Dfn,Dfd) : OK +// Y=grand(m,n,'chi', Df) : OK +// Y=grand(m,n,'nbn',N,p) : OK +// Y=grand(m,n,'nch',Df,Xnon) : OK +// Y=grand(m,n,'nf',Dfn,Dfd,Xnon) : OK +// Y=grand(n,'mn',Mean,Cov) : OK +// Y=grand(m,n,'geom', p) : OK +// Y=grand(m,n,'def') : OK +// Y=grand(m,n,'unf',Low,High) : OK +// Y=grand(m,n,'uin',Low,High) : OK +// Y=grand(n,'markov',P,x0) : TODO +// Y=grand(n,'mul',nb,P) : TODO +// Y=grand(n,'prm',vect) : in grand_prm.tst +// Y=grand(m,n,'lgi') : in grand_generators.tst +// S=grand('getgen') : in grand_generators.tst +// grand('setgen',gen) : in grand_generators.tst +// S=grand('getsd') : in grand_generators.tst +// grand('setsd',S) : in grand_generators.tst + +// For CLCG4 only: +// grand('setcgn',G) : in grand_clcg4.tst +// S=grand('getcgn') : TODO +// grand('initgn',I) : in grand_clcg4.tst +// grand('setall',s1,s2,s3,s4) : in grand_clcg4.tst +// grand('advnst',K) : TODO + +// +// Rationale for the unit tests of random number generators. +// +// There are several ways to check the output of random number generators. +// +// 1. Uniform random number generators are based on deterministic integer sequences. +// These integers are then scaled into the [0,1[ interval. +// When we set the seed to a constant (e.g. seed = 0, or seed=123456), +// the doubles which are produced are always the same. +// This does not check the quality of the generator. +// But it does check that the generator under evaluation is, indeed, the +// expected generator. +// +// 2. Non-uniform random numbers have a given mean and a variance which +// can be predicted by there associated distribution function. +// The problem is there to set the relative tolerance. +// The convergence of the sample mean to the expectation is driven by the +// law of large numbers. +// The standard deviation of the sample mean is sigma/sqrt(n), +// meaning that to reduce the shift by a factor 2, we have to use 4x more points. +// +// 3. The quality of a random number generator can be assessed by +// statistical tests. +// The Kolmogorov-Smirnov test is based on the comparison between the +// empirical CDF and the theoretical CDF. The difference between the two is +// a random variable, which must evolve according to the Normal distribution function. +// Then, the sum of the squares of the differences should evolve according to the +// Chi-square distribution function. By inverting this last distribution, we can +// compute the probability that the empirical distribution matches the theoretical distribution. +// +// 4. The empirical histogram must match the theoretical histogram. +// The number of classes is NC. +// The classes XC are computed from NC and the actual output ; X has NC+1 entries. +// The empirical histogram is the probability that X is the intervals defined by X. +// The theoretical histogram is computed by differences +// of the cumulated probability distribution function. +// The histograms can be graphically compared with the statements: +// plot(X(1:$-1),EmpiricalPDF,"bo-"); // Empirical Histogram +// plot(X(1:$-1),TheoricPDF,"rox-"); // Theoretical Histogram +// + +// +// In this script, we check the non-uniform random numbers. +// We use the strategies #2 and #4. +// The strategy #3 should be used in a future version of the tests (it requires to +// develop the kstest function). +// + +rtol = 1.e-2; + +// The number of classes in the histogram +// NC must be even. +NC = 2*12; +N=10000; + +// Set the seed to always get the same random numbers +grand("setsd",0); + +///////////////////////////////////////////////////////////// +// +// 'exp' +// + +function p = mycdfexp(X,A) + p = 1 - exp(-(1/A)*X); +endfunction + +A = 20; +checkMeanVariance1arg ( 400 , 800 , 'exp' , A , A , A^2 , 2*rtol ); +// +for A = linspace(0.1,50,10) + checkLaw1arg ( "exp" , mycdfexp , N , NC , A , 2*rtol ); +end + + +///////////////////////////////////////////////////////////// +// +// 'gam' +// + +function p = mycdfgam (X,A,B) + p = cdfgam("PQ",X,A*ones(X),B*ones(X)); +endfunction + +A = 5; +B = 3; +checkMeanVariance2arg ( 400 , 800 , 'gam' , A , B , A/B , A/(B^2) , rtol ); +// +for A = linspace(1,15,4) + for B = linspace(1,15,4) + checkLaw2arg ( 'gam' , mycdfgam , N , NC , A , B , rtol ); + end +end +///////////////////////////////////////////////////////////// +// +// 'bet' +// + +function p = mycdfbet (X,A,B) + p = cdfbet("PQ",X,1-X,A*ones(X),B*ones(X)); +endfunction + +A=3; +B=10; +checkMeanVariance2arg ( 400 , 800 , 'bet' , A , B , A/(A+B) , (A*B)/((A+B)^2*(A+B+1)) , rtol ); +// +for A = linspace(1,20,4) + for B = linspace(1,20,4) + checkLaw2arg ( 'bet' , mycdfbet , N , NC , A , B , 2*rtol ); + end +end + +///////////////////////////////////////////////////////////// +// +// 'poi' +// +// Caution : this is a piecewise distribution + +function p = mycdfpoi (X,A) + p = cdfpoi("PQ",X,A*ones(X)); +endfunction + +A = 10; +checkMeanVariance1arg ( 400 , 800 , 'poi' , A , A , A , rtol ); +// +for A = floor(linspace(50,70,10)) + checkPieceLaw1arg ( 'poi' , mycdfpoi , N , NC , A , rtol ); +end + +///////////////////////////////////////////////////////////// +// +// 'bin' +// +// Caution : this is a piecewise distribution + +function p = mycdfbin (X,A,B) + p = cdfbin("PQ",X,A*ones(X),B*ones(X),(1-B)*ones(X)); +endfunction + +A = 10; +B = 0.4; +checkMeanVariance2arg ( 400 , 800 , 'bin' , A , B , A*B , A*B*(1-B) , rtol ); +// +for A = floor(linspace(10,50,4)) +for B = linspace(0.1,0.9,4) + checkPieceLaw2arg ( 'bin' , mycdfbin , N , NC , A , B , 2*rtol ); +end +end + +///////////////////////////////////////////////////////////// +// +// 'nor' +// + +function p = mycdfnor (X,A,B) + p = cdfnor("PQ",X,A*ones(X),B*ones(X)); +endfunction + +A = 7; +B = 12; +checkMeanVariance2arg ( 400 , 800 , 'nor' , A , B , A , B^2 , rtol ); +// +// +for A = linspace(1,20,4) + for B = linspace(1,20,4) + checkLaw2arg ( 'nor' , mycdfnor , N , NC , A , B , rtol ); + end +end + +///////////////////////////////////////////////////////////// +// +// 'f' +// + +function p = mycdff (X,A,B) + p = cdff("PQ",X,A*ones(X),B*ones(X)); +endfunction + +// +// Increase the tolerance for this test. +A = 7; +B = 12; +checkMeanVariance2arg ( 400 , 800 , 'f' , A , B , B/(B-2) , (2*B^2*(A+B-2))/(A*(B-2)^2*(B-4)) , 4*rtol ); +// +for A = floor(linspace(1,20,4)) + for B = floor(linspace(5,20,4)) + checkLaw2arg ( 'f' , mycdff , N , NC , A , B , 2*rtol ); + end +end + +///////////////////////////////////////////////////////////// +// +// 'chi' +// + +function p = mycdfchi (X,A) + p = cdfchi("PQ",X,A*ones(X)); +endfunction + +A = 7; +checkMeanVariance1arg ( 400 , 800 , 'chi' , A , A , 2*A , rtol ); + +// Increase the tolerance for this test. +for A = floor(linspace(1,20,10)) + checkLaw1arg ( 'chi' , mycdfchi , N , NC , A , 2*rtol ); +end + +///////////////////////////////////////////////////////////// +// +// 'nbn' +// +// This is a piecewise function. + +function p = mycdfnbn (X,A,B) + p = cdfnbn("PQ",X,A*ones(X),B*ones(X),(1-B)*ones(X)); +endfunction + +A = 7; +B = 0.1; +checkMeanVariance2arg ( 400 , 800 , 'nbn' , A , B , A*(1-B)/B , A*(1-B)/B^2 , rtol ); + +// Increase the tolerance for this test. +for A = floor(linspace(1,20,4)) +for B = linspace(0.1,0.9,4) + checkPieceLaw2arg ( 'nbn' , mycdfnbn , N , NC , A , B , 2*rtol ); +end +end + +///////////////////////////////////////////////////////////// +// +// 'nch' +// + +function p = mycdfnch (X,A,B) + p = cdfchn("PQ",X,A*ones(X),B*ones(X)); +endfunction + +A = 4; +B = 3; +checkMeanVariance2arg ( 400 , 800 , 'nch' , A , B , A+B , 2*(A+2*B) , rtol ); + +for A = floor(linspace(1,20,4)) +for B = floor(linspace(1,20,4)) + checkLaw2arg ( 'nch' , mycdfnch , N , NC , A , B , 2*rtol ); +end +end +///////////////////////////////////////////////////////////// +// +// 'nf' +// http://mathworld.wolfram.com/NoncentralF-Distribution.html +// + +function p = mycdfnf (X,A,B,C) + p = cdffnc("PQ",X,A*ones(X),B*ones(X),C*ones(X)); +endfunction + +A = 4; +B = 3; +C = 10; +checkMeanVariance3arg ( 400 , 800 , 'nf' , A , B , C , ((C+A)*B)/(A*(B-2)) , [] , 4*rtol ); + +for A = floor(linspace(1,20,4)) +for B = floor(linspace(1,20,4)) +for C = floor(linspace(1,20,4)) + checkLaw3arg ( 'nf' , mycdfnf , N , NC , A , B , C , 2*rtol ); +end +end +end + +///////////////////////////////////////////////////////////// +// +// "mn" +// + +n = 2^16; +A = [1;2;3]; +// The covariance matrix B is symetric, positive definite. +// Its diagonal entries are [4;6;5], the variances. +B = [4,2,3;2,6,4;3,4,5]; + R=grand(n,"mn",A,B); + assert_checkequal ( size(R) , [3,n] ); + assert_checkequal ( typeof(R) , "constant" ); + assert_checkalmostequal ( mean(R,"c") , A , 2*rtol ); + assert_checkalmostequal ( variance(R,"c") , [4;6;5] , rtol ); +// +// No CDF for this function => no histogram test. + +///////////////////////////////////////////////////////////// +// +// "geom" +// http://en.wikipedia.org/wiki/Geometric_distribution +// + +A = 0.1; +checkMeanVariance1arg ( 400 , 800 , "geom" , A , 1/A , (1-A)/A^2 , rtol ); + +function p = mycdfgeom (X,A) + p = 1 -(1-A)^X +endfunction +// +for A = linspace(0.1,0.9,10) + checkPieceLaw1arg ( "geom" , mycdfgeom , N , NC , A , 2*rtol ); +end + +///////////////////////////////////////////////////////////// +// +// "unf" +// http://en.wikipedia.org/wiki/Uniform_distribution_(continuous) +// + +A = 0.1; +B = 2.3; +checkMeanVariance2arg ( 400 , 800 , "unf" , A , B , (A+B)/2 , (B-A)^2/12 , rtol ); + +function p = mycdfunf (X,A,B) + p = (X-A)/(B-A) +endfunction +// +for A = linspace(0.1,0.9,4) +for B = linspace(2.5,4.2,4) + checkLaw2arg ( "unf" , mycdfunf , N , NC , A , B , rtol ); +end +end + +///////////////////////////////////////////////////////////// +// +// "uin" +// http://en.wikipedia.org/wiki/Uniform_distribution_(discrete) +// +// Piecewise. + +A = 10; +B = 20; +checkMeanVariance2arg ( 400 , 800 , "uin" , A , B , (A+B)/2 , ((B-A+1)^2-1)/12 , rtol ); + +function p = mycdfuin (X,A,B) + p = (floor(X)-A+1)/(B-A+1) +endfunction +// +for A = floor(linspace(10,20,4)) +for B = floor(linspace(30,40,4)) + checkPieceLaw2arg ( "uin" , mycdfuin , N , NC , A , B , rtol ); +end +end + +///////////////////////////////////////////////////////////// +// +// "def" +// http://en.wikipedia.org/wiki/Uniform_distribution_(continuous) +// + +checkMeanVariance0arg ( 400 , 800 , "def" , 1/2 , 1/12 , rtol ); + +function p = mycdfdef (X) + p = X +endfunction +// +checkLaw0arg ( "def" , mycdfdef , N , NC , rtol ); + + + diff --git a/modules/randlib/tests/unit_tests/grand_laws2.dia.ref b/modules/randlib/tests/unit_tests/grand_laws2.dia.ref new file mode 100755 index 000000000..cf8cfcf1c --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_laws2.dia.ref @@ -0,0 +1,154 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gazere +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +// +// These tests makes comparisons between the empirical cumulated +// distribution function and the theoretical distribution function. +// They do not make use of the Chi-square distribution function, +// and, therefore, are not Kolmogorov-Smirnov tests. +// +// For each test, we can compare the two plots with the statements : +// plot(RdevS,PS,"b-"); // Empirical distribution +// plot(RdevS,P,"ro-"); // Theoretical distribution +// +// Not all distribution functions are tested. +// Moreover, the comparison is not done for integer-based (piecewise) +// distribution functions. +// This work is to be updated. +// +// Set the seed to always get the same random numbers +grand("setsd",0); +prec = 1; +// test for exp +for i=linspace(0.1,50,10) + N=10000;A=i; + Rdev=grand(1,N,'exp',A); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + P=1-exp(-RdevS/A); + if norm(P-PS) > 2*prec then bugmes();quit;end +end +// test for gamma +for i=linspace(1,15,4) + for j=linspace(1,15,4) + N=10000;A=i;B=j; + Rdev=grand(1,N,'gam',A,B); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + [P]=cdfgam("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); + if norm(P-PS)> 2*prec then bugmes();quit;end + end +end +// test for beta random deviate +for i=linspace(1,20,4) + for j=linspace(1,20,4) + N=10000;A=i;B=j; + Rdev=grand(1,N,'bet',A,B); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + [P]=cdfbet("PQ",RdevS,1-RdevS,A*ones(RdevS),B*ones(RdevS)); + if norm(P-PS)> 2*prec then bugmes();quit;end + end +end +// test for poi +for i=floor(linspace(50,70,10)) + N=10000;A=i; + Rdev=grand(1,N,'poi',A); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + [P]=cdfpoi("PQ",RdevS,A*ones(RdevS)); + // Need an other test P is piecewize linear and PS + // linear + //if norm(P-PS) > prec then bugmes();quit;end +end +N=100;A=5;B=0.7; +Rdev=grand(N,N,'bin',A,B); +Rdev=matrix(Rdev,1,N^2); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:(N^2))'/(N^2); +[P]=cdfbin("PQ",RdevS,A*ones(RdevS),B*ones(RdevS),(1-B)*ones(RdevS)); +//if norm(P-PS) > prec then bugmes();quit;end +// test for f +N=10000;A=1;B=3; +Rdev=grand(1,N,'f',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdff("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); +if norm(P-PS) > prec then bugmes();quit;end +// test for mul +// TODO +// test for nor +N=10000;A=1;B=2; +Rdev=grand(1,N,'nor',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfnor("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); +if norm(P-PS) > prec then bugmes();quit;end +// test for unf +N=10000;A=1;B=2; +Rdev=grand(1,N,'unf',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS-A; +if norm(P-PS) > prec then bugmes();quit;end +// test for uin ( a finir ) +N=10000;A=1;B=10; +Rdev=grand(1,N,'uin',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS-A; +//TODO need an other test +//if norm(P-PS) > prec then bugmes();quit;end +// test for lgi +// This is a completely wrong test: +// The output depends on the random number generator... +N=10000; +Rdev=grand(1,N,'lgi'); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS-A; +//TODO need an other test +//if norm(P-PS) > prec then bugmes();quit;end +// test for nbn +N=10000;A=5;B=0.7; +Rdev=grand(1,N,'nbn',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfnbn("PQ",RdevS,A*ones(RdevS),B*ones(RdevS),(1-B)*ones(RdevS)); +//TODO need an other test +//if norm(P-PS) > prec then bugmes();quit;end +// test for mn +// TODO +// test for 'def' +N=10000; +Rdev=grand(1,N,'def'); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS; +if norm(P-PS) > prec then bugmes();quit;end +// test for nch or chn +N=10000;A=5;B=4; +Rdev=grand(1,N,'nch',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfchn("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); +if norm(P-PS) > prec then bugmes();quit;end +// test for nf or fnc +N=10000;A=5;B=4;C=10; +Rdev=grand(1,N,'nf',A,B,C); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdffnc("PQ",RdevS,A*ones(RdevS),B*ones(RdevS),C*ones(RdevS)); +if norm(P-PS) > prec then bugmes();quit;end +// test for chi +N=10000;A=5; +Rdev=grand(1,N,'chi',A); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfchi("PQ",RdevS,A*ones(RdevS)); +if norm(P-PS) > prec then bugmes();quit;end diff --git a/modules/randlib/tests/unit_tests/grand_laws2.tst b/modules/randlib/tests/unit_tests/grand_laws2.tst new file mode 100755 index 000000000..7a3eb234b --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_laws2.tst @@ -0,0 +1,194 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gazere +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> + +// +// These tests makes comparisons between the empirical cumulated +// distribution function and the theoretical distribution function. +// They do not make use of the Chi-square distribution function, +// and, therefore, are not Kolmogorov-Smirnov tests. +// +// For each test, we can compare the two plots with the statements : +// plot(RdevS,PS,"b-"); // Empirical distribution +// plot(RdevS,P,"ro-"); // Theoretical distribution +// +// Not all distribution functions are tested. +// Moreover, the comparison is not done for integer-based (piecewise) +// distribution functions. +// This work is to be updated. +// + + +// Set the seed to always get the same random numbers +grand("setsd",0); + +prec = 1; + +// test for exp + +for i=linspace(0.1,50,10) + N=10000;A=i; + Rdev=grand(1,N,'exp',A); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + P=1-exp(-RdevS/A); + if norm(P-PS) > 2*prec then pause,end +end + + +// test for gamma +for i=linspace(1,15,4) + for j=linspace(1,15,4) + N=10000;A=i;B=j; + Rdev=grand(1,N,'gam',A,B); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + [P]=cdfgam("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); + if norm(P-PS)> 2*prec then pause,end + end +end + + +// test for beta random deviate +for i=linspace(1,20,4) + for j=linspace(1,20,4) + N=10000;A=i;B=j; + Rdev=grand(1,N,'bet',A,B); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + [P]=cdfbet("PQ",RdevS,1-RdevS,A*ones(RdevS),B*ones(RdevS)); + if norm(P-PS)> 2*prec then pause,end + end +end + +// test for poi +for i=floor(linspace(50,70,10)) + N=10000;A=i; + Rdev=grand(1,N,'poi',A); + RdevS=gsort(Rdev,"g","i")'; + PS=(1:N)'/N; + [P]=cdfpoi("PQ",RdevS,A*ones(RdevS)); + // Need an other test P is piecewize linear and PS + // linear + //if norm(P-PS) > prec then pause,end +end + + +N=100;A=5;B=0.7; +Rdev=grand(N,N,'bin',A,B); +Rdev=matrix(Rdev,1,N^2); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:(N^2))'/(N^2); +[P]=cdfbin("PQ",RdevS,A*ones(RdevS),B*ones(RdevS),(1-B)*ones(RdevS)); +//if norm(P-PS) > prec then pause,end + +// test for f + +N=10000;A=1;B=3; +Rdev=grand(1,N,'f',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdff("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); +if norm(P-PS) > prec then pause,end + +// test for mul +// TODO + +// test for nor + +N=10000;A=1;B=2; +Rdev=grand(1,N,'nor',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfnor("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); +if norm(P-PS) > prec then pause,end + +// test for unf + +N=10000;A=1;B=2; +Rdev=grand(1,N,'unf',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS-A; +if norm(P-PS) > prec then pause,end + +// test for uin ( a finir ) + +N=10000;A=1;B=10; +Rdev=grand(1,N,'uin',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS-A; +//TODO need an other test +//if norm(P-PS) > prec then pause,end + +// test for lgi +// This is a completely wrong test: +// The output depends on the random number generator... +N=10000; +Rdev=grand(1,N,'lgi'); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS-A; +//TODO need an other test +//if norm(P-PS) > prec then pause,end + + + +// test for nbn + +N=10000;A=5;B=0.7; +Rdev=grand(1,N,'nbn',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfnbn("PQ",RdevS,A*ones(RdevS),B*ones(RdevS),(1-B)*ones(RdevS)); +//TODO need an other test +//if norm(P-PS) > prec then pause,end + + + +// test for mn +// TODO + +// test for 'def' + +N=10000; +Rdev=grand(1,N,'def'); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=RdevS; +if norm(P-PS) > prec then pause,end + +// test for nch or chn + +N=10000;A=5;B=4; +Rdev=grand(1,N,'nch',A,B); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfchn("PQ",RdevS,A*ones(RdevS),B*ones(RdevS)); +if norm(P-PS) > prec then pause,end + +// test for nf or fnc + +N=10000;A=5;B=4;C=10; +Rdev=grand(1,N,'nf',A,B,C); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdffnc("PQ",RdevS,A*ones(RdevS),B*ones(RdevS),C*ones(RdevS)); +if norm(P-PS) > prec then pause,end + +// test for chi + +N=10000;A=5; +Rdev=grand(1,N,'chi',A); +RdevS=gsort(Rdev,"g","i")'; +PS=(1:N)'/N; +[P]=cdfchi("PQ",RdevS,A*ones(RdevS)); +if norm(P-PS) > prec then pause,end + + diff --git a/modules/randlib/tests/unit_tests/grand_plot.dia.ref b/modules/randlib/tests/unit_tests/grand_plot.dia.ref new file mode 100755 index 000000000..5a1577b79 --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_plot.dia.ref @@ -0,0 +1,111 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gaüzere +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- TEST WITH GRAPHIC --> +// +// These tests makes comparisons between the empirical cumulated +// distribution function and the theoretical distribution function. +// They do not make use of the Chi-square distribution function, +// and, therefore, are not Kolmogorov-Smirnov tests. +// The tester is asked to visually compare the two plots, which +// cannot be automated. +// +//Comparison of pseudo-random numbers following an exponential distribution +//and the density of this distribution +//Parameter of the distribution which can be modified +lambda=1.6; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following an exponential distribution +X = grand(1,N,"exp",lambda); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,12,25); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,12,25); +y = (1/lambda)*exp(-(1/lambda)*x); +plot2d(x,y,3); +f=gcf(); +delete(f); +//Comparison of pseudo-random numbers following a beta distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +A=1;B=3; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a beta distribution +X = grand(1,N,"bet",A,B); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,1,50); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,1,50); +y = (1/(beta(A,B))).*(x.^(A-1)).*((1-x).^(B-1)) ; +plot2d(x,y,2); +f=gcf(); +delete(f); +//Comparison of pseudo-random numbers following a gamma distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +A=2;B=1; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a gamma distribution +X = grand(1,N,"gam",A,B); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,2,50); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,2,50); +y = (B/(gamma(A))).*exp(-B*x).*(B*x).^(A-1); +plot2d(x,y,2); +f=gcf(); +delete(f); +//Comparison of pseudo-random numbers following a binomial distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +n=50;p=0.3; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a binomial distribution +X = grand(1,N,"bin",n,p); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,n,n+1); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,n,n+1); +y = binomial(p,n); +plot2d(x,y,2); +f=gcf(); +delete(f); +//Comparison of pseudo-random numbers following a poisson distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +mu=50; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a poisson distribution +X = grand(1,N,"poi",mu); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,2*mu,101); +//Draw in histogram +histplot(classes,X); +//Draw the density +[x]=linspace(0,2*mu,101); +y = exp(-mu).*(mu.^x)./factorial(x); +plot2d(x,y,2); +f=gcf(); +delete(f); diff --git a/modules/randlib/tests/unit_tests/grand_plot.tst b/modules/randlib/tests/unit_tests/grand_plot.tst new file mode 100755 index 000000000..3c90e48a7 --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_plot.tst @@ -0,0 +1,120 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA - Sabine Gaüzere +// Copyright (C) 2010 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- TEST WITH GRAPHIC --> + +// +// These tests makes comparisons between the empirical cumulated +// distribution function and the theoretical distribution function. +// They do not make use of the Chi-square distribution function, +// and, therefore, are not Kolmogorov-Smirnov tests. +// The tester is asked to visually compare the two plots, which +// cannot be automated. +// + +//Comparison of pseudo-random numbers following an exponential distribution +//and the density of this distribution +//Parameter of the distribution which can be modified +lambda=1.6; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following an exponential distribution +X = grand(1,N,"exp",lambda); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,12,25); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,12,25); +y = (1/lambda)*exp(-(1/lambda)*x); +plot2d(x,y,3); +f=gcf(); +delete(f); + +//Comparison of pseudo-random numbers following a beta distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +A=1;B=3; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a beta distribution +X = grand(1,N,"bet",A,B); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,1,50); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,1,50); +y = (1/(beta(A,B))).*(x.^(A-1)).*((1-x).^(B-1)) ; +plot2d(x,y,2); +f=gcf(); +delete(f); + +//Comparison of pseudo-random numbers following a gamma distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +A=2;B=1; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a gamma distribution +X = grand(1,N,"gam",A,B); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,2,50); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,2,50); +y = (B/(gamma(A))).*exp(-B*x).*(B*x).^(A-1); +plot2d(x,y,2); +f=gcf(); +delete(f); + + +//Comparison of pseudo-random numbers following a binomial distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +n=50;p=0.3; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a binomial distribution +X = grand(1,N,"bin",n,p); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,n,n+1); +//Draw in histogram +histplot(classes,X); +//Draw the density +x=linspace(0,n,n+1); +y = binomial(p,n); +plot2d(x,y,2); +f=gcf(); +delete(f); + +//Comparison of pseudo-random numbers following a poisson distribution +//and the density of this distribution +//Parameters of the distribution which can be modified +mu=50; +// Number of random variable generated +N=100000; +//Generation of a vector of numbers following a poisson distribution +X = grand(1,N,"poi",mu); +clf(); +//Discretization of the abscisses in classes +classes = linspace(0,2*mu,101); +//Draw in histogram +histplot(classes,X); +//Draw the density +[x]=linspace(0,2*mu,101); +y = exp(-mu).*(mu.^x)./factorial(x); +plot2d(x,y,2); +f=gcf(); +delete(f); + + diff --git a/modules/randlib/tests/unit_tests/grand_prm.dia.ref b/modules/randlib/tests/unit_tests/grand_prm.dia.ref new file mode 100755 index 000000000..10e3e323b --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_prm.dia.ref @@ -0,0 +1,80 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> +rtol = 1.e-2; +// Set the seed to always get the same random numbers +grand("setsd",0); +// +// 1. Permute some vectors, and check that the output is basically correct. +// +X = (2:10)'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +// +X = (10:100)'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +// +X = [-12 4 9 365]'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +// +X = (2:11)'; +P = grand(5,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , [10 5] ); +assert_checkequal ( gsort(P,"r","i") , X * ones(1,5) ); +// +// 2. Check that the produced permutations are uniformly chosen in the +// set of all possible permutations. +// +X = [-12 4 9 365]'; +S = perms(X); +// Total number of permutations : F = 4! = 24 +F = size(S,"r"); +// Number of random permutations : N +N = 10000; +P = grand(N,"prm",X); +// Set in R(k), k=1,2,...,N the index i of the permutation, with i=1,2,...,F. +// R must be a random variable uniformly distributed in the interval [1,2,...,F]. +R = zeros(N,1); +for k = 1:N + permk = P(:,k); + // Search the index i of the permutation permk + for i = 1 : F + permi = S(i,:); + if ( permi'==permk ) then + R(k) = i; + break + end + end +end +assert_checkalmostequal ( mean(R) , (1+F)/2 , 0.01 ); +assert_checkalmostequal ( variance(R) , (F^2-1)/12 , 0.1 ); +// +// Check the distribution of R +function p = mycdfuin (X,A,B) + p = (floor(X)-A+1)/(B-A+1) +endfunction +X = (1:F)'; +for k = 1 : size(X,"*") + EmpicicalPDF(k) = length(find(R==X(k))); +end +EmpicicalPDF = EmpicicalPDF./N; +CDF = mycdfuin(X,1,F); +TheoricPDF=[CDF(1);diff(CDF)]; +assert_checktrue( abs(EmpicicalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpicicalPDF,"bo-"); // Empirical PDF + plot(X,TheoricPDF,"rox-"); // Theoretical PDF + end diff --git a/modules/randlib/tests/unit_tests/grand_prm.tst b/modules/randlib/tests/unit_tests/grand_prm.tst new file mode 100755 index 000000000..0d33d454c --- /dev/null +++ b/modules/randlib/tests/unit_tests/grand_prm.tst @@ -0,0 +1,85 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2011 - DIGITEO - Michael Baudin +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// <-- CLI SHELL MODE --> + +rtol = 1.e-2; + +// Set the seed to always get the same random numbers +grand("setsd",0); + +// +// 1. Permute some vectors, and check that the output is basically correct. +// +X = (2:10)'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +// +X = (10:100)'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +// +X = [-12 4 9 365]'; +P = grand(1,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , size(X) ); +assert_checkequal ( gsort(P,"g","i") , X ); +// +X = (2:11)'; +P = grand(5,"prm",X); +assert_checkequal ( typeof(P) , "constant" ); +assert_checkequal ( size(P) , [10 5] ); +assert_checkequal ( gsort(P,"r","i") , X * ones(1,5) ); +// +// 2. Check that the produced permutations are uniformly chosen in the +// set of all possible permutations. +// +X = [-12 4 9 365]'; +S = perms(X); +// Total number of permutations : F = 4! = 24 +F = size(S,"r"); +// Number of random permutations : N +N = 10000; +P = grand(N,"prm",X); +// Set in R(k), k=1,2,...,N the index i of the permutation, with i=1,2,...,F. +// R must be a random variable uniformly distributed in the interval [1,2,...,F]. +R = zeros(N,1); +for k = 1:N + permk = P(:,k); + // Search the index i of the permutation permk + for i = 1 : F + permi = S(i,:); + if ( permi'==permk ) then + R(k) = i; + break + end + end +end +assert_checkalmostequal ( mean(R) , (1+F)/2 , 0.01 ); +assert_checkalmostequal ( variance(R) , (F^2-1)/12 , 0.1 ); +// +// Check the distribution of R +function p = mycdfuin (X,A,B) + p = (floor(X)-A+1)/(B-A+1) +endfunction +X = (1:F)'; +for k = 1 : size(X,"*") + EmpicicalPDF(k) = length(find(R==X(k))); +end +EmpicicalPDF = EmpicicalPDF./N; +CDF = mycdfuin(X,1,F); +TheoricPDF=[CDF(1);diff(CDF)]; +assert_checktrue( abs(EmpicicalPDF-TheoricPDF) < rtol ); + if ( %f ) then + plot(X,EmpicicalPDF,"bo-"); // Empirical PDF + plot(X,TheoricPDF,"rox-"); // Theoretical PDF + end + + |