=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/engine/mat.c,v retrieving revision 1.5 retrieving revision 1.7 diff -u -p -r1.5 -r1.7 --- OpenXM_contrib2/asir2000/engine/mat.c 2002/03/01 06:27:23 1.5 +++ OpenXM_contrib2/asir2000/engine/mat.c 2002/05/27 03:00:12 1.7 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/engine/mat.c,v 1.4 2002/01/04 17:08:23 saito Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/engine/mat.c,v 1.6 2002/04/10 02:59:10 saito Exp $ */ #include "ca.h" #include "../parse/parse.h" @@ -455,6 +455,34 @@ MAT a,b,*c; /* C21 = w1+u1+A22*(B21-t2) */ submat(vl, b21, t2, &ans1); mulmatmat(vl, a22, ans1, &ans2); + addmat(vl, w1, u1, &ans1); + addmat(vl, ans1, ans2, &c21); + + /* C22 = w1 + u1 + v1 */ + addmat(vl, ans1, v1, &c22); + } + + for(i =0; irow; i++) { + for ( j=0; j < c11->col; j++) { + t->body[i][j] = c11->body[i][j]; + } + } + if (pflag1 == 0) { + k = c21->row; + } else { + k = c21->row - 1; + } + for(i =0; icol; j++) { + t->body[i+c11->row][j] = c21->body[i][j]; + } + } + if (pflag2 == 0) { + h = c12->col; + } else { + h = c12->col -1; + } + for(i =0; irow; i++) { for ( j=0; j < k; j++) { t->body[i][j+c11->col] = c12->body[i][j]; } @@ -495,6 +523,9 @@ VECT *c; else if ( a->col != b->len ) { *c = 0; error("mulmatvect : size mismatch"); } else { + for ( i = 0; i < b->len; i++ ) + if ( BDY(b)[i] && OID((Obj)BDY(b)[i]) > O_R ) + error("mulmatvect : invalid argument"); arow = a->row; m = a->col; MKVECT(t,arow); for ( i = 0; i < arow; i++ ) { @@ -522,6 +553,9 @@ VECT *c; else if ( a->len != b->row ) { *c = 0; error("mulvectmat : size mismatch"); } else { + for ( i = 0; i < a->len; i++ ) + if ( BDY(a)[i] && OID((Obj)BDY(a)[i]) > O_R ) + error("mulvectmat : invalid argument"); bcol = b->col; m = a->len; MKVECT(t,bcol); for ( j = 0; j < bcol; j++ ) {