Update of /cvsroot/pure-data/externals/iem/iemmatrix/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9539/src
Modified Files: mtx_diegg.c Log Message: fixed mtx_diegg and tests (it was really inconsistent)
Index: mtx_diegg.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_diegg.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mtx_diegg.c 29 Mar 2006 12:07:52 -0000 1.3 --- mtx_diegg.c 3 Jan 2008 13:07:48 -0000 1.4 *************** *** 22,26 **** if(row*col>argc-2)post("mtx_diegg: sparse matrices not yet supported : use "mtx_check""); else { ! for(n=0;n<length;n++, dummy++)SETFLOAT(dummy, atom_getfloat(argv+(n-1)*(col-1))); outlet_list(x->x_obj.ob_outlet, gensym("diegg"), length, ap); } --- 22,29 ---- if(row*col>argc-2)post("mtx_diegg: sparse matrices not yet supported : use "mtx_check""); else { ! for(n=0;n<length;n++, dummy++){ ! int index=(n+1)*(col-1); ! SETFLOAT(dummy, atom_getfloat(argv+index)); ! } outlet_list(x->x_obj.ob_outlet, gensym("diegg"), length, ap); } *************** *** 35,43 ****
if(!argc)return(x); ! x->atombuffer = (t_atom *)getbytes((argc*argc+2)*sizeof(t_atom)); ! setdimen(x, argc, argc); ! matrix_set(x, 0); ! argv+=argc-1; ! while(argc--)SETFLOAT(x->atombuffer+2+argc*(1+x->col), atom_getfloat(argv--));
return (x); --- 38,43 ----
if(!argc)return(x); ! ! matrix_diegg(x, s, argc, argv);
return (x);