Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dseries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dseries
Commits
48115cb8
Verified
Commit
48115cb8
authored
6 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Merged initialization routines (dates and dseries).
parent
9b33971f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/+dseries/initialize.m
+44
-29
44 additions, 29 deletions
src/+dseries/initialize.m
src/initialize_dates_toolbox.m
+0
-48
0 additions, 48 deletions
src/initialize_dates_toolbox.m
with
44 additions
and
77 deletions
src/initialize
_dseries_toolbox
.m
→
src/
+dseries/
initialize.m
+
44
−
29
View file @
48115cb8
function
initialize
_dseries_toolbox
()
function
initialize
()
% Copyright (C) 2015-2018 Dynare Team
%
...
...
@@ -15,15 +15,8 @@ function initialize_dseries_toolbox()
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% Check that the dates module is available.
try
initialize_dates_toolbox
;
catch
error
(
'Missing dependency: dates module is not available.'
)
end
% Get the path to the dseries toolbox.
dseries_src_root
=
strrep
(
which
(
'initialize
_
dseries
_toolbox'
),
'initialize_dseries_toolbox
.m'
,
''
);
dseries_src_root
=
strrep
(
which
(
'
dseries.
initialize
'
),
'+
dseries
/initialize
.m'
,
''
);
% Check that the x13 binary is available
nox13
=
false
;
...
...
@@ -48,57 +41,79 @@ if nox13
end
% Set the subfolders to be added in the path.
p
=
{
'/read'
;
...
'/utilities/is'
;
...
'/utilities/str'
;
...
'/utilities/insert'
;
...
'/utilities/file'
;
...
'/utilities/from'
;
...
'/utilities/print'
;
...
'/utilities/variables'
;
...
'/utilities/cumulate'
;
...
'/utilities/struct'
};
p
=
{
'read'
;
...
'utilities/is'
;
...
'utilities/op'
;
...
'utilities/convert'
;
...
'utilities/str'
;
...
'utilities/insert'
;
...
'utilities/file'
;
...
'utilities/from'
;
...
'utilities/print'
;
...
'utilities/variables'
;
...
'utilities/cumulate'
;
...
'utilities/struct'
};
% Add /utilities/x13' if x13 binary is available.
if
~
nox13
p
{
end
+
1
}
=
'
/
utilities/x13'
;
p
{
end
+
1
}
=
'utilities/x13'
;
end
% Add missing routines if dynare is not in the path
if
~
exist
(
'isint'
,
'file'
)
p
{
end
+
1
}
=
'utilities/missing/isint'
;
end
if
~
exist
(
'isoctave'
,
'file'
)
p
{
end
+
1
}
=
'utilities/missing/isoctave'
;
end
if
~
exist
(
'shiftS'
,
'file'
)
p
{
end
+
1
}
=
'utilities/missing/shiftS'
;
end
if
~
exist
(
'matlab_ver_less_than'
,
'file'
)
p
{
end
+
1
}
=
'utilities/missing/matlab_ver_less_than'
;
end
if
~
exist
(
'demean'
,
'file'
)
p
{
end
+
1
}
=
'
/
utilities/missing/demean'
;
p
{
end
+
1
}
=
'utilities/missing/demean'
;
end
if
~
exist
(
'ndim'
,
'file'
)
p
{
end
+
1
}
=
'/utilities/missing/ndim'
;
p
{
end
+
1
}
=
'utilities/missing/ndim'
;
end
if
~
isoctave
&&
(
~
exist
(
'rows'
,
'file'
)
||
~
exist
(
'columns'
,
'file'
))
p
{
end
+
1
}
=
'utilities/missing/dims'
;
end
if
~
exist
(
'sample_hp_filter'
,
'file'
)
p
{
end
+
1
}
=
'
/
utilities/missing/sample_hp_filter'
;
p
{
end
+
1
}
=
'utilities/missing/sample_hp_filter'
;
end
if
~
exist
(
'get_file_extension'
,
'file'
)
p
{
end
+
1
}
=
'
/
utilities/missing/get_file_extension'
;
p
{
end
+
1
}
=
'utilities/missing/get_file_extension'
;
end
if
isoctave
&&
~
exist
(
'user_has_octave_forge_package'
,
'file'
)
p
{
end
+
1
}
=
'
/
utilities/missing/user_has_octave_forge_package'
;
p
{
end
+
1
}
=
'utilities/missing/user_has_octave_forge_package'
;
end
if
~
exist
(
'get_cells_id'
,
'file'
)
p
{
end
+
1
}
=
'
/
utilities/missing/get_cells_id'
;
p
{
end
+
1
}
=
'utilities/missing/get_cells_id'
;
end
if
~
exist
(
'randomstring'
,
'file'
)
p
{
end
+
1
}
=
'
/
utilities/missing/randomstring'
;
p
{
end
+
1
}
=
'utilities/missing/randomstring'
;
end
if
~
exist
(
'one_sided_hp_filter'
,
'file'
)
p
{
end
+
1
}
=
'
/
utilities/missing/one_sided_hp_filter'
;
p
{
end
+
1
}
=
'utilities/missing/one_sided_hp_filter'
;
end
% Set path
P
=
cellfun
(
@
(
c
)[
dseries_src_root
(
1
:
end
-
1
)
c
],
p
,
'uni'
,
false
);
P
=
cellfun
(
@
(
c
)[
dseries_src_root
c
],
p
,
'uni'
,
false
);
addpath
(
P
{:});
assignin
(
'caller'
,
'dseries_src_root'
,
dseries_src_root
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/initialize_dates_toolbox.m
deleted
100644 → 0
+
0
−
48
View file @
9b33971f
% Copyright (C) 2014-2017 Dynare Team
%
% This code 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.
%
% Dynare dates submodule 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 Dynare. If not, see <http://www.gnu.org/licenses/>.
% Get the path to the dates/src folder.
dates_src_root
=
strrep
(
which
(
'initialize_dates_toolbox'
),
'initialize_dates_toolbox.m'
,
''
);
% Set the subfolders to be added in the path.
p
=
{
'/utilities/is'
;
...
'/utilities/op'
;
...
'/utilities/convert'
};
% Add missing routines if dynare is not in the path
if
~
exist
(
'isint'
,
'file'
)
p
{
end
+
1
}
=
'/utilities/missing/isint'
;
end
if
~
exist
(
'isoctave'
,
'file'
)
p
{
end
+
1
}
=
'/utilities/missing/isoctave'
;
end
if
~
exist
(
'shiftS'
,
'file'
)
p
{
end
+
1
}
=
'/utilities/missing/shiftS'
;
end
if
~
exist
(
'matlab_ver_less_than'
,
'file'
)
p
{
end
+
1
}
=
'/utilities/missing/matlab_ver_less_than'
;
end
% Set path
P
=
cellfun
(
@
(
c
)[
dates_src_root
(
1
:
end
-
1
)
c
],
p
,
'uni'
,
false
);
addpath
(
P
{:});
if
~
isoctave
&&
(
~
exist
(
'rows'
,
'file'
)
||
~
exist
(
'columns'
,
'file'
))
addpath
([
dates_src_root
(
1
:
end
-
1
)
'/utilities/missing/dims'
]);
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Stéphane Adjemian
@stepan-a
mentioned in commit
e232e940
·
6 years ago
mentioned in commit
e232e940
mentioned in commit e232e9407156e7d3a8a8b519d067c67334e8d964
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment