[PD-cvs] externals/iem/iemmatrix/src iemmatrix.h, 1.13, 1.14 mtx_bspline.c, 1.2, 1.3 mtx_cholesky.c, 1.3, 1.4 mtx_colon.c, 1.5, 1.6 mtx_concat.c, 1.5, 1.6 mtx_conv.c, 1.8, 1.9 mtx_cumsum.c, 1.6, 1.7 mtx_decay.c, 1.4, 1.5 mtx_diff.c, 1.6, 1.7 mtx_element.c, 1.5, 1.6 mtx_eq.c, 1.1, 1.2 mtx_fill.c, 1.10, 1.11 mtx_find.c, 1.7, 1.8 mtx_gauss.c, 1.4, 1.5 mtx_ge.c, 1.1, 1.2 mtx_gt.c, 1.1, 1.2 mtx_index.c, 1.6, 1.7 mtx_le.c, 1.1, 1.2 mtx_lt.c, 1.1, 1.2 mtx_minmax.c, 1.6, 1.7 mtx_mul~.c, 1.5, 1.6 mtx_neq.c, 1.1, 1.2 mtx_pivot.c, 1.4, 1.5 mtx_prod.c, 1.5, 1.6 mtx_repmat.c, 1.3, 1.4 mtx_resize.c, 1.4, 1.5 mtx_reverse.c, 1.7, 1.8 mtx_rowrfft.c, 1.8, 1.9 mtx_rowrifft.c, 1.8, 1.9 mtx_slice.c, 1.5, 1.6 mtx_sort.c, 1.5, 1.6 mtx_sum.c, 1.4, 1.5

IOhannes m zmölnig zmoelnig at users.sourceforge.net
Thu Jan 3 13:28:29 CET 2008


Update of /cvsroot/pure-data/externals/iem/iemmatrix/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28017

Modified Files:
	iemmatrix.h mtx_bspline.c mtx_cholesky.c mtx_colon.c 
	mtx_concat.c mtx_conv.c mtx_cumsum.c mtx_decay.c mtx_diff.c 
	mtx_element.c mtx_eq.c mtx_fill.c mtx_find.c mtx_gauss.c 
	mtx_ge.c mtx_gt.c mtx_index.c mtx_le.c mtx_lt.c mtx_minmax.c 
	mtx_mul~.c mtx_neq.c mtx_pivot.c mtx_prod.c mtx_repmat.c 
	mtx_resize.c mtx_reverse.c mtx_rowrfft.c mtx_rowrifft.c 
	mtx_slice.c mtx_sort.c mtx_sum.c 
Log Message:
pedantic and C99


Index: mtx_sort.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_sort.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtx_sort.c	26 Jul 2006 06:59:41 -0000	1.5
--- mtx_sort.c	3 Jan 2008 12:28:27 -0000	1.6
***************
*** 37,41 ****
     t_atom *list_in;
     t_float *x;
- //   t_float *y;
     t_float *i;
  };
--- 37,40 ----
***************
*** 49,54 ****
     if (mtx_sort_obj->x)
        freebytes (mtx_sort_obj->x, sizeof(t_float)*(mtx_sort_obj->size));
!    //if (mtx_sort_obj->y)
!    //   freebytes (mtx_sort_obj->y, sizeof(t_float)*(mtx_sort_obj->size));
     if (mtx_sort_obj->i)
        freebytes (mtx_sort_obj->i, sizeof(t_float)*(mtx_sort_obj->size));
--- 48,55 ----
     if (mtx_sort_obj->x)
        freebytes (mtx_sort_obj->x, sizeof(t_float)*(mtx_sort_obj->size));
!    /*
!      if (mtx_sort_obj->y)
!        freebytes (mtx_sort_obj->y, sizeof(t_float)*(mtx_sort_obj->size));
!    */
     if (mtx_sort_obj->i)
        freebytes (mtx_sort_obj->i, sizeof(t_float)*(mtx_sort_obj->size));
***************
*** 70,74 ****
     MTXSort *mtx_sort_obj = (MTXSort *) pd_new (mtx_sort_class);
     
!    // defaults:
     mTXSetSortMode (mtx_sort_obj, gensym(":"));
     mTXSetSortDirection (mtx_sort_obj, 1.0f);
--- 71,75 ----
     MTXSort *mtx_sort_obj = (MTXSort *) pd_new (mtx_sort_class);
     
!    /* defaults: */
     mTXSetSortMode (mtx_sort_obj, gensym(":"));
     mTXSetSortDirection (mtx_sort_obj, 1.0f);
***************
*** 244,252 ****
     t_atom *list_out2 = mtx_sort_obj->list_out2;
     t_float *x = mtx_sort_obj->x;
-    //t_float *y = mtx_sort_obj->y;
     t_float *i = mtx_sort_obj->i;
     int count;
  
!    // size check
     if (!size) {
        post("mtx_sort: invalid dimensions");
--- 245,252 ----
     t_atom *list_out2 = mtx_sort_obj->list_out2;
     t_float *x = mtx_sort_obj->x;
     t_float *i = mtx_sort_obj->i;
     int count;
  
!    /* size check */
     if (!size) {
        post("mtx_sort: invalid dimensions");
***************
*** 260,265 ****
        if (!x)
  	 x = (t_float *) getbytes (sizeof (t_float) * (size));
!       //if (!y)
!       //   y = (t_float *) getbytes (sizeof (t_float) * (size));
        if (!i)
  	 i = (t_float *) getbytes (sizeof (t_float) * (size));
--- 260,266 ----
        if (!x)
  	 x = (t_float *) getbytes (sizeof (t_float) * (size));
!       /*if (!y)
!        *   y = (t_float *) getbytes (sizeof (t_float) * (size));
!        */
        if (!i)
  	 i = (t_float *) getbytes (sizeof (t_float) * (size));
***************
*** 271,288 ****
     else if (size != mtx_sort_obj->size) {
        x = (t_float *) resizebytes (x,
! 	    sizeof (t_float) * (mtx_sort_obj->size),
! 	    sizeof (t_float) * (size));
!       //y = (t_float *) resizebytes (y,
!       //    sizeof (t_float) * (mtx_sort_obj->size),
!       //    sizeof (t_float) * (size));
        i = (t_float *) resizebytes (i,
! 	    sizeof (t_float) * (mtx_sort_obj->size),
! 	    sizeof (t_float) * (size));
        list_out1 = (t_atom *) resizebytes (list_out1,
! 	    sizeof (t_atom) * (mtx_sort_obj->size+2),
! 	    sizeof (t_atom) * (size + 2));
        list_out2 = (t_atom *) resizebytes (list_out2,
! 	    sizeof (t_atom) * (mtx_sort_obj->size+2),
! 	    sizeof (t_atom) * (size + 2));
     }
  
--- 272,286 ----
     else if (size != mtx_sort_obj->size) {
        x = (t_float *) resizebytes (x,
!                                    sizeof (t_float) * (mtx_sort_obj->size),
!                                    sizeof (t_float) * (size));
        i = (t_float *) resizebytes (i,
!                                    sizeof (t_float) * (mtx_sort_obj->size),
!                                    sizeof (t_float) * (size));
        list_out1 = (t_atom *) resizebytes (list_out1,
!                                           sizeof (t_atom) * (mtx_sort_obj->size+2),
!                                           sizeof (t_atom) * (size + 2));
        list_out2 = (t_atom *) resizebytes (list_out2,
!                                           sizeof (t_atom) * (mtx_sort_obj->size+2),
!                                           sizeof (t_atom) * (size + 2));
     }
  
***************
*** 290,294 ****
     mtx_sort_obj->list_out2 = list_out2;
     mtx_sort_obj->x = x;
-   // mtx_sort_obj->y = y;
     mtx_sort_obj->i = i;
     mtx_sort_obj->size = size;
--- 288,291 ----
***************
*** 296,304 ****
     mtx_sort_obj->columns = columns;
  
!    // generating indexing vector
     indexingVector (size, columns, mtx_sort_obj->sort_mode, i);
  
!    // main part
!    // reading matrix from inlet
     if ((mtx_sort_obj->sort_mode == col_sym)||
  	(mtx_sort_obj->sort_mode == col_sym2)) {
--- 293,301 ----
     mtx_sort_obj->columns = columns;
  
!    /* generating indexing vector */
     indexingVector (size, columns, mtx_sort_obj->sort_mode, i);
  
!    /* main part */
!    /* reading matrix from inlet */
     if ((mtx_sort_obj->sort_mode == col_sym)||
  	(mtx_sort_obj->sort_mode == col_sym2)) {
***************
*** 310,314 ****
        readFloatFromList (size, list_ptr, x);
     
!    // calculating sort
     if ((mtx_sort_obj->sort_mode != col_sym) &&
  	 (mtx_sort_obj->sort_mode != col_sym2) &&
--- 307,311 ----
        readFloatFromList (size, list_ptr, x);
     
!    /* calculating sort */
     if ((mtx_sort_obj->sort_mode != col_sym) &&
  	 (mtx_sort_obj->sort_mode != col_sym2) &&
***************
*** 321,325 ****
     i = mtx_sort_obj->i;
  
!    // writing matrix to outlet
     if ((mtx_sort_obj->sort_mode == col_sym)||
  	 (mtx_sort_obj->sort_mode == col_sym2)) {
--- 318,322 ----
     i = mtx_sort_obj->i;
  
!    /* writing matrix to outlet */
     if ((mtx_sort_obj->sort_mode == col_sym)||
  	 (mtx_sort_obj->sort_mode == col_sym2)) {
***************
*** 334,338 ****
     }
  
!    // writing indices
     SETSYMBOL(list_out2, gensym("matrix"));
     SETFLOAT(list_out2, rows);
--- 331,335 ----
     }
  
!    /* writing indices */
     SETSYMBOL(list_out2, gensym("matrix"));
     SETFLOAT(list_out2, rows);
***************
*** 340,344 ****
     outlet_anything(mtx_sort_obj->list_outlet2, gensym("matrix"), 
  	 mtx_sort_obj->size+2, list_out2);
!    // writing sorted values
     SETSYMBOL(list_out1, gensym("matrix"));
     SETFLOAT(list_out1, rows);
--- 337,341 ----
     outlet_anything(mtx_sort_obj->list_outlet2, gensym("matrix"), 
  	 mtx_sort_obj->size+2, list_out2);
!    /* writing sorted values */
     SETSYMBOL(list_out1, gensym("matrix"));
     SETFLOAT(list_out1, rows);
***************
*** 359,363 ****
     class_addmethod (mtx_sort_class, (t_method) mTXSortMatrix, gensym("matrix"), A_GIMME,0);
     class_addmethod (mtx_sort_class, (t_method) mTXSetSortMode, gensym("mode"), A_DEFSYMBOL,0);
- //   class_addmethod (mtx_sort_class, (t_method) mTXSetSortDimension, gensym("dimension"), A_DEFFLOAT,0);
     class_addmethod (mtx_sort_class, (t_method) mTXSetSortDirection, gensym("direction"), A_DEFFLOAT,0);
  
--- 356,359 ----

Index: mtx_element.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_element.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtx_element.c	29 Mar 2006 12:07:52 -0000	1.5
--- mtx_element.c	3 Jan 2008 12:28:26 -0000	1.6
***************
*** 56,60 ****
        count=x->col;
        while(count--)SETFLOAT(&ap[count], f);
!     } else { // x->current_row==0
        ap+=x->current_col-1;
        count=x->row;
--- 56,60 ----
        count=x->col;
        while(count--)SETFLOAT(&ap[count], f);
!     } else {
        ap+=x->current_col-1;
        count=x->row;

Index: mtx_cholesky.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_cholesky.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mtx_cholesky.c	29 Mar 2006 12:07:52 -0000	1.3
--- mtx_cholesky.c	3 Jan 2008 12:28:26 -0000	1.4
***************
*** 41,58 ****
    }
  
!   // reserve memory for outputting afterwards
    adjustsize(x, row, row);
!   // 1. get the 2 matrices : orig; invert (create as eye, but will be orig^(-1))
    cholesky = (t_matrixfloat *)getbytes(sizeof(t_matrixfloat)*row2);
!   // 1a extract values of A to float-buf
    original=matrix2float(argv);
  
!   // 2 set the cholesky matrix to zero
    for(i=0; i<row2; i++)cholesky[i]=0.;
  
!   // 3 do the cholesky decomposition
    for(i=0; i<col; i++){
!     // 3a get the diagonal element
!     // l_ii=sqrt(a_ii-sum(k=1..i-1)((l_ik)^2))
      t_matrixfloat sum=0.;
      t_matrixfloat result=0.f;
--- 41,58 ----
    }
  
!   /* reserve memory for outputting afterwards */
    adjustsize(x, row, row);
!   /* 1. get the 2 matrices : orig; invert (create as eye, but will be orig^(-1)) */
    cholesky = (t_matrixfloat *)getbytes(sizeof(t_matrixfloat)*row2);
!   /* 1a extract values of A to float-buf */
    original=matrix2float(argv);
  
!   /* 2 set the cholesky matrix to zero */
    for(i=0; i<row2; i++)cholesky[i]=0.;
  
!   /* 3 do the cholesky decomposition */
    for(i=0; i<col; i++){
!     /* 3a get the diagonal element */
!     /* l_ii=sqrt(a_ii-sum(k=1..i-1)((l_ik)^2)) */
      t_matrixfloat sum=0.;
      t_matrixfloat result=0.f;
***************
*** 66,73 ****
        return;
      }
!     result=sqrtf(result); // LATER check whether this is real
      cholesky[i*(col+1)]=result;
!     // 3b get the other elements within this row/col
!     // l_ji=(a_ji-sum(k=1..i-1)(l_jk*l_ik))/l_ii
      for(j=i+1; j<row; j++){
        sum=0.;
--- 66,73 ----
        return;
      }
!     result=sqrtf(result); /* LATER check whether this is real */
      cholesky[i*(col+1)]=result;
!     /* 3b get the other elements within this row/col */
!     /* l_ji=(a_ji-sum(k=1..i-1)(l_jk*l_ik))/l_ii */
      for(j=i+1; j<row; j++){
        sum=0.;
***************
*** 82,92 ****
    }
  
!   // 4. output the matrix
!   // 4a convert the floatbuf to an atombuf;
    float2matrix(x->atombuffer, cholesky);
!   // 4b destroy the buffers
    freebytes(original, sizeof(t_matrixfloat)*row2);
  
!   // 4c output the atombuf;
    matrix_bang(x);
  }
--- 82,92 ----
    }
  
!   /* 4. output the matrix */
!   /* 4a convert the floatbuf to an atombuf; */
    float2matrix(x->atombuffer, cholesky);
!   /* 4b destroy the buffers */
    freebytes(original, sizeof(t_matrixfloat)*row2);
  
!   /* 4c output the atombuf; */
    matrix_bang(x);
  }

Index: mtx_fill.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_fill.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** mtx_fill.c	12 Nov 2006 12:56:06 -0000	1.10
--- mtx_fill.c	3 Jan 2008 12:28:27 -0000	1.11
***************
*** 104,108 ****
     int *idx = mtx_fill_obj->index;
  
!    // size check
     if (!size) {
        mtx_fill_obj->fill_type = DONT_FILL_JUST_PASS;
--- 104,108 ----
     int *idx = mtx_fill_obj->index;
  
!    /* size check */
     if (!size) {
        mtx_fill_obj->fill_type = DONT_FILL_JUST_PASS;
***************
*** 176,180 ****
     t_atom *list_out = mtx_fill_obj->list_out;
  
!    // size check
     if (!size) {
        post("mtx_fill: invalid dimensions");
--- 176,180 ----
     t_atom *list_out = mtx_fill_obj->list_out;
  
!    /* size check */
     if (!size) {
        post("mtx_fill: invalid dimensions");
***************
*** 237,241 ****
  	    return;
  	 }
! 	 // main part
  	 writeFloatIndexedIntoMatrix (mtx_fill_obj->num_idcs_used,
  	       mtx_fill_obj->index, f,list_out+2);
--- 237,241 ----
  	    return;
  	 }
! 	 /* main part */
  	 writeFloatIndexedIntoMatrix (mtx_fill_obj->num_idcs_used,
  	       mtx_fill_obj->index, f,list_out+2);
***************
*** 265,269 ****
     }
  
!    // size check
     if (!list_size) {
        post("mtx_fill: invalid dimensions");
--- 265,269 ----
     }
  
!    /* size check */
     if (!list_size) {
        post("mtx_fill: invalid dimensions");
***************
*** 298,302 ****
     }
     
!    // main part
     switch (mtx_fill_obj->fill_type) {
        case FILL_SUBMATRIX:
--- 298,302 ----
     }
     
!    /* main part */
     switch (mtx_fill_obj->fill_type) {
        case FILL_SUBMATRIX:

Index: mtx_bspline.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_bspline.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mtx_bspline.c	6 Jun 2006 09:55:22 -0000	1.2
--- mtx_bspline.c	3 Jan 2008 12:28:26 -0000	1.3
***************
*** 103,109 ****
    mtx_bspline_resize(X, row, col);
  
!   //for(i=0; i<col*row; i++)post("mtx[%d]=%f", i, atom_getfloat(argv+2+i));
! 
!   /* 1st fill the matrix into the arrays */
    fp=matrix2float(argv);
  
--- 103,107 ----
    mtx_bspline_resize(X, row, col);
  
!     /* 1st fill the matrix into the arrays */
    fp=matrix2float(argv);
  
***************
*** 142,146 ****
  		-(y[j][i]-y[j][i-1])/u[j][i-1]);
  
!     // now solve this tridiagonal matrix
  
      for(i=1; i<N-1; i++)
--- 140,144 ----
  		-(y[j][i]-y[j][i-1])/u[j][i-1]);
  
!     /* now solve this tridiagonal matrix */
  
      for(i=1; i<N-1; i++)
***************
*** 159,163 ****
  static void mtx_bspline_list(t_mtx_spline *x, t_symbol *s, int argc, t_atom *argv)
  {
!   // this should output a matrix, one row for each element of this list
  }
  static void mtx_bspline_float(t_mtx_spline *X, t_float f)
--- 157,161 ----
  static void mtx_bspline_list(t_mtx_spline *x, t_symbol *s, int argc, t_atom *argv)
  {
!   /* this should output a matrix, one row for each element of this list */
  }
  static void mtx_bspline_float(t_mtx_spline *X, t_float f)
***************
*** 216,220 ****
    mtx_bspline_class = class_new(gensym("mtx_bspline"), (t_newmethod)mtx_bspline_new, (t_method)mtx_bspline_free,
                              sizeof(t_mtx_spline), 0, A_NULL);
!   //  class_addmethod(mtx_bspline_class, (t_method)mtx_bspline_matrix, gensym("list"), A_GIMME, 0);
    class_addmethod(mtx_bspline_class, (t_method)mtx_bspline_matrix2, gensym(""), A_GIMME, 0);
    class_addfloat (mtx_bspline_class, mtx_bspline_float);
--- 214,218 ----
    mtx_bspline_class = class_new(gensym("mtx_bspline"), (t_newmethod)mtx_bspline_new, (t_method)mtx_bspline_free,
                              sizeof(t_mtx_spline), 0, A_NULL);
!   /*  class_addmethod(mtx_bspline_class, (t_method)mtx_bspline_matrix, gensym("list"), A_GIMME, 0); */
    class_addmethod(mtx_bspline_class, (t_method)mtx_bspline_matrix2, gensym(""), A_GIMME, 0);
    class_addfloat (mtx_bspline_class, mtx_bspline_float);

Index: mtx_minmax.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_minmax.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mtx_minmax.c	29 Mar 2006 12:07:52 -0000	1.6
--- mtx_minmax.c	3 Jan 2008 12:28:27 -0000	1.7
***************
*** 28,32 ****
    int outsize;
    int mode;
!   int operator_minimum; // 1 if we are [mtx_min], 0 if we are [mtx_max]
  
    t_outlet *min_outlet;
--- 28,32 ----
    int outsize;
    int mode;
!   int operator_minimum; /* 1 if we are [mtx_min], 0 if we are [mtx_max] */
  
    t_outlet *min_outlet;
***************
*** 143,147 ****
    int elements_out;
    
!   // size check
    if (!size) {
      post("mtx_minmax: invalid dimensions");
--- 143,147 ----
    int elements_out;
    
!   /* size check */
    if (!size) {
      post("mtx_minmax: invalid dimensions");
***************
*** 172,176 ****
    mtx_minmax_obj->maxlist_out = maxlist_out;
    
!   // main part
    
    switch(mtx_minmax_obj->mode){
--- 172,176 ----
    mtx_minmax_obj->maxlist_out = maxlist_out;
    
!   /* main part */
    
    switch(mtx_minmax_obj->mode){

Index: mtx_conv.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_conv.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** mtx_conv.c	13 Nov 2006 15:20:25 -0000	1.8
--- mtx_conv.c	3 Jan 2008 12:28:26 -0000	1.9
***************
*** 222,226 ****
     t_atom *list_ptr = mtx_conv_obj->list;
  
!    // fftsize check
     if (!size){
        post("mtx_conv: invalid dimensions");
--- 222,226 ----
     t_atom *list_ptr = mtx_conv_obj->list;
  
!    /* fftsize check */
     if (!size){
        post("mtx_conv: invalid dimensions");
***************
*** 234,239 ****
     }
  
-    //   post("1");
- 
     if ((mtx_conv_obj->rows != rows)||(mtx_conv_obj->columns != columns)) { 
       if (mtx_conv_obj->x)
--- 234,237 ----
***************
*** 249,253 ****
       mtx_conv_obj->columns = columns;
     }
-    //post("2");
     rows_y = rows+rows_k-1;
     columns_y = columns+columns_k-1;
--- 247,250 ----
***************
*** 278,282 ****
  
     }
!    // main part
     readMatrixFromList (rows, columns, argv, mtx_conv_obj->x); 
  
--- 275,279 ----
  
     }
!    /* main part */
     readMatrixFromList (rows, columns, argv, mtx_conv_obj->x); 
  
***************
*** 290,294 ****
     outlet_anything(mtx_conv_obj->list_outlet, gensym("matrix"), 
                     size_y+2, list_ptr);
-    //post("7");
  }
  
--- 287,290 ----

Index: mtx_rowrfft.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_rowrfft.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** mtx_rowrfft.c	25 Aug 2007 09:27:45 -0000	1.8
--- mtx_rowrfft.c	3 Jan 2008 12:28:27 -0000	1.9
***************
*** 104,108 ****
  			      int argc, t_atom *argv)
  {
-   //mTXrowrfftList (x, s, argc-2, argv+2);
    int rows = atom_getint (argv++);
    int columns = atom_getint (argv++);
--- 104,107 ----
***************
*** 117,121 ****
    t_float *f_im = x->f_im;
  
!   // fftsize check
    if (!size)
      post("mtx_rowrfft: invalid dimensions");
--- 116,120 ----
    t_float *f_im = x->f_im;
  
!   /* fftsize check */
    if (!size)
      post("mtx_rowrfft: invalid dimensions");
***************
*** 128,132 ****
      /* ok, do the FFT! */
  
!     // memory things
      f_re=(t_float*)realloc(f_re, sizeof(t_float)*size);
      f_im=(t_float*)realloc(f_im, sizeof(t_float)*size);
--- 127,131 ----
      /* ok, do the FFT! */
  
!     /* memory things */
      f_re=(t_float*)realloc(f_re, sizeof(t_float)*size);
      f_im=(t_float*)realloc(f_im, sizeof(t_float)*size);
***************
*** 141,145 ****
      x->f_im = f_im;
  
!     // main part
      readFloatFromList (size, argv, f_re);
  
--- 140,144 ----
      x->f_im = f_im;
  
!     /* main part */
      readFloatFromList (size, argv, f_re);
  

Index: mtx_colon.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_colon.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtx_colon.c	26 Jul 2006 09:57:07 -0000	1.5
--- mtx_colon.c	3 Jan 2008 12:28:26 -0000	1.6
***************
*** 73,77 ****
        
     size = (int)((stopval- startval + step) / step);
-    //post("startval %f stopval %f step %f, size %d",startval, stopval, step, size);
     if (size) {
        if (size!=mtx_colon_obj->size) {
--- 73,76 ----

Index: mtx_gt.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_gt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mtx_gt.c	19 Sep 2005 12:51:27 -0000	1.1
--- mtx_gt.c	3 Jan 2008 12:28:27 -0000	1.2
***************
*** 19,23 ****
  
  /* the operator operates on integers instead of floats */
! //#define MTXBIN_GENERIC__INTEGEROP
  
  #include "mtx_binop_generic.h"
--- 19,23 ----
  
  /* the operator operates on integers instead of floats */
! /* #define MTXBIN_GENERIC__INTEGEROP */
  
  #include "mtx_binop_generic.h"

Index: mtx_sum.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_sum.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mtx_sum.c	12 Nov 2006 12:23:08 -0000	1.4
--- mtx_sum.c	3 Jan 2008 12:28:27 -0000	1.5
***************
*** 64,68 ****
  			     (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0);
    class_addlist  (mtx_sum_class, mtx_sum_list);
-   //  class_addbang  (mtx_sum_class, matrix_bang);
    class_addmethod(mtx_sum_class, (t_method)mtx_sum_matrix, gensym("matrix"), A_GIMME, 0);
  
--- 64,67 ----

Index: mtx_slice.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_slice.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtx_slice.c	25 Jul 2006 14:15:22 -0000	1.5
--- mtx_slice.c	3 Jan 2008 12:28:27 -0000	1.6
***************
*** 143,147 ****
    int slicecols, slicerows, slicesize;
  
!   // size check
    if (!size) {
      post("mtx_slice: invalid dimensions");
--- 143,147 ----
    int slicecols, slicerows, slicesize;
  
!   /* size check */
    if (!size) {
      post("mtx_slice: invalid dimensions");
***************
*** 173,177 ****
    slicesize = slicerows*slicecols;
  
!   // main part
    if (slicesize != mtx_slice_obj->slice_size) {
      if (!list_out)
--- 173,177 ----
    slicesize = slicerows*slicecols;
  
!   /* main part */
    if (slicesize != mtx_slice_obj->slice_size) {
      if (!list_out)

Index: mtx_index.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_index.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mtx_index.c	12 Nov 2006 12:23:08 -0000	1.6
--- mtx_index.c	3 Jan 2008 12:28:27 -0000	1.7
***************
*** 119,123 ****
     int max;
  
!    // size check
     if (!size) {
        post("mtx_index: invalid dimensions");
--- 119,123 ----
     int max;
  
!    /* size check */
     if (!size) {
        post("mtx_index: invalid dimensions");
***************
*** 168,172 ****
     int *indx = mtx_index_obj->index_in;
  
!    // size check
     if (!size) {
        post("mtx_index: invalid dimensions");
--- 168,172 ----
     int *indx = mtx_index_obj->index_in;
  
!    /* size check */
     if (!size) {
        post("mtx_index: invalid dimensions");
***************
*** 186,190 ****
        return;
     }
!    // main part
     list_out += 2;
     setAtomListConstFloat (mtx_index_obj->index_size, list_out, mtx_index_obj->fill_value);
--- 186,190 ----
        return;
     }
!    /* main part */
     list_out += 2;
     setAtomListConstFloat (mtx_index_obj->index_size, list_out, mtx_index_obj->fill_value);

Index: mtx_ge.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_ge.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mtx_ge.c	19 Sep 2005 12:51:27 -0000	1.1
--- mtx_ge.c	3 Jan 2008 12:28:27 -0000	1.2
***************
*** 19,23 ****
  
  /* the operator operates on integers instead of floats */
! //#define MTXBIN_GENERIC__INTEGEROP
  
  #include "mtx_binop_generic.h"
--- 19,23 ----
  
  /* the operator operates on integers instead of floats */
! /* #define MTXBIN_GENERIC__INTEGEROP */
  
  #include "mtx_binop_generic.h"

Index: mtx_concat.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_concat.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtx_concat.c	25 Jul 2006 14:15:22 -0000	1.5
--- mtx_concat.c	3 Jan 2008 12:28:26 -0000	1.6
***************
*** 150,154 ****
     t_matrix *mtx_out = &mtx_concat_obj->mtx_out;
  
!    // size check
     if (!size) {
        post("mtx_concat: invalid dimensions");
--- 150,154 ----
     t_matrix *mtx_out = &mtx_concat_obj->mtx_out;
  
!    /* size check */
     if (!size) {
        post("mtx_concat: invalid dimensions");
***************
*** 162,167 ****
     mtx_in1->col = columns;
     mtx_in1->atombuffer = argv;
! // alternatively to the above:
! //   matrix_matrix2 (mtx_in1, s, argc, argv);
  
     if (mtx_concat_obj->concat_mode == 0) {
--- 162,167 ----
     mtx_in1->col = columns;
     mtx_in1->atombuffer = argv;
!    /* alternatively to the above: */
!    /*   matrix_matrix2 (mtx_in1, s, argc, argv); */
  
     if (mtx_concat_obj->concat_mode == 0) {

Index: mtx_diff.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_diff.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mtx_diff.c	25 Jul 2006 14:15:22 -0000	1.6
--- mtx_diff.c	3 Jan 2008 12:28:26 -0000	1.7
***************
*** 151,155 ****
     int count;
  
!    // size check
     if (!size) {
        post("mtx_diff: invalid dimensions");
--- 151,155 ----
     int count;
  
!    /* size check */
     if (!size) {
        post("mtx_diff: invalid dimensions");
***************
*** 186,191 ****
     mtx_diff_obj->y = y;
  
!    // main part
!    // reading matrix from inlet
     if ((mtx_diff_obj->diff_mode == col_sym) || 
  	 (mtx_diff_obj->diff_mode == col_sym2)) {
--- 186,191 ----
     mtx_diff_obj->y = y;
  
!    /* main part */
!    /* reading matrix from inlet */
     if ((mtx_diff_obj->diff_mode == col_sym) || 
  	 (mtx_diff_obj->diff_mode == col_sym2)) {
***************
*** 197,201 ****
        readFloatFromList (size, list_ptr, x);
     
!    // calculating diff
     if (mtx_diff_obj->diff_direction == -1) {
        if ((mtx_diff_obj->diff_mode == row_sym) ||
--- 197,201 ----
        readFloatFromList (size, list_ptr, x);
     
!    /* calculating diff */
     if (mtx_diff_obj->diff_direction == -1) {
        if ((mtx_diff_obj->diff_mode == row_sym) ||
***************
*** 224,228 ****
     y = mtx_diff_obj->y;
  
!    // writing matrix to outlet
     if ((mtx_diff_obj->diff_mode == col_sym) || 
  	 (mtx_diff_obj->diff_mode == col_sym2)) {
--- 224,228 ----
     y = mtx_diff_obj->y;
  
!    /* writing matrix to outlet */
     if ((mtx_diff_obj->diff_mode == col_sym) || 
  	 (mtx_diff_obj->diff_mode == col_sym2)) {

Index: mtx_le.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_le.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mtx_le.c	19 Sep 2005 12:51:27 -0000	1.1
--- mtx_le.c	3 Jan 2008 12:28:27 -0000	1.2
***************
*** 19,23 ****
  
  /* the operator operates on integers instead of floats */
! //#define MTXBIN_GENERIC__INTEGEROP
  
  #include "mtx_binop_generic.h"
--- 19,23 ----
  
  /* the operator operates on integers instead of floats */
! /* #define MTXBIN_GENERIC__INTEGEROP */
  
  #include "mtx_binop_generic.h"

Index: mtx_gauss.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_gauss.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mtx_gauss.c	29 Mar 2006 12:07:52 -0000	1.4
--- mtx_gauss.c	3 Jan 2008 12:28:27 -0000	1.5
***************
*** 46,50 ****
  
    t_matrixfloat *original;
!   t_matrixfloat *a1, *a2;  // dummy pointers
  
  
--- 46,50 ----
  
    t_matrixfloat *original;
!   t_matrixfloat *a1, *a2;  /* dummy pointers */
  
  
***************
*** 58,66 ****
    }
  
!   // reserve memory for outputting afterwards
    adjustsize(x, row, row);
    original=matrix2float(argv);
  
!   // Gauss elimination
    for(i=0; i<row; i++) {
      int nz = 0;
--- 58,66 ----
    }
  
!   /* reserve memory for outputting afterwards */
    adjustsize(x, row, row);
    original=matrix2float(argv);
  
!   /* Gauss elimination */
    for(i=0; i<row; i++) {
      int nz = 0;
***************
*** 74,100 ****
        a1+=col;
      }
!     //if(nz)
      {
!       // exchange rows "nz" and "i"
        if(nz != i)mtx_gauss_xch(original+i*col+i, original+nz*col+i, col-i);
  
-       // 
        for(j=i+1; j<row; j++){
! 	t_matrixfloat f=0.;
! 	a1=original+i*(col+1);
! 	a2=original+j*col+i;
! 	if(*a2){
! 	  f=*a1 / *a2;
! 	  mtx_gauss_mulsub(a1, a2, col-i, f);
! 	}
        }
      }
    }
  
!   // 3. output the matrix
!   // 3a convert the floatbuf to an atombuf;
    float2matrix(x->atombuffer, original);
  
!   // 3c output the atombuf;
    matrix_bang(x);
  }
--- 74,99 ----
        a1+=col;
      }
!     /*if(nz)*/
      {
!       /* exchange rows "nz" and "i" */
        if(nz != i)mtx_gauss_xch(original+i*col+i, original+nz*col+i, col-i);
  
        for(j=i+1; j<row; j++){
!         t_matrixfloat f=0.;
!         a1=original+i*(col+1);
!         a2=original+j*col+i;
!         if(*a2){
!           f=*a1 / *a2;
!           mtx_gauss_mulsub(a1, a2, col-i, f);
!         }
        }
      }
    }
  
!   /* 3. output the matrix */
!   /* 3a convert the floatbuf to an atombuf; */
    float2matrix(x->atombuffer, original);
  
!   /* 3c output the atombuf; */
    matrix_bang(x);
  }

Index: mtx_eq.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_eq.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mtx_eq.c	19 Sep 2005 12:51:27 -0000	1.1
--- mtx_eq.c	3 Jan 2008 12:28:27 -0000	1.2
***************
*** 19,23 ****
  
  /* the operator operates on integers instead of floats */
! //#define MTXBIN_GENERIC__INTEGEROP
  
  #include "mtx_binop_generic.h"
--- 19,23 ----
  
  /* the operator operates on integers instead of floats */
! /* #define MTXBIN_GENERIC__INTEGEROP */
  
  #include "mtx_binop_generic.h"

Index: mtx_prod.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_prod.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtx_prod.c	12 Nov 2006 12:56:06 -0000	1.5
--- mtx_prod.c	3 Jan 2008 12:28:27 -0000	1.6
***************
*** 64,68 ****
  			     (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0);
    class_addlist  (mtx_prod_class, mtx_prod_list);
-   //  class_addbang  (mtx_prod_class, matrix_bang);
    class_addmethod(mtx_prod_class, (t_method)mtx_prod_matrix, gensym("matrix"), A_GIMME, 0);
  
--- 64,67 ----

Index: iemmatrix.h
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/iemmatrix.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** iemmatrix.h	11 Jan 2007 19:41:20 -0000	1.13
--- iemmatrix.h	3 Jan 2008 12:28:26 -0000	1.14
***************
*** 74,78 ****
  # if defined (MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MAX_ALLOWED  >= MAC_OS_X_VERSION_10_3
  # else
! //float intrinsics not in math.h, so we define them here
  #  define sqrtf(v)    (float)sqrt((double)(v))
  #  define cosf(v)     (float)cos((double)(v))
--- 74,78 ----
  # if defined (MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MAX_ALLOWED  >= MAC_OS_X_VERSION_10_3
  # else
! /* float intrinsics not in math.h, so we define them here */
  #  define sqrtf(v)    (float)sqrt((double)(v))
  #  define cosf(v)     (float)cos((double)(v))
***************
*** 109,114 ****
    t_object x_obj;
  
!   t_matrix m; // the output matrix
!   t_float f;  // the second input
  } t_mtx_binscalar;
  
--- 109,114 ----
    t_object x_obj;
  
!   t_matrix m; /* the output matrix */
!   t_float f;  /* the second input */
  } t_mtx_binscalar;
  
***************
*** 117,122 ****
    t_object x_obj;
  
!   t_matrix m;  // the output matrix
!   t_matrix m2; // the second input
  } t_mtx_binmtx;
  
--- 117,122 ----
    t_object x_obj;
  
!   t_matrix m;  /* the output matrix */
!   t_matrix m2; /* the second input */
  } t_mtx_binmtx;
  

Index: mtx_repmat.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_repmat.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mtx_repmat.c	29 Mar 2006 12:07:52 -0000	1.3
--- mtx_repmat.c	3 Jan 2008 12:28:27 -0000	1.4
***************
*** 81,91 ****
     t_atom *ptr = y;
  
!    // writing each row repeatedly (repeat_col times) into output array
!    // so that : row1#1 row1#2 ... row1#RN | ... | rowN#1 rowN#2 ... rowN#RN
     for (row_cnt=rows;row_cnt--;x+=columns) 
        for(col_cnt=repeat_cols;col_cnt--;ptr+=columns) 
  	 copyList (columns, x, ptr);
  
!    // repeating the above written long lines repeat row_repeat times in output array
     for (;--repeat_rows;) 
        for (row_cnt=rows;row_cnt--;y+=new_col,ptr+=new_col) 
--- 81,91 ----
     t_atom *ptr = y;
  
!    /* writing each row repeatedly (repeat_col times) into output array */
!    /* so that : row1#1 row1#2 ... row1#RN | ... | rowN#1 rowN#2 ... rowN#RN */
     for (row_cnt=rows;row_cnt--;x+=columns) 
        for(col_cnt=repeat_cols;col_cnt--;ptr+=columns) 
  	 copyList (columns, x, ptr);
  
!    /* repeating the above written long lines repeat row_repeat times in output array */
     for (;--repeat_rows;) 
        for (row_cnt=rows;row_cnt--;y+=new_col,ptr+=new_col) 
***************
*** 107,111 ****
     t_atom *list_out = mtx_repmat_obj->list_out;
  
!    // size check
     if (!size) {
        post("mtx_repmat: invalid dimensions");
--- 107,111 ----
     t_atom *list_out = mtx_repmat_obj->list_out;
  
!    /* size check */
     if (!size) {
        post("mtx_repmat: invalid dimensions");
***************
*** 130,136 ****
        mtx_repmat_obj->list_out = list_out;
        mtx_repmat_obj->size = size;
-       //post("size %d, rows %d, columns %d", size, rows, columns);
     }
!    // main part
     
     writeRepeatIntoMatrix (rep_rows, rep_cols, rows, columns,
--- 130,135 ----
        mtx_repmat_obj->list_out = list_out;
        mtx_repmat_obj->size = size;
     }
!    /* main part */
     
     writeRepeatIntoMatrix (rep_rows, rep_cols, rows, columns,

Index: mtx_resize.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_resize.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mtx_resize.c	29 Mar 2006 12:07:52 -0000	1.4
--- mtx_resize.c	3 Jan 2008 12:28:27 -0000	1.5
***************
*** 49,53 ****
    if (!c)c=col;
  
!   if (r==row && c==col) { // no need to change
      outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, argv);
      return;
--- 49,53 ----
    if (!c)c=col;
  
!   if (r==row && c==col) { /* no need to change */
      outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, argv);
      return;

Index: mtx_pivot.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_pivot.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mtx_pivot.c	29 Mar 2006 12:07:52 -0000	1.4
--- mtx_pivot.c	3 Jan 2008 12:28:27 -0000	1.5
***************
*** 22,28 ****
    t_object x_obj;
  
!   t_matrix m;  // the output matrix
!   t_matrix m_pre;  // the pre -multiply matrix
!   t_matrix m_post; // the post-multiply matrix
  
    t_outlet *pivo, *pre, *post;
--- 22,28 ----
    t_object x_obj;
  
!   t_matrix m;  /* the output matrix */
!   t_matrix m_pre;  /* the pre -multiply matrix */
!   t_matrix m_post; /* the post-multiply matrix */
  
    t_outlet *pivo, *pre, *post;
***************
*** 80,84 ****
  
    for (k=0; k<min_rowcol; k++){
!     // 1. find max_element
      t_float tmp = fabsf(buffer[k*(1+col)]);
      pivot_row = pivot_col = k;
--- 80,84 ----
  
    for (k=0; k<min_rowcol; k++){
!     /* 1. find max_element */
      t_float tmp = fabsf(buffer[k*(1+col)]);
      pivot_row = pivot_col = k;
***************
*** 97,102 ****
        }
      }
!     // 2. move tmp el to [k,k]
!     // 2a swap rows
      if (k-pivot_row) {
        t_matrixfloat *oldrow=buffer+col*k;
--- 97,102 ----
        }
      }
!     /* 2. move tmp el to [k,k] */
!     /* 2a swap rows */
      if (k-pivot_row) {
        t_matrixfloat *oldrow=buffer+col*k;
***************
*** 113,117 ****
        i_pre[pivot_row]=i;
      }
!     // 2b swap columns
      if (k-pivot_col) {
        t_matrixfloat *oldcol=buffer+k;
--- 113,117 ----
        i_pre[pivot_row]=i;
      }
!     /* 2b swap columns */
      if (k-pivot_col) {
        t_matrixfloat *oldcol=buffer+k;

Index: mtx_cumsum.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_cumsum.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mtx_cumsum.c	25 Jul 2006 14:15:22 -0000	1.6
--- mtx_cumsum.c	3 Jan 2008 12:28:26 -0000	1.7
***************
*** 158,162 ****
     int count;
  
!    // size check
     if (!size) {
        post("mtx_cumsum: invalid dimensions");
--- 158,162 ----
     int count;
  
!    /* size check */
     if (!size) {
        post("mtx_cumsum: invalid dimensions");
***************
*** 193,198 ****
     mtx_cumsum_obj->y = y;
  
!    // main part
!    // reading matrix from inlet
     if ((mtx_cumsum_obj->cumsum_mode == col_sym) ||
  	(mtx_cumsum_obj->cumsum_mode == col_sym2)) {
--- 193,198 ----
     mtx_cumsum_obj->y = y;
  
!    /* main part */
!    /* reading matrix from inlet */
     if ((mtx_cumsum_obj->cumsum_mode == col_sym) ||
  	(mtx_cumsum_obj->cumsum_mode == col_sym2)) {
***************
*** 204,208 ****
        readFloatFromList (size, list_ptr, x);
     
!    // calculating cumsum
     if (mtx_cumsum_obj->cumsum_direction == -1) {
        if ((mtx_cumsum_obj->cumsum_mode == row_sym) ||
--- 204,208 ----
        readFloatFromList (size, list_ptr, x);
     
!    /* calculating cumsum */
     if (mtx_cumsum_obj->cumsum_direction == -1) {
        if ((mtx_cumsum_obj->cumsum_mode == row_sym) ||
***************
*** 232,236 ****
     y = mtx_cumsum_obj->y;
  
!    // writing matrix to outlet
     if ((mtx_cumsum_obj->cumsum_mode == col_sym) ||
  	(mtx_cumsum_obj->cumsum_mode == col_sym2)) {
--- 232,236 ----
     y = mtx_cumsum_obj->y;
  
!    /* writing matrix to outlet */
     if ((mtx_cumsum_obj->cumsum_mode == col_sym) ||
  	(mtx_cumsum_obj->cumsum_mode == col_sym2)) {

Index: mtx_reverse.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_reverse.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** mtx_reverse.c	25 Jul 2006 14:15:22 -0000	1.7
--- mtx_reverse.c	3 Jan 2008 12:28:27 -0000	1.8
***************
*** 24,28 ****
    t_object x_obj;
    int size;
!   int reverse_mode; // 0=col; 1=row
  
    t_outlet *list_outlet;
--- 24,28 ----
    t_object x_obj;
    int size;
!   int reverse_mode; /* 0=col; 1=row */
  
    t_outlet *list_outlet;
***************
*** 46,50 ****
      mtx_reverse_obj->reverse_mode = 0;
      break;
!   case 'e': case 'E': case '.': // "element" just revert the whole matrix as if it was a list
      mtx_reverse_obj->reverse_mode = -1;
      break;
--- 46,50 ----
      mtx_reverse_obj->reverse_mode = 0;
      break;
!   case 'e': case 'E': case '.': /* "element" just revert the whole matrix as if it was a list */
      mtx_reverse_obj->reverse_mode = -1;
      break;
***************
*** 114,118 ****
     int count;
  
!    // size check
     if (!size) {
        error("mtx_reverse: invalid dimensions");
--- 114,118 ----
     int count;
  
!    /* size check */
     if (!size) {
        error("mtx_reverse: invalid dimensions");
***************
*** 136,140 ****
     mtx_reverse_obj->list_out = list_out;
     
!    // main part
     list_out += 2;
     copyList (size, argv, list_out);
--- 136,140 ----
     mtx_reverse_obj->list_out = list_out;
     
!    /* main part */
     list_out += 2;
     copyList (size, argv, list_out);
***************
*** 170,174 ****
     class_addbang (mtx_reverse_class, (t_method) mTXreverseBang);
     class_addmethod (mtx_reverse_class, (t_method) mTXreverseMatrix, gensym("matrix"), A_GIMME,0);
- //   class_addmethod (mtx_reverse_class, (t_method) mTXSetreverseDimension, gensym("dimension"), A_DEFFLOAT,0);
     class_addmethod (mtx_reverse_class, (t_method) mTXSetReverseMode, gensym("mode"), A_DEFSYMBOL,0);
  }
--- 170,173 ----

Index: mtx_neq.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_neq.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mtx_neq.c	19 Sep 2005 12:51:27 -0000	1.1
--- mtx_neq.c	3 Jan 2008 12:28:27 -0000	1.2
***************
*** 19,23 ****
  
  /* the operator operates on integers instead of floats */
! //#define MTXBIN_GENERIC__INTEGEROP
  
  #include "mtx_binop_generic.h"
--- 19,23 ----
  
  /* the operator operates on integers instead of floats */
! /* #define MTXBIN_GENERIC__INTEGEROP */
  
  #include "mtx_binop_generic.h"

Index: mtx_find.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_find.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** mtx_find.c	9 Aug 2006 19:26:19 -0000	1.7
--- mtx_find.c	3 Jan 2008 12:28:27 -0000	1.8
***************
*** 29,33 ****
     int size;
     int outsize;
-    //int find_dimension;
     t_symbol *find_mode;
     int find_direction;
--- 29,32 ----
***************
*** 69,74 ****
  {
     MTXfind *mtx_find_obj = (MTXfind *) pd_new (mtx_find_class);
- //   int c_dim = 0;
- //   int c_dir = 1;
  
     mTXSetFindMode (mtx_find_obj, gensym(":"));
--- 68,71 ----
***************
*** 238,242 ****
     int columns_out;
  
!    // size check
     if (!size) {
        post("mtx_find: invalid dimensions");
--- 235,239 ----
     int columns_out;
  
!    /* size check */
     if (!size) {
        post("mtx_find: invalid dimensions");
***************
*** 260,266 ****
     mtx_find_obj->list_out = list_out;
  
!    // main part
     list_out += 2;
-    //copyList (size, argv, list_out);
     rows_out = 1;
     if (mtx_find_obj->find_mode == row_sym) {
--- 257,262 ----
     mtx_find_obj->list_out = list_out;
  
!    /* main part */
     list_out += 2;
     rows_out = 1;
     if (mtx_find_obj->find_mode == row_sym) {
***************
*** 340,344 ****
     class_addbang (mtx_find_class, (t_method) mTXFindBang);
     class_addmethod (mtx_find_class, (t_method) mTXFindMatrix, gensym("matrix"), A_GIMME,0);
- //   class_addmethod (mtx_find_class, (t_method) mTXSetFindDimension, gensym("dimension"), A_DEFFLOAT,0);
     class_addmethod (mtx_find_class, (t_method) mTXSetFindMode, gensym("mode"), A_DEFSYMBOL,0);
     class_addmethod (mtx_find_class, (t_method) mTXSetFindDirection, gensym("direction"), A_DEFFLOAT,0);
--- 336,339 ----

Index: mtx_lt.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_lt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mtx_lt.c	19 Sep 2005 12:51:27 -0000	1.1
--- mtx_lt.c	3 Jan 2008 12:28:27 -0000	1.2
***************
*** 19,23 ****
  
  /* the operator operates on integers instead of floats */
! //#define MTXBIN_GENERIC__INTEGEROP
  
  #include "mtx_binop_generic.h"
--- 19,23 ----
  
  /* the operator operates on integers instead of floats */
! /* #define MTXBIN_GENERIC__INTEGEROP */
  
  #include "mtx_binop_generic.h"

Index: mtx_mul~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_mul~.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtx_mul~.c	29 Mar 2006 11:59:42 -0000	1.5
--- mtx_mul~.c	3 Jan 2008 12:28:27 -0000	1.6
***************
*** 104,108 ****
    
    if(transpose){
!     // we need to transpose the matrix
      for(i=0; i<row; i++){
        int j=0;
--- 104,108 ----
    
    if(transpose){
!     /* we need to transpose the matrix */
      for(i=0; i<row; i++){
        int j=0;
***************
*** 126,130 ****
  }
  static void matrix_multilde_matrixT(t_matrix_multilde *x, t_symbol *s, int argc, t_atom *argv){
!   // transpose the matrix before setting it
    matrix_multilde_matrix_set(x,argc, argv, 1);
  }
--- 126,130 ----
  }
  static void matrix_multilde_matrixT(t_matrix_multilde *x, t_symbol *s, int argc, t_atom *argv){
!   /* transpose the matrix before setting it */
    matrix_multilde_matrix_set(x,argc, argv, 1);
  }
***************
*** 326,330 ****
  	}
        x->x_retarget = 0;
-       //post("time = %f ms, ticks = %d, inc = %f", x->x_time_ms, nticks, *inc);
      }
  
--- 326,329 ----

Index: mtx_rowrifft.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_rowrifft.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** mtx_rowrifft.c	25 Aug 2007 09:27:45 -0000	1.8
--- mtx_rowrifft.c	3 Jan 2008 12:28:27 -0000	1.9
***************
*** 39,43 ****
  
  
! // helper functions: these should really go into a separate file!
  
  
--- 39,43 ----
  
  
! /* helper functions: these should really go into a separate file! */
  
  
***************
*** 59,63 ****
  }
  
! //--------------inverse real fft
  
  static void multiplyVector (int n, t_float *f, t_float fac)
--- 59,63 ----
  }
  
! /*--------------inverse real fft */
  
  static void multiplyVector (int n, t_float *f, t_float fac)
***************
*** 91,96 ****
  				   int argc, t_atom *argv)
  {
!   //mTXrowrifftList (x, s, argc-2, argv+2);
!   int rows = atom_getint (argv++);
    int columns_re = atom_getint (argv++);
    int in_size = argc-2;
--- 91,95 ----
  				   int argc, t_atom *argv)
  {
!     int rows = atom_getint (argv++);
    int columns_re = atom_getint (argv++);
    int in_size = argc-2;
***************
*** 103,107 ****
    t_float *f_im = x->f_im;
  
!   // ifftsize check
    if (columns_re < 3)
      post("mtx_rowrifft: matrix must have at least 3 columns");
--- 102,106 ----
    t_float *f_im = x->f_im;
  
!   /* ifftsize check */
    if (columns_re < 3)
      post("mtx_rowrifft: matrix must have at least 3 columns");
***************
*** 114,118 ****
    else if (columns == (1 << ilog2(columns))) {
  
!     // memory things
      f_re=(t_float*)realloc(f_re, sizeof(t_float)*size);
      f_im=(t_float*)realloc(f_im, sizeof(t_float)*size);
--- 113,117 ----
    else if (columns == (1 << ilog2(columns))) {
  
!     /* memory things */
      f_re=(t_float*)realloc(f_re, sizeof(t_float)*size);
      f_im=(t_float*)realloc(f_im, sizeof(t_float)*size);
***************
*** 128,132 ****
      x->f_im = f_im;
        
!     // main part: reading imaginary part
      ifft_count = rows;
      x->renorm_fac = 1.0f / columns;
--- 127,131 ----
      x->f_im = f_im;
        
!     /* main part: reading imaginary part */
      ifft_count = rows;
      x->renorm_fac = 1.0f / columns;
***************
*** 136,140 ****
        f_im += columns;
      }
!     // do nothing else!
    }
    else
--- 135,139 ----
        f_im += columns;
      }
!     /* do nothing else! */
    }
    else
***************
*** 145,149 ****
  				  int argc, t_atom *argv)
  {
-   //mTXrowrifftList (x, s, argc-2, argv+2);
    int rows = atom_getint (argv++);
    int columns_re = atom_getint (argv++);
--- 144,147 ----
***************
*** 158,162 ****
    t_float renorm_fac = x->renorm_fac;
  
!   // ifftsize check
    if ((rows != x->rows) || 
        (columns_re != x->columns_re))
--- 156,160 ----
    t_float renorm_fac = x->renorm_fac;
  
!   /* ifftsize check */
    if ((rows != x->rows) || 
        (columns_re != x->columns_re))
***************
*** 166,170 ****
    else if (!x->size2)
      post("mtx_rowrifft: invalid right side matrix");
!   else { // main part
      ifft_count = rows;
      ptr_re += 2;
--- 164,168 ----
    else if (!x->size2)
      post("mtx_rowrifft: invalid right side matrix");
!   else { /* main part */
      ifft_count = rows;
      ptr_re += 2;

Index: mtx_decay.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_decay.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mtx_decay.c	29 Mar 2006 12:07:52 -0000	1.4
--- mtx_decay.c	3 Jan 2008 12:28:26 -0000	1.5
***************
*** 180,184 ****
     int count;
  
!    // size check
     if (!size) {
        post("mtx_decay: invalid dimensions");
--- 180,184 ----
     int count;
  
!    /* size check */
     if (!size) {
        post("mtx_decay: invalid dimensions");
***************
*** 215,220 ****
     mtx_decay_obj->y = y;
  
!    // main part
!    // reading matrix from inlet
  
     if ((mtx_decay_obj->decay_mode == col_sym) ||
--- 215,220 ----
     mtx_decay_obj->y = y;
  
!    /* main part */
!    /* reading matrix from inlet */
  
     if ((mtx_decay_obj->decay_mode == col_sym) ||
***************
*** 227,231 ****
        readFloatFromList (size, list_ptr, x);
     
!    // calculating decay
     if (mtx_decay_obj->decay_direction == -1) {
        if ((mtx_decay_obj->decay_mode == col_sym) ||
--- 227,231 ----
        readFloatFromList (size, list_ptr, x);
     
!    /* calculating decay */
     if (mtx_decay_obj->decay_direction == -1) {
        if ((mtx_decay_obj->decay_mode == col_sym) ||
***************
*** 255,259 ****
     y = mtx_decay_obj->y;
  
!    // writing matrix to outlet
    if ((mtx_decay_obj->decay_mode == col_sym) ||
  	 (mtx_decay_obj->decay_mode == col_sym2)) {
--- 255,259 ----
     y = mtx_decay_obj->y;
  
!    /* writing matrix to outlet */
    if ((mtx_decay_obj->decay_mode == col_sym) ||
  	 (mtx_decay_obj->decay_mode == col_sym2)) {





More information about the Pd-cvs mailing list