Mathc matrices/h11c
Installer ce fichier dans votre répertoire de travail.
vdbm.h |
---|
/* ------------------------------------ */
/* Save as : vdbm.h */
/* ------------------------------------ */
/* ------------------------------------ */
double **MmnsD_mR(
double **M,
double **D,
double **MmnsD
)
{
int r;
int c;
dif_sizes_mR(M,D, "MmnsD_mR();","(M or D)");
dif_sizes_mR(M,MmnsD,"MmnsD_mR();","(MmnsD) ");
for ( r=R1; r<M[R_SIZE][C0]; r++)
for ( c=C1; c<M[C_SIZE][C0]; c++)
if(r==c)
MmnsD[r][c] = M[r][c] - D[r][c];
else
MmnsD[r][c] = M[r][c];
return(MmnsD);
}
/* ------------------------------------ */
double **DmnsM_mR(
double **D,
double **M,
double **DmnsM
)
{
int r;
int c;
dif_sizes_mR(M,D, "DmnsM_mR();","(M or D)");
dif_sizes_mR(M,DmnsM,"DmnsM_mR();","(MmnsD) ");
for ( r=R1; r<M[R_SIZE][C0]; r++)
for ( c=C1; c<M[C_SIZE][C0]; c++)
if(r==c)
DmnsM[r][c] = D[r][c]- M[r][c];
else
DmnsM[r][c] = - M[r][c];
return(DmnsM);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **f_eigs_mR(
double (*P_f)(double x),
double **M,
double **fM
)
{
int r;
dif_sizes_mR(M,fM,"eigs_f_mR();","(M or fM");
for ( r=R1; r<M[R_SIZE][C0]; r++)
fM[r][r] = (*P_f)(M[r][r]);
return(fM);
}
/* ------------------------------------ */
/* ------------------------------------ */
Déclaration des fichiers h.