aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mtx_bspline.c15
-rw-r--r--src/mtx_colon.c4
2 files changed, 8 insertions, 11 deletions
diff --git a/src/mtx_bspline.c b/src/mtx_bspline.c
index c6d45be..9fec0a9 100644
--- a/src/mtx_bspline.c
+++ b/src/mtx_bspline.c
@@ -16,10 +16,14 @@
/*
mtx_bspline:
this is only in the iemmatrix library since i have to make sure that there is an x-value
- for each y-value; this however enforces that for each point we have to define a point in all dimensions;
+ for each y-value; this however enforces that for each point we have to define a point
+ in all dimensions;
+
+ think: should we split this into 2 objects?
+ - one for calculating the coefficients of the polynomial function for the bspline
+ - another for calculating the value of a piecewise polyfuns
*/
-/* mtx_bspline */
static t_class *mtx_bspline_class;
typedef struct _mtx_spline
@@ -80,11 +84,10 @@ static void mtx_bspline_matrix2(t_mtx_spline *X, t_symbol *s, int argc, t_atom *
{
int row=0;
int col=0;
- t_atom *m = argv+2;
t_matrixfloat *x, **y, **u, **p, *w, *d, *fp;
t_matrixfloat*dummy;
- int i,j,n;
+ int i,j;
int N;
if (argc<2){ error("mtx_bspline: crippled matrix"); return; }
@@ -151,18 +154,14 @@ static void mtx_bspline_matrix2(t_mtx_spline *X, t_symbol *s, int argc, t_atom *
for(i=N-1; i>0; i--)
p[j][i] = (w[i]-u[j][i]*p[j][i+1])/d[i];
}
-
}
-
-
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)
{
- t_matrixfloat t, t3, t3i;
int i=0, j=0;
int dim=X->x_dimension;
t_matrixfloat *x=X->x_x, **y=X->x_y, **u=X->x_u, **p=X->x_p;
diff --git a/src/mtx_colon.c b/src/mtx_colon.c
index 5b6a3b9..642eb4f 100644
--- a/src/mtx_colon.c
+++ b/src/mtx_colon.c
@@ -119,12 +119,10 @@ void mtx_colon_setup (void)
sizeof (MTXColon),
CLASS_DEFAULT, A_GIMME, 0);
class_addbang (mtx_colon_class, (t_method) mTXColonBang);
- class_addmethod (mtx_colon_class, (t_method) mTXSetColonMode, gensym("mode"), A_DEFSYMBOL, 0);
+ class_addmethod (mtx_colon_class, (t_method) mTXSetColonMode, gensym("mode"), A_SYMBOL, 0);
class_addlist (mtx_colon_class, (t_method) mTXColonList);
class_addcreator ((t_newmethod) newMTXColon, gensym("mtx_:"), A_GIMME, 0);
- col_sym = gensym("col");
- col_sym2 = gensym("column");
}
void iemtx_colon_setup(void){