Hello community,
here is the log from the commit of package octave-forge-stk for openSUSE:Factory checked in at 2015-06-23 12:00:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-stk (Old)
and /work/SRC/openSUSE:Factory/.octave-forge-stk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-stk"
Changes:
--------
--- /work/SRC/openSUSE:Factory/octave-forge-stk/octave-forge-stk.changes 2015-06-16 15:14:04.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.octave-forge-stk.new/octave-forge-stk.changes 2015-06-23 12:00:57.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Jun 22 19:41:57 UTC 2015 - dmitry_r@opensuse.org
+
+- Update to version 2.3.1
+ * Bugfix release
+
+-------------------------------------------------------------------
Old:
----
stk-2.3.0.tar.gz
New:
----
stk-2.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave-forge-stk.spec ++++++
--- /var/tmp/diff_new_pack.wn2fQ7/_old 2015-06-23 12:00:57.000000000 +0200
+++ /var/tmp/diff_new_pack.wn2fQ7/_new 2015-06-23 12:00:57.000000000 +0200
@@ -18,7 +18,7 @@
%define octpkg stk
Name: octave-forge-%{octpkg}
-Version: 2.3.0
+Version: 2.3.1
Release: 0
Summary: Small Octave Toolbox for Kriging
License: GPL-3.0+
++++++ stk-2.3.0.tar.gz -> stk-2.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/ChangeLog new/stk/ChangeLog
--- old/stk/ChangeLog 2015-05-17 17:16:26.000000000 +0200
+++ new/stk/ChangeLog 2015-06-22 08:42:19.000000000 +0200
@@ -1,3 +1,99 @@
+2015-06-16 Julien Bect
+
+ check_index_file.m: Fix error handling.
+
+ * admin/build_tools/check_index_file.m: Fix error handling.
+
+ Use PKG_ADD/PKG_DEL directives in the Octave package.
+
+ * stk_init.m: Add PKG_ADD/PKG_DEL directives. Also, add an
+ optional input argument 'do_quit'; when it is true, stk_init
+ removes STK from the path.
+ * admin/build_tools/build_octpkg.m: No more PKG_ADD/PKG_DEL
+ files. They are replaced by corresponding directives in
+ stk_init.m, which is no longer renamed to PKG_ADD. Also, there are
+ now two STK_OCTAVE_PACKAGE variables to set (one in stk_init.m,
+ the other one in stk_config_rmpath.m).
+ * admin/build_tools/check_index_file.m: No need to warry about
+ PKG_ADD.m ad PKG_DEL.m anymore.
+ * admin/octpkg/post_install.m: Idem.
+ * admin/octpkg/INDEX: Add stk_init to the INDEX.
+ * config/stk_config_path.m: Do not look for PKG_ADD to detect
+ Octave package mode, since there no longer is a PKG_ADD
+ file. Instead, rely on a hard-coded STK_OCTAVE_PACKAGE variable,
+ which is modified at build time by build_octpkg (similarly to the
+ one in stk_init).
+ * config/stk_config_rmpath.m: Modify comment.
+ * config/stk_config_addpath.m: Modify comment.
+ * admin/octpkg/PKG_DEL.m: Removed. Instead, a PKD_DEL directive
+ has been inserted in stk_init.
+
+2015-06-15 Julien Bect
+
+ Avoid unnecessary calls to stk_commonsize.
+
+ * misc/distrib/stk_distrib_bivnorm_cdf.m: Avoid unnecessary calls
+ to stk_commonsize.
+ * misc/distrib/stk_distrib_normal_cdf.m: Idem.
+
+2015-06-12 Julien Bect
+
+ stk_commonsize.m: Avoid unnecessary calls to repmat.
+
+ * arrays/generic/stk_commonsize.m: Avoid unnecessary calls to
+ repmat.
+
+2015-06-11 Julien Bect
+
+ stk_commonsize.m: Accept empty dimensions
+
+ * arrays/generic/stk_commonsize.m: Accept empty dimensions, under
+ the condition that all input arguments have the same empty
+ dimensions (in which case the result is empty).
+
+2015-06-10 Julien Bect
+
+ @stk_dataframe/subsasgn.m: Preserve column names when deleting rows
+
+ * arrays/@stk_dataframe/subsasgn.m: Preserve column names when
+ deleting rows, even if the resulting array is empty.
+
+2015-05-29 Julien Bect
+
+ stk_distrib_bivnorm_cdf.m: Bugfix
+
+ * misc/distrib/stk_distrib_bivnorm_cdf.m: Fix a bug in the case of
+ mixtures of singular and non-singular cases. Add unit test.
+
+2015-05-24 Julien Bect
+
+ Clear persistent variables in stk_init
+
+ * config/stk_config_clearpersistents.m: New function that unlocks
+ all possibly mlock-ed STK files and clears all STK functions that
+ contain persistent variables.
+ * stk_init.m: Call stk_config_clearpersistents.
+ * admin/RELEASE.md: Update release instructions.
+
+2015-05-20 Julien Bect
+
+ @stk_dataframe/set.m: Fix stk_error calls (missing mnemonic)
+
+ * arrays/@stk_dataframe/set.m: Fix stk_error calls (missing mnemonic)
+
+ stk_param_estim.m: Make sure that lnv0 falls within the bounds
+
+ * paramestim/stk_param_estim.m (get_default_bounds_lnv): Make sure
+ that lnv0 falls within the bounds returned by get_default_bounds_lnv.
+
+2015-05-19 Julien Bect
+
+ stk_optim_hasfmincon.m: Improve fmincon detection
+
+ * misc/optim/stk_optim_hasfmincon.m: Try to use fmincon to check
+ that it is there, instead of relying on the result of the exist
+ function (closes ticket #30).
+
2015-05-17 Julien Bect
admin/octpkg/Makefile: Use $(MKOCTFILE) if defined
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/DESCRIPTION new/stk/DESCRIPTION
--- old/stk/DESCRIPTION 2015-05-17 17:16:30.000000000 +0200
+++ new/stk/DESCRIPTION 2015-06-22 08:42:24.000000000 +0200
@@ -1,8 +1,8 @@
Name: STK
#
-Version: 2.3.0
+Version: 2.3.1
#
-Date: 17-May-2015
+Date: 22-Jun-2015
#
Title: STK: A Small Toolbox for Kriging
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/INDEX new/stk/INDEX
--- old/stk/INDEX 2015-05-17 17:16:30.000000000 +0200
+++ new/stk/INDEX 2015-06-22 08:42:25.000000000 +0200
@@ -281,6 +281,7 @@
Miscellaneous: options, plots...
stk_dist
+ stk_init
stk_options_get
stk_options_set
stk_plot1d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/NEWS new/stk/NEWS
--- old/stk/NEWS 2015-05-17 17:16:26.000000000 +0200
+++ new/stk/NEWS 2015-06-22 08:42:19.000000000 +0200
@@ -1,3 +1,38 @@
+Changes in version 2.3.1
+========================
+
+* Bug fixes
+
+ o stk_optim_hasfmincon.m: Detect fmincon by trying to use it, instead of
+ relying on the result of the exist function (ticket #30 closed).
+
+ o stk_param_estim.m: Make sure that the bounds that we use for the lnv
+ parameter contain the starting point lnv0 when it is provided.
+
+ o @stk_dataframe/set.m: Fix stk_error calls (missing mnemonic).
+
+ o stk_distrib_bivnorm_cdf.m: Fix a bug in the case of mixtures of
+ singular and non-singular cases.
+
+ o @stk_dataframe/subsasgn.m: Preserve column names when deleting rows, even
+ if the resulting array is empty.
+
+* Minor changes
+
+ o stk_init.m: Clear persistent variables. As a consequence, stk_init can now
+ be used to restart STK completely.
+
+ o stk_commonsize.m: Accept empty dimensions, under the condition that all
+ input arguments have the same empty dimensions (in which case the result is
+ empty).
+
+ o stk_commonsize.m: is now faster when some arguments already have the proper
+ size (unnecessary calls to repmat are avoided).
+
+ o stk_distrib_normal_cdf.m, stk_distrib_bivnorm_cdf.m: are now slightly
+ faster (unnecessary calls to stk_commonsize are avoided).
+
+
Changes in version 2.3.0
========================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/doc/AUTHORS new/stk/doc/AUTHORS
--- old/stk/doc/AUTHORS 2015-05-17 17:16:26.000000000 +0200
+++ new/stk/doc/AUTHORS 2015-06-22 08:42:19.000000000 +0200
@@ -8,7 +8,8 @@
BENASSI Romain
DABOUSSI Elias
- DUTRIEUX Heloise
+ DRAUG Carnë
+ DUTRIEUX Héloïse
FELIOT Paul
FRASNEDO Sophie
JAN Benoit
@@ -19,6 +20,7 @@
RAHALI Elham
RAVISANKAR Ashwin
RESSEGUIER Valentin
+ STROH Rémi
VILLEMONTEIX Julien
Individual copyright notices are provided at the beginning of each
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/doc/README new/stk/doc/README
--- old/stk/doc/README 2015-05-17 17:16:26.000000000 +0200
+++ new/stk/doc/README 2015-06-22 08:42:19.000000000 +0200
@@ -34,7 +34,7 @@
o General information
- Version: 2.3.0
+ Version: 2.3.1
Authors: See AUTHORS file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/PKG_ADD.m new/stk/inst/PKG_ADD.m
--- old/stk/inst/PKG_ADD.m 2015-05-17 17:16:30.000000000 +0200
+++ new/stk/inst/PKG_ADD.m 1970-01-01 01:00:00.000000000 +0100
@@ -1,73 +0,0 @@
-% STK_INIT initializes the STK
-%
-% CALL: stk_init()
-%
-% STK_INIT sets paths and environment variables
-
-% Copyright Notice
-%
-% Copyright (C) 2011-2014 SUPELEC
-%
-% Authors: Julien Bect
-% Emmanuel Vazquez
-
-% Copying Permission Statement
-%
-% This file is part of
-%
-% STK: a Small (Matlab/Octave) Toolbox for Kriging
-% (http://sourceforge.net/projects/kriging)
-%
-% STK is free software: you can redistribute it and/or modify it under
-% the terms of the GNU General Public License as published by the Free
-% Software Foundation, either version 3 of the License, or (at your
-% option) any later version.
-%
-% STK is distributed in the hope that it will be useful, but WITHOUT
-% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-% License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with STK. If not, see http://www.gnu.org/licenses/.
-
-% Deduce the root of STK from the path to this script
-root = fileparts (mfilename ('fullpath'));
-config = fullfile (root, 'config');
-
-% Add config to the path. It will be removed at the end of this script.
-addpath (config);
-
-% Activate the MOLE
-stk_config_mole (root);
-
-% Are we using STK installed as an octave package ?
-STK_OCTAVE_PACKAGE = true;
-
-% Build MEX-files "in-place" (unless STK is used as an Octave package)
-if ~ STK_OCTAVE_PACKAGE
- stk_config_buildmex ();
- % To force recompilation of all MEX-files, use stk_config_buildmex (true);
-end
-
-% Add STK folders to the path (note: doing this ATFER building the MEX-files seems to
-% solve the problem related to having MEX-files in private folders)
-stk_config_addpath (root);
-
-% Check that MEX-files located in private folders are properly detected (note:
-% there are no MEX-files in private folders if STK is used as an Octave package)
-if isoctave && (~ STK_OCTAVE_PACKAGE),
- stk_config_testprivatemex ();
-end
-
-% Configure STK with default settings
-stk_config_setup;
-
-% Uncomment this line if you want to see a lot of details about the internals
-% of stk_dataframe and stk_factorialdesign objects:
-% stk_options_set ('stk_dataframe', 'disp_format', 'verbose');
-
-% Remove config from the path
-rmpath (config);
-
-clear root config STK_OCTAVE_PACKAGE ans;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/PKG_DEL.m new/stk/inst/PKG_DEL.m
--- old/stk/inst/PKG_DEL.m 2015-05-17 17:16:30.000000000 +0200
+++ new/stk/inst/PKG_DEL.m 1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-% PKG_DEL
-
-% Copyright Notice
-%
-% Copyright (C) 2014 SUPELEC
-%
-% Author: Julien Bect
-
-% Copying Permission Statement
-%
-% This file is part of
-%
-% STK: a Small (Matlab/Octave) Toolbox for Kriging
-% (http://sourceforge.net/projects/kriging)
-%
-% STK is free software: you can redistribute it and/or modify it under
-% the terms of the GNU General Public License as published by the Free
-% Software Foundation, either version 3 of the License, or (at your
-% option) any later version.
-%
-% STK is distributed in the hope that it will be useful, but WITHOUT
-% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-% License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with STK. If not, see http://www.gnu.org/licenses/.
-
-% Deduce the root of STK from the path to this script
-root = fileparts (mfilename ('fullpath'));
-config = fullfile (root, 'config');
-
-% Add config to the path. No need to remove it manually at the end of the
-% script since it will be automatically removed by stk_config_rmpath
-addpath (config);
-
-% Remove STK subdirectories from the path
-stk_config_rmpath (root);
-
-clear root config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/arrays/@stk_dataframe/set.m new/stk/inst/arrays/@stk_dataframe/set.m
--- old/stk/inst/arrays/@stk_dataframe/set.m 2015-05-17 17:16:27.000000000 +0200
+++ new/stk/inst/arrays/@stk_dataframe/set.m 2015-06-22 08:42:20.000000000 +0200
@@ -45,7 +45,8 @@
n1 = size (x.data, 1);
n2 = length (value);
if ~ iscell (value)
- stk_error ('value should be a cell array.');
+ stk_error (['Input argument ''value'' should be a cell' ...
+ ' array.'], 'InvalidArgument');
elseif isequal (size (value), [n2 1])
x.rownames = value;
else
@@ -73,7 +74,8 @@
d2 = length (value);
if ~ iscell (value)
- stk_error ('value should be a cell array.');
+ stk_error (['Input argument ''value'' should be a cell' ...
+ ' array.'], 'InvalidArgument');
elseif isequal (size (value), [1 d2])
x.colnames = value;
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/arrays/@stk_dataframe/subsasgn.m new/stk/inst/arrays/@stk_dataframe/subsasgn.m
--- old/stk/inst/arrays/@stk_dataframe/subsasgn.m 2015-05-17 17:16:27.000000000 +0200
+++ new/stk/inst/arrays/@stk_dataframe/subsasgn.m 2015-06-22 08:42:20.000000000 +0200
@@ -138,47 +138,47 @@
end
- else % assignment rhs is empty: deletion
+ else % Assignment rhs is empty: deletion
- if L == 1, % linear indexing
- if d == 1,
+ if L == 1, % Linear indexing
+
+ if d == 1, % Column array => remove rows
I = idx(1).subs{1};
J = 1;
- elseif n == 1,
+ remove_rows = true;
+ elseif n == 1, % Row array => remove columns
I = 1;
J = idx(1).subs{1};
+ remove_rows = false;
else
- stk_error('Illegal indexing.', 'IllegalIndexing');
+ stk_error ('Illegal indexing.', 'IllegalIndexing');
end
- else
+
+ else % Matrix-style indexing
+
I = idx(1).subs{1};
J = idx(1).subs{2};
+ remove_rows = strcmp (J, ':');
+ if ~ (remove_rows || (strcmp (I, ':')))
+ stk_error ('Illegal indexing.', 'IllegalIndexing');
+ end
+
end
- remove_columns = (strcmp(I, ':') ...
- || ((n == 1) && isequal(I, 1)));
- remove_rows = (strcmp(J, ':') ...
- || ((d == 1) && isequal(J, 1)));
-
- if ~ (remove_columns || remove_rows)
+ if remove_rows % Keep column names
- stk_error('Illegal indexing.', 'IllegalIndexing');
+ x.data(I, :) = [];
+ if ~ isempty (x.rownames)
+ x.rownames(I) = [];
+ end
- elseif remove_columns
+ else % Remove columns
x.data(:, J) = [];
- if ~ isempty(x.colnames)
+ if ~ isempty (x.colnames)
x.colnames(J) = [];
end
- else % remove_rows
-
- x.data(I, :) = [];
-
- if ~ isempty (x.rownames)
- x.rownames(I) = [];
- end
-
end
end
end
@@ -302,6 +302,14 @@
%! x(:, :) = [];
%! assert (isempty (x));
+%!test % Delete the only row of a one-row dataframe
+%! y1 = stk_dataframe ([1.2 3.33], {'mean', 'var'})
+%! y1(1, :) = []; % Remove the only row of data
+%! assert (isequal (size (y1), [0 2]))
+%! assert (isequal (y1.colnames, {'mean', 'var'}))
+%! y11 = get (y1, 'mean');
+%! assert (isempty (y11));
+
%!error x{1} = 2;
%!error x(1, 2) = [];
%!error x(1, 2).a = 3;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/arrays/generic/stk_commonsize.m new/stk/inst/arrays/generic/stk_commonsize.m
--- old/stk/inst/arrays/generic/stk_commonsize.m 2015-05-17 17:16:27.000000000 +0200
+++ new/stk/inst/arrays/generic/stk_commonsize.m 2015-06-22 08:42:21.000000000 +0200
@@ -4,6 +4,7 @@
% Copyright Notice
%
+% Copyright (C) 2015 CentraleSupelec
% Copyright (C) 2013, 2014 SUPELEC
%
% Author: Julien Bect
@@ -41,7 +42,7 @@
if n == 1
% varargin{1} is expected to be a cell array in this case
C = varargin{1};
- n = length (C);
+ n = length (C);
else
C = varargin;
end
@@ -54,11 +55,18 @@
smax = max (s);
+ % Take care of empty dimensions, if any
+ b = (smax > 0);
+ smax = smax (b);
+ s = s(:, b);
+
+ nrep = ones (size (smax));
for i = 1:n,
- nrep = smax ./ s(i, :);
- if ~ all ((s(i, :) == 1) | (nrep == 1))
+ nrep(b) = smax ./ s(i, :);
+ nrep_one = (nrep == 1);
+ if ~ all ((s(i, :) == 1) | nrep_one)
error ('Input arguments cannot be brought to a common size.');
- else
+ elseif ~ all (nrep_one)
C{i} = repmat (C{i}, nrep);
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/config/stk_config_addpath.m new/stk/inst/config/stk_config_addpath.m
--- old/stk/inst/config/stk_config_addpath.m 2015-05-17 17:16:28.000000000 +0200
+++ new/stk/inst/config/stk_config_addpath.m 2015-06-22 08:42:21.000000000 +0200
@@ -2,10 +2,11 @@
% Copyright Notice
%
+% Copyright (C) 2015 CentraleSupelec
% Copyright (C) 2011-2014 SUPELEC
%
-% Authors: Julien Bect
-% Emmanuel Vazquez
+% Authors: Julien Bect
+% Emmanuel Vazquez
% Copying Permission Statement
%
@@ -55,7 +56,7 @@
end
% Selectively add MOLE subdirectories to compensate for missing functions
-% (note that stk_init.m/PKG_ADD also does that, but it is necessary to do it again here,
+% (note that stk_init.m also does that, but it is necessary to do it again here,
% just in case some functions were provided by another copy of STK that has been removed
% from the path by stk_config_addpath (see above))
stk_config_mole (root);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/config/stk_config_clearpersistents.m new/stk/inst/config/stk_config_clearpersistents.m
--- old/stk/inst/config/stk_config_clearpersistents.m 1970-01-01 01:00:00.000000000 +0100
+++ new/stk/inst/config/stk_config_clearpersistents.m 2015-06-22 08:42:21.000000000 +0200
@@ -0,0 +1,69 @@
+% STK_CONFIG_CLEARPERSISTENTS clears all persistent variables in STK
+
+% Copyright Notice
+%
+% Copyright (C) 2015 CentraleSupelec
+%
+% Author: Julien Bect
+
+% Copying Permission Statement
+%
+% This file is part of
+%
+% STK: a Small (Matlab/Octave) Toolbox for Kriging
+% (http://sourceforge.net/projects/kriging)
+%
+% STK is free software: you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation, either version 3 of the License, or (at your
+% option) any later version.
+%
+% STK is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+% License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with STK. If not, see http://www.gnu.org/licenses/.
+
+function stk_config_clearpersistents ()
+
+%--- Unlock all mlocked files --------------------------------------------------
+
+filenames = { ...
+ 'isoctave', ...
+ 'stk_optim_hasfmincon', ...
+ 'stk_options_set', ...
+ 'stk_parallel_engine_set', ...
+ 'stk_select_optimizer'};
+
+for i = 1:(length (filenames))
+ name = filenames{i};
+ if mislocked (name),
+ munlock (name);
+ end
+end
+
+%--- Clear all functions that contain persistent variables ---------------------
+
+filenames = { ...
+ 'isoctave', ...
+ 'stk_disp_progress', ...
+ 'stk_gausscov_iso', ...
+ 'stk_gausscov_aniso', ...
+ 'stk_materncov_aniso', ...
+ 'stk_materncov_iso', ...
+ 'stk_materncov32_aniso', ...
+ 'stk_materncov32_iso', ...
+ 'stk_materncov52_aniso', ...
+ 'stk_materncov52_iso', ...
+ 'stk_options_set', ...
+ 'stk_optim_hasfmincon', ...
+ 'stk_parallel_engine_set', ...
+ 'stk_select_optimizer'};
+
+for i = 1:(length (filenames))
+ clear (filenames{i});
+end
+
+end % function stk_config_clearpersistents
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/config/stk_config_path.m new/stk/inst/config/stk_config_path.m
--- old/stk/inst/config/stk_config_path.m 2015-05-17 17:16:28.000000000 +0200
+++ new/stk/inst/config/stk_config_path.m 2015-06-22 08:42:25.000000000 +0200
@@ -2,9 +2,10 @@
% Copyright Notice
%
+% Copyright (C) 2015 CentraleSupelec
% Copyright (C) 2012-2014 SUPELEC
%
-% Author: Julien Bect
+% Author: Julien Bect
% Copying Permission Statement
%
@@ -37,11 +38,13 @@
isoctave = (exist ('OCTAVE_VERSION', 'builtin') == 5);
% Are we using STK installed as an octave package ?
-if isoctave && (exist (fullfile (root, 'PKG_ADD'), 'file') == 2)
- STK_OCTAVE_PACKAGE = true;
- path = {}; % don't include root here (otherwise: infinite PKG_ADD loop)
+STK_OCTAVE_PACKAGE = true;
+
+% Don't include the root in the path when STK is used as an Octave package
+% (otherwise we get an infinite PKG_ADD loop)
+if STK_OCTAVE_PACKAGE
+ path = {};
else
- STK_OCTAVE_PACKAGE = false;
path = {root};
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/config/stk_config_rmpath.m new/stk/inst/config/stk_config_rmpath.m
--- old/stk/inst/config/stk_config_rmpath.m 2015-05-17 17:16:28.000000000 +0200
+++ new/stk/inst/config/stk_config_rmpath.m 2015-06-22 08:42:21.000000000 +0200
@@ -59,9 +59,9 @@
end
% Note: it is important NOT to remove STK's root folder at this point. Indeed,
-% in the case where STK is used as an Octave package, this would result in
-% calling PKG_DEL, and therefore stk_config_rmpath again, causing an infinite
-% loop.
+% in the case where STK is used as an Octave package, this would trigger the
+% PKG_DEL directive in stk_init.m, and therefore stk_config_rmpath again,
+% causing an infinite loop.
end % function stk_config_rmpath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/misc/distrib/stk_distrib_bivnorm_cdf.m new/stk/inst/misc/distrib/stk_distrib_bivnorm_cdf.m
--- old/stk/inst/misc/distrib/stk_distrib_bivnorm_cdf.m 2015-05-17 17:16:29.000000000 +0200
+++ new/stk/inst/misc/distrib/stk_distrib_bivnorm_cdf.m 2015-06-22 08:42:23.000000000 +0200
@@ -57,7 +57,10 @@
%--- Bring everything to a common size -----------------------------------------
-[z1, z2, sigma1, sigma2, rho] = stk_commonsize (z1, z2, sigma1, sigma2, rho);
+if ~ isequal (size (z1), size (z2), size (sigma1), size (sigma2), size (rho))
+ [z1, z2, sigma1, sigma2, rho] = stk_commonsize ...
+ (z1, z2, sigma1, sigma2, rho);
+end
p = nan (size (z1));
q = nan (size (z1));
@@ -99,7 +102,7 @@
b1p = (z1_ >= 0);
if any (b1p)
- [p(b1p) q(b1p)] = stk_distrib_normal_cdf (z2_(b1p), 0, sigma2_(b1));
+ [p(b1p) q(b1p)] = stk_distrib_normal_cdf (z2_(b1p), 0, sigma2_(b1p));
end
end % function handle_singular_case
@@ -151,7 +154,7 @@
%! [p, q] = stk_distrib_bivnorm_cdf ([inf 10], 0, 0, 1, 1, 0);
%! assert (p == 1.0);
%! assert (stk_isequal_tolrel (q, 7.619853024160489e-24, 1e-12))
-
+
%!test
%! [p, q] = stk_distrib_bivnorm_cdf ([inf inf], 0, 0, 1, 1, 0);
%! assert ((p == 1.0) && (q == 0.0))
@@ -177,7 +180,11 @@
%! [p, q] = stk_distrib_bivnorm_cdf ([10 inf], 0, 0, 1, 1, 0);
%! assert (p == 1.0);
%! assert (stk_isequal_tolrel (q, 7.619853024160489e-24, 1e-12))
-
+
%!test
%! [p, q] = stk_distrib_bivnorm_cdf ([inf inf], 0, 0, 1, 1, 0);
%! assert ((p == 1.0) && (q == 0.0))
+
+%!test % A mixture of singular and non-singular cases
+%! p = stk_distrib_bivnorm_cdf ([0 0], 0, 0, [1; 0], 1, 0);
+%! assert (isequal (p, [0.25; 0.5]));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/misc/distrib/stk_distrib_normal_cdf.m new/stk/inst/misc/distrib/stk_distrib_normal_cdf.m
--- old/stk/inst/misc/distrib/stk_distrib_normal_cdf.m 2015-05-17 17:16:29.000000000 +0200
+++ new/stk/inst/misc/distrib/stk_distrib_normal_cdf.m 2015-06-22 08:42:23.000000000 +0200
@@ -54,7 +54,9 @@
k1 = false;
end
else
- [z, sigma] = stk_commonsize (z, sigma);
+ if ~ isequal (size (z), size (sigma))
+ [z, sigma] = stk_commonsize (z, sigma);
+ end
k0 = (sigma == 0);
k1 = (sigma > 0);
z(k1) = z(k1) ./ sigma(k1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/paramestim/stk_param_estim.m new/stk/inst/paramestim/stk_param_estim.m
--- old/stk/inst/paramestim/stk_param_estim.m 2015-05-17 17:16:30.000000000 +0200
+++ new/stk/inst/paramestim/stk_param_estim.m 2015-06-22 08:42:24.000000000 +0200
@@ -29,6 +29,7 @@
% Copyright Notice
%
+% Copyright (C) 2015 CentraleSupelec
% Copyright (C) 2014 SUPELEC & A. Ravisankar
% Copyright (C) 2011-2013 SUPELEC
%
@@ -88,7 +89,7 @@
% Should we estimate the variance of the noise, too ?
if ~ isempty (lnv0)
- % param0lnv present => noise variance *must* be estimated
+ % lnv0 present => noise variance *must* be estimated
do_estim_lnv = true;
else
% Otherwise, noise variance estimation happens when lnv has NaNs
@@ -274,16 +275,20 @@
function [lblnv,ublnv] = get_default_bounds_lnv ... % --------------------------
- (model, param0lnv, xi, zi) %#ok<INUSL>
+ (model, lnv0, xi, zi) %#ok<INUSL>
-% assume NOISEESTIM
-% constants
TOLVAR = 0.5;
-% bounds for the variance parameter
+% Bounds for the variance parameter
empirical_variance = var(zi);
-lblnv = log(eps);
-ublnv = log(empirical_variance) + TOLVAR;
+lblnv = log (eps);
+ublnv = log (empirical_variance) + TOLVAR;
+
+% Make sure that lnv0 falls within the bounds
+if ~ isempty (lnv0)
+ lblnv = min (lblnv, lnv0 - TOLVAR);
+ ublnv = max (ublnv, lnv0 + TOLVAR);
+end
end % function get_default_bounds_lnv ------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/stk_init.m new/stk/inst/stk_init.m
--- old/stk/inst/stk_init.m 1970-01-01 01:00:00.000000000 +0100
+++ new/stk/inst/stk_init.m 2015-06-22 08:42:25.000000000 +0200
@@ -0,0 +1,95 @@
+% STK_INIT initializes the STK
+%
+% CALL: stk_init()
+%
+% STK_INIT sets paths and environment variables
+
+% Copyright Notice
+%
+% Copyright (C) 2015 CentraleSupelec
+% Copyright (C) 2011-2014 SUPELEC
+%
+% Authors: Julien Bect
+% Emmanuel Vazquez
+
+% Copying Permission Statement
+%
+% This file is part of
+%
+% STK: a Small (Matlab/Octave) Toolbox for Kriging
+% (http://sourceforge.net/projects/kriging)
+%
+% STK is free software: you can redistribute it and/or modify it under
+% the terms of the GNU General Public License as published by the Free
+% Software Foundation, either version 3 of the License, or (at your
+% option) any later version.
+%
+% STK is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+% License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with STK. If not, see http://www.gnu.org/licenses/.
+
+%% PKG_ADD: stk_init ();
+
+%% PKG_DEL: stk_init (true);
+
+function stk_init (do_quit)
+
+% Deduce the root of STK from the path to this script
+root = fileparts (mfilename ('fullpath'));
+config = fullfile (root, 'config');
+
+% Add config to the path. It will be removed at the end of this script.
+addpath (config);
+
+% Unlock all possibly mlock-ed STK files and clear all STK functions
+% that contain persistent variables
+stk_config_clearpersistents ();
+
+if (nargin > 0) && (do_quit)
+
+ % Remove STK subdirectories from the path
+ stk_config_rmpath (root);
+
+ % No need to remove config manually at the end of the script since
+ % it is removed by stk_config_rmpath. We can exit.
+ return
+
+end
+
+% Activate the MOLE
+stk_config_mole (root);
+
+% Are we using STK installed as an octave package ?
+STK_OCTAVE_PACKAGE = true;
+
+% Build MEX-files "in-place" (unless STK is used as an Octave package)
+if ~ STK_OCTAVE_PACKAGE
+ stk_config_buildmex ();
+ % To force recompilation of all MEX-files, use stk_config_buildmex (true);
+end
+
+% Add STK folders to the path (note: doing this ATFER building the MEX-files
+% seems to solve the problem related to having MEX-files in private folders)
+stk_config_addpath (root);
+
+% Check that MEX-files located in private folders are properly detected (note:
+% there are no MEX-files in private folders if STK is used as an Octave package)
+if isoctave && (~ STK_OCTAVE_PACKAGE),
+ stk_config_testprivatemex ();
+end
+
+% Configure STK with default settings
+stk_config_setup;
+
+% Uncomment this line if you want to see a lot of details about the internals
+% of stk_dataframe and stk_factorialdesign objects:
+% stk_options_set ('stk_dataframe', 'disp_format', 'verbose');
+
+% Remove config from the path
+rmpath (config);
+
+end % function stk_init
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/inst/stk_version.m new/stk/inst/stk_version.m
--- old/stk/inst/stk_version.m 2015-05-17 17:16:30.000000000 +0200
+++ new/stk/inst/stk_version.m 2015-06-22 08:42:24.000000000 +0200
@@ -29,6 +29,6 @@
function v = stk_version ()
-v = '2.3.0';
+v = '2.3.1';
end % function stk_version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stk/post_install.m new/stk/post_install.m
--- old/stk/post_install.m 2015-05-17 17:16:30.000000000 +0200
+++ new/stk/post_install.m 2015-06-22 08:42:25.000000000 +0200
@@ -8,26 +8,4 @@
stk_config_mole (root, false, true);
rmpath (config);
- # PKG_ADD/PKG_DEL (see design notes below)
- movefile (fullfile (root, "PKG_ADD.m"), ...
- fullfile (root, "PKG_ADD"));
- movefile (fullfile (root, "PKG_DEL.m"), ...
- fullfile (root, "PKG_DEL"));
-
endfunction
-
-
-# ~~~~~ DESIGN NOTES ~~~~~
-#
-# The following approaches didn't work:
-#
-# 1) PKG_ADD/PKG_DEL (without .m) at the package root
-#
-# The files are copied to the arch-dependent directory,
-# which is not where we want them to be.
-#
-# 2) PKG_ADD/PKG_DEL (without .m) in ./inst
-#
-# The files are not copied at all. Pity.
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~