From 1a8cba5d26467ad158c5b54b9916f92746d4a8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Thu, 11 May 2017 00:04:26 +0200 Subject: [PATCH] Removed @dynTimeIndex class (unused). --- matlab/@dynTimeIndex/display.m | 20 -------- matlab/@dynTimeIndex/dynTimeIndex.m | 61 ------------------------ matlab/@dynTimeIndex/minus.m | 62 ------------------------ matlab/@dynTimeIndex/mpower.m | 74 ----------------------------- matlab/@dynTimeIndex/plus.m | 62 ------------------------ matlab/@dynTimeIndex/subsasgn.m | 20 -------- matlab/@dynTimeIndex/subsref.m | 54 --------------------- matlab/modules/dseries | 2 +- 8 files changed, 1 insertion(+), 354 deletions(-) delete mode 100644 matlab/@dynTimeIndex/display.m delete mode 100644 matlab/@dynTimeIndex/dynTimeIndex.m delete mode 100644 matlab/@dynTimeIndex/minus.m delete mode 100644 matlab/@dynTimeIndex/mpower.m delete mode 100644 matlab/@dynTimeIndex/plus.m delete mode 100644 matlab/@dynTimeIndex/subsasgn.m delete mode 100644 matlab/@dynTimeIndex/subsref.m diff --git a/matlab/@dynTimeIndex/display.m b/matlab/@dynTimeIndex/display.m deleted file mode 100644 index 87162fd40..000000000 --- a/matlab/@dynTimeIndex/display.m +++ /dev/null @@ -1,20 +0,0 @@ -function display(t) - -% Copyright (C) 2013 Dynare Team -% -% This file is part of Dynare. -% -% Dynare 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 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 . - -fprintf('%s = \n', inputname(1), int2str(t.index)); diff --git a/matlab/@dynTimeIndex/dynTimeIndex.m b/matlab/@dynTimeIndex/dynTimeIndex.m deleted file mode 100644 index 323122c4b..000000000 --- a/matlab/@dynTimeIndex/dynTimeIndex.m +++ /dev/null @@ -1,61 +0,0 @@ -function t = dynTimeIndex() % --*-- Unitary tests --*-- - -% t = dynTimeIndex() -% -% Constructor for the dynTimeIndex class. -% -% INPUTS: -% None. -% -% OUTPUTS: -% * t, dynTimeIndex object. -% -% DESCRIPTION: -% The dynTimeIndex object is used to shift backward or forward dseries objects. For instance, if ts -% is a dseries object and t is a dynTimeIndex object then the following expressions are equivalent: -% -% us = ts.lag() -% us = ts.lag(1) -% us = lag(ts,1) -% us = ts(t-1) -% -% This class has only one member: t = int8(0) when instantiated. - -% Copyright (C) 2013 Dynare Team -% -% This file is part of Dynare. -% -% Dynare 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 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 . - -t = struct(); - -t.index = int8(0); - -t = class(t,'dynTimeIndex'); - -%@test:1 -%$ % Instantiate a dynTimeIndex object -%$ try -%$ u = dynTimeIndex(); -%$ t(1) = 1; -%$ catch -%$ t(1) = 0; -%$ end -%$ -%$ if t(1) -%$ t(2) = isa(u,'dynTimeIndex'); -%$ end -%$ -%$ T = all(t); -%@eof:1 \ No newline at end of file diff --git a/matlab/@dynTimeIndex/minus.m b/matlab/@dynTimeIndex/minus.m deleted file mode 100644 index dff65f42d..000000000 --- a/matlab/@dynTimeIndex/minus.m +++ /dev/null @@ -1,62 +0,0 @@ -function C = minus(A,B) % --*-- Unitary tests --*-- - -% C = minus(A,B) -% -% Overloads binary minus operator. -% -% INPUTS: -% * A, dynTimeIndex object. -% * B, integer scalar. -% -% OUTPUTS: -% * C, dynTimeIndex object. -% -% EXAMPLE: -% -% >> t = dynTimeIndex(); -% >> t.index -% -% ans = -% -% 0 -% -% >> s = t-1; -% >> s.index -% -% ans = -% -% -1 -% - -% Copyright (C) 2013 Dynare Team -% -% This file is part of Dynare. -% -% Dynare 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 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 . - -if ~(isa(A,'dynTimeIndex') || isint(B)) - error(['dynTimeIndex::plus: Input arguments ''' inputname(1) ''' and ''' inputname(2) ''' must be a dynTimeIndex object and an integer!']) -end - -C = struct(); -C.index = A.index-B; -C = class(C,'dynTimeIndex'); - -%@test:1 -%$ a = dynTimeIndex(); -%$ b = a-1; -%$ t(1) = isa(b,'dynTimeIndex'); -%$ t(2) = isequal(b.index,-int8(1)); -%$ T = all(t); -%@eof:1 \ No newline at end of file diff --git a/matlab/@dynTimeIndex/mpower.m b/matlab/@dynTimeIndex/mpower.m deleted file mode 100644 index c4077caaa..000000000 --- a/matlab/@dynTimeIndex/mpower.m +++ /dev/null @@ -1,74 +0,0 @@ -function C = mpower(A,B) % --*-- Unitary tests --*-- - -% C = mpower(A,B) -% -% Overloads binary mpower operator (^). -% -% INPUTS : -% * A, dynTimeIndex object. -% * B, integer scalar. -% -% OUTPUTS : -% * C, dynTimeIndex object. -% -% EXAMPLE 1 : -% -% >> B = dynTimeIndex()-1; -% >> B -% B = -% >> B^4 -% ans = -% >> -% -% EXAMPLE 2 : -% This method can be used to apply the lead and lag methods an arbitrary number of times to a dseries object. For instance, if -% ts is a dseries object, and if we define -% -% >> B = dynTimeIndex()-1; -% >> F = dynTimeIndex()+1; -% -% B and F can be used as lag and lead operators and the following syntax: -% -% >> us = ts(F^2); -% -% is equivalent to -% -% >> us = ts.lead(2) -% -% or -% -% >> us = ts.lead.lead -% - -% Copyright (C) 2013 Dynare Team -% -% This file is part of Dynare. -% -% Dynare 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 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 . - -if ~(isa(A,'dynTimeIndex') || isint(B)) - error(['dynTimeIndex::mpower: Input arguments ''' inputname(1) ''' and ''' inputname(2) ''' must be a dynTimeIndex object and an integer!']) -end - -C = struct(); -C.index = A.index*B; -C = class(C,'dynTimeIndex'); - -%@test:1 -%$ a = dynTimeIndex()+1; -%$ b = a^2; -%$ t(1) = isa(b,'dynTimeIndex'); -%$ t(2) = isequal(b.index,int8(2)); -%$ T = all(t); -%@eof:1 \ No newline at end of file diff --git a/matlab/@dynTimeIndex/plus.m b/matlab/@dynTimeIndex/plus.m deleted file mode 100644 index 7b4752db9..000000000 --- a/matlab/@dynTimeIndex/plus.m +++ /dev/null @@ -1,62 +0,0 @@ -function C = plus(A,B) % --*-- Unitary tests --*-- - -% C = plus(A,B) -% -% Overloads binary plus operator. -% -% INPUTS: -% * A, dynTimeIndex object. -% * B, integer scalar. -% -% OUTPUTS: -% * C, dynTimeIndex object. -% -% EXAMPLE: -% -% >> t = dynTimeIndex(); -% >> t.index -% -% ans = -% -% 0 -% -% >> s = t+1; -% >> s.index -% -% ans = -% -% 1 -% - -% Copyright (C) 2013 Dynare Team -% -% This file is part of Dynare. -% -% Dynare 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 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 . - -if ~(isa(A,'dynTimeIndex') || isint(B)) - error(['dynTimeIndex::plus: Input arguments ''' inputname(1) ''' and ''' inputname(2) ''' must be a dynTimeIndex object and an integer!']) -end - -C = struct(); -C.index = A.index+B; -C = class(C,'dynTimeIndex'); - -%@test:1 -%$ a = dynTimeIndex(); -%$ b = a+1; -%$ t(1) = isa(b,'dynTimeIndex'); -%$ t(2) = isequal(b.index,int8(1)); -%$ T = all(t); -%@eof:1 \ No newline at end of file diff --git a/matlab/@dynTimeIndex/subsasgn.m b/matlab/@dynTimeIndex/subsasgn.m deleted file mode 100644 index 101468062..000000000 --- a/matlab/@dynTimeIndex/subsasgn.m +++ /dev/null @@ -1,20 +0,0 @@ -function val = subsasgn(val, idx, rhs) - -% Copyright (C) 2013 Dynare Team -% -% This file is part of Dynare. -% -% Dynare 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 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 . - -error('dynTimeIndex::subsasgn: Members of dynTimeIndex class are private!') \ No newline at end of file diff --git a/matlab/@dynTimeIndex/subsref.m b/matlab/@dynTimeIndex/subsref.m deleted file mode 100644 index 6c8aa79d4..000000000 --- a/matlab/@dynTimeIndex/subsref.m +++ /dev/null @@ -1,54 +0,0 @@ -function B = subsref(A,S) % --*-- Unitary tests --*-- - -% B = subsref(A,S) -% -% Overloads the subsref method for dynTimeIndex class. This method only allows to get -% the value of the field `index`. - -% Copyright (C) 2013 Dynare Team -% -% This file is part of Dynare. -% -% Dynare 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 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 . - -if length(S)>1 - error('dynTimeIndex::subsref: Something is wrong in your syntax!') -end - -if isequal(S.type,'.') - if isequal(S.subs,'index') - B = builtin('subsref', A, S(1)); - else - error(['dynTimeIndex::subsref: ' S.subs ' is not a known member!']) - end -else - error('dynTimeIndex::subsref: Something is wrong in your syntax!') -end - -%@test:1 -%$ % Instantiate a dynTimeIndex object -%$ u = dynTimeIndex(); -%$ try -%$ v = u.index; -%$ t(1) = 1; -%$ catch -%$ t(1) = 0; -%$ end -%$ -%$ if t(1) -%$ t(2) = isequal(v,int8(0)); -%$ end -%$ -%$ T = all(t); -%@eof:1 \ No newline at end of file diff --git a/matlab/modules/dseries b/matlab/modules/dseries index cd4bfdcf2..aa2fd884c 160000 --- a/matlab/modules/dseries +++ b/matlab/modules/dseries @@ -1 +1 @@ -Subproject commit cd4bfdcf296033c3263a3346491cfd478a508a52 +Subproject commit aa2fd884c09411a1bd1a58e458f80546a7b3cbf6