S
sandwich_eater
What is the usual way to declare real (float) vectors and matrices?
What ways are there to pass them to them into a function (by ref, by
val, pointer) ?
this is what I have...
const int MAX_MAT_DIM = 200;
typedef double TMTMatrix [MAX_MAT_DIM][MAX_MAT_DIM];
typedef double TMTVector [MAX_MAT_DIM];
void myfunc1(TMTVector &y, TMTMatrix &A);
void myfunc2(TMTVector *y, TMTMatrix *A);
....
TMTMatrix A1, A2;
myfunc1(y, A1);
myfunc2(&y, &A2);
if u is changed in both myfuncs will A1 and A2 change?
Thanks,
Daniel
What ways are there to pass them to them into a function (by ref, by
val, pointer) ?
this is what I have...
const int MAX_MAT_DIM = 200;
typedef double TMTMatrix [MAX_MAT_DIM][MAX_MAT_DIM];
typedef double TMTVector [MAX_MAT_DIM];
void myfunc1(TMTVector &y, TMTMatrix &A);
void myfunc2(TMTVector *y, TMTMatrix *A);
....
TMTMatrix A1, A2;
myfunc1(y, A1);
myfunc2(&y, &A2);
if u is changed in both myfuncs will A1 and A2 change?
Thanks,
Daniel