Mathc matrices/h10a


Sommaire


Installer ce fichier dans votre répertoire de travail.

Crystal Clear mimetype source h.png vgconsit.h
'
/* ------------------------------------ */
/*  Save as :   vgconsit.h                   */
/* ------------------------------------ */
double add_coef_r_Ab_mR(
double **Ab,
int r
)
{
double x;
int c;

    x=0.;
    for ( c=C1; c<Ab[C_SIZE][C0]; c++)

              x+=fabs(Ab[r][c]);
 return(x);
}
/* ------------------------------------ */
double add_coef_r_A_mR(
double **Ab,
int r
)
{
double x;
int c;

    x=0.;
    for ( c=C1; c<Ab[C_SIZE_A][C0]; c++)

              x+=fabs(Ab[r][c]);
 return(x);
}
/* ------------------------------------ */
void is_system_consistent_mR(
double **Ab
)
{
int r;
int consistent = 1;

    for ( r=R1; r<Ab[R_SIZE][C0]; r++)

        if((add_coef_r_A_mR(Ab,r)<ERROR_E) && (add_coef_r_Ab_mR(Ab,r)>ERROR_E))
           {
             if(consistent)          /* Print this line only the fisrt time */
                    printf(" This(ese) row(s) are incompatible.\n");

             printf(" row %d;  ",r);
             consistent=0;
            }

  if(!consistent)
    {
     printf("\n The system is inconsistent. \n");
     printf(" I prefer to close the program.\n");
     printf(" Press return to continue.     \n");
     fflush(stdout);
     getchar();
     exit(EXIT_FAILURE);
    }

}
/* ------------------------------------ */
/* ------------------------------------ */


Déclaration des fichiers h.