|
|
|
#define error(a) _error(__LINE__,a)
|
|
void _error(int l,char * r)
|
|
{
|
|
int i=0;
|
|
for(i=0;i<l;i++)
|
|
{
|
|
printf("%i",r[i]);
|
|
};
|
|
|
|
};
|
|
|
|
#define Plot_Mat(Mat,titre) _Plot_Mat(sizeof(Mat)/sizeof(Mat[0]),sizeof(Mat[0])/sizeof(Mat[0][0]),Mat,titre)
|
|
void _Plot_Mat(int n,int m,double in[n][m], const char* name){
|
|
int i=0,j=0;
|
|
printf("%s \n",name);
|
|
for(i=0;i<n;i++){
|
|
for(j=0;j<m;j++){
|
|
printf("%d",in[i][j]);
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
#define Equal_Mat_Mat(Mat_A,Mat_B) _Equal_Mat_Mat(sizeof(Mat_A)/sizeof(Mat_A[0]),sizeof(Mat_A[0])/sizeof(Mat_A[0][0]),Mat_A,sizeof(Mat_B)/sizeof(Mat_B[0]),sizeof(Mat_B[0])/sizeof(Mat_B[0][0]),Mat_B)
|
|
int _Equal_Mat_Mat(int na,int ma,double A[na][ma],int nb,int mb,double B[nb][mb]){
|
|
int i,j;
|
|
int out;
|
|
for (i=0;i<na;i++){
|
|
for(j=0;j<ma;j++)
|
|
{
|
|
if(A[i][j]!=B[i][j])
|
|
{
|
|
out=1;
|
|
}
|
|
}
|
|
}
|
|
return out;
|
|
}
|
|
|
|
extern int debug;
|