Diff of /inst/@dataframe/private/df_basecomp.m [7c0880] .. [45a112]  Maximize  Restore

Switch to unified view

a/inst/@dataframe/private/df_basecomp.m b/inst/@dataframe/private/df_basecomp.m
...
...
56
    case 'mldivide'
56
    case 'mldivide'
57
      if (isscalar (A)), 
57
      if (isscalar (A)), 
58
        Csize = size (B)(1:2);
58
        Csize = size (B)(1:2);
59
      else
59
      else
60
        if (size (A, 1) ~= size (B, 1))
60
        if (size (A, 1) ~= size (B, 1))
61
          error ("Non compatible row sizes (op1 is %dx%d, op2 is %dx%d)",\
61
          error ("Non compatible row sizes (op1 is %dx%d, op2 is %dx%d)",...
62
                 size (A), size (B)(1:2));
62
                 size (A), size (B)(1:2));
63
        endif
63
        endif
64
        Csize = [size(A, 2) size(B, 2)];
64
        Csize = [size(A, 2) size(B, 2)];
65
      endif
65
      endif
66
    otherwise
66
    otherwise
...
...
68
      if ((~(isscalar (A) || isscalar (B)))||(strict && isscalar (A)))
68
      if ((~(isscalar (A) || isscalar (B)))||(strict && isscalar (A)))
69
        if (itercol), %# requires full compatibility
69
        if (itercol), %# requires full compatibility
70
          Csize = size (A)(1:2);
70
          Csize = size (A)(1:2);
71
          if (any (Csize - size (B)(1:2)))
71
          if (any (Csize - size (B)(1:2)))
72
            %# disp([size(A) size(B)])
72
            %# disp([size(A) size(B)])
73
            error ("Non compatible row and columns sizes (op1 is %dx%d, op2 is %dx%d)",\
73
            error ("Non compatible row and columns sizes (op1 is %dx%d, op2 is %dx%d)",...
74
                   Csize, size (B));
74
                   Csize, size (B));
75
          endif
75
          endif
76
        else %# compatibility with matrix product
76
        else %# compatibility with matrix product
77
          if (size (A, 2) - size (B, 1)),
77
          if (size (A, 2) - size (B, 1)),
78
            error ("Non compatible columns vs. rows size (op1 is %dx%d, op2 is %dx%d)",\
78
            error ("Non compatible columns vs. rows size (op1 is %dx%d, op2 is %dx%d)",...
79
                  size (A)(1:2), size (B)(1:2));
79
                  size (A)(1:2), size (B)(1:2));
80
          endif
80
          endif
81
          Csize = [size(A, 1) size(B, 2)];
81
          Csize = [size(A, 1) size(B, 2)];
82
        endif
82
        endif
83
      endif
83
      endif
...
...
111
            idxB = 2; %# row-col comparsion
111
            idxB = 2; %# row-col comparsion
112
          endif
112
          endif
113
          
113
          
114
          if (~isempty (A._name{1})) 
114
          if (~isempty (A._name{1})) 
115
            if (~isempty (B._name{idxB}))
115
            if (~isempty (B._name{idxB}))
116
              dummy = ~(strcmp (cellstr (A._name{1}), cellstr (B._name{idxB}))\
116
              dummy = ~(strcmp (cellstr (A._name{1}), cellstr (B._name{idxB}))...
117
                        | (A._over{1}(:)) | (B._over{idxB}(:)));
117
                        | (A._over{1}(:)) | (B._over{idxB}(:)));
118
              if (any (dummy))
118
              if (any (dummy))
119
                if (itercol),
119
                if (itercol),
120
                  error ("Incompatible row names");
120
                  error ("Incompatible row names");
121
                else
121
                else
...
...
136
          
136
          
137
          idxB = 3-idxB;
137
          idxB = 3-idxB;
138
          
138
          
139
          if (~isempty(A._name{2}))
139
          if (~isempty(A._name{2}))
140
            if (~isempty(B._name{idxB}))
140
            if (~isempty(B._name{idxB}))
141
              dummy = ~(strcmp (cellstr (A._name{2}), cellstr (B._name{2}))\
141
              dummy = ~(strcmp (cellstr (A._name{2}), cellstr (B._name{2}))...
142
                        | (A._over{2}(:)) | (B._over{2}(:)));
142
                        | (A._over{2}(:)) | (B._over{2}(:)));
143
              if (any (dummy)),
143
              if (any (dummy)),
144
                if (itercol),
144
                if (itercol),
145
                  error ("Incompatible column vs row names");
145
                  error ("Incompatible column vs row names");
146
                else
146
                else

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks