Moved +dseries/initialize.m to @dseries/initialize.m

To initialize the toolbox:

 - Add the `src` folder in the path
 - run `dseries().initialize()`

This is an Octave compatibily workaround, Octrave cannot handle
simultaneously +folder (namespace) and @folder (class).
parent f19b0931
Pipeline #634 failed with stage
in 9 seconds
function initialize()
function initialize(fake)
% Copyright (C) 2015-2018 Dynare Team
%
......@@ -16,7 +16,7 @@ function initialize()
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% Get the path to the dseries toolbox.
dseries_src_root = strrep(which('dseries.initialize'),'+dseries/initialize.m','');
dseries_src_root = strrep(which('@dseries/initialize'),'@dseries/initialize.m','');
% Check that the x13 binary is available
nox13 = false;
......@@ -65,8 +65,7 @@ if ~exist('isint','file')
end
if ~exist('isoctave','file')
addpath([dseries_src_root 'utilities/missing/isoctave']);
%p{end+1} = 'utilities/missing/isoctave';
p{end+1} = 'utilities/missing/isoctave';
end
if ~exist('shiftS','file')
......@@ -85,7 +84,7 @@ if ~exist('ndim','file')
p{end+1} = 'utilities/missing/ndim';
end
if ~isoctave && (~exist('rows','file') || ~exist('columns','file'))
if ~exist('OCTAVE_VERSION') && (~exist('rows','file') || ~exist('columns','file'))
p{end+1} = 'utilities/missing/dims';
end
......@@ -97,7 +96,7 @@ if ~exist('get_file_extension','file')
p{end+1} = 'utilities/missing/get_file_extension';
end
if isoctave && ~exist('user_has_octave_forge_package','file')
if exist('OCTAVE_VERSION') && ~exist('user_has_octave_forge_package','file')
p{end+1} = 'utilities/missing/user_has_octave_forge_package';
end
......
......@@ -83,6 +83,8 @@ switch S(1).type
end
case 'struct'
r = dseries2struct(o);
case 'initialize'
initialize(o);
case {'baxter_king_filter', 'baxter_king_filter_', ...
'cumsum','cumsum_', ...
'insert', ...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment