1// This file is part of the zpk module
2// Copyright (C) 2016 - Serge Steer - INRIA
3// This file is hereby licensed under the terms of the GNU GPL v2.0,
4// pursuant to article 5.3.4 of the CeCILL v.2.1.
5// For more information, see the COPYING file which you should have received
6// along with this program.
7function r = %zpk_o_zpk(s1, s2)
8    //r=s1==s2
9    //work around for bug 14800  (should be removed later)
10    if size(s1,"*")==1 then
11        [m,n]=size(s2);
12        r=s1.K==s2.K&s1.dt==s2.dt
13        for i=1:m
14            for j=1:n
15                r(i,j)=r(i,j)&s1.Z==s2(i,j).Z&s1.P==s2(i,j).P;
16            end
17        end
18    elseif size(s2,"*")==1 then
19        [m,n]=size(s1);
20        r=s1.K==s2.K&s1.dt==s2.dt
21        for i=1:m
22            for j=1:n
23                r(i,j)=r(i,j)&s2.Z==s1(i,j).Z&s2.P==s1(i,j).P;
24            end
25        end
26    else
27        //keep only this instruction after bug 14800 fix
28        r=s1.Z==s2.Z&s1.P==s2.P&s1.K==s2.K&s1.dt==s2.dt
29    end
30endfunction
31