⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xrndm.h

📁 基本矩阵运算 : + - *, power, transpose, trace, determinant, minor, matrix of minor, cofactor, matrix of co
💻 H
字号:
/* xrndm.h                    freeware                    xhunga@tiscali.fr  */


/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */


/* -------------------------------------------------------------------------- */
void rnd_mF(
PmF mA,
int n,
int d)
{
int      i;
int      j;
fraction f;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j++,j++)
       {
        f = rnd_F(n,d);

        *(mA->pb+i *mA->cols+j  ) = f.n;
        *(mA->pb+i *mA->cols+j+1) = f.d;
       }
}

/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */


/* -------------------------------------------------------------------------- */
void rnd0_mF(
PmF mA,
int n,
int d)
{
int      i;
int      j;
fraction f;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j++,j++)
       {
        f = rnd0_F(n,d);

        *(mA->pb+i *mA->cols+j  ) = rnd0_I(n);
        *(mA->pb+i *mA->cols+j+1) = rndp_I(d);
       }
}



/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */


/* -------------------------------------------------------------------------- */
void rnd_mI(
PmF mA,
int n)
{
int i;
int j;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j++,j++)
       {
        *(mA->pb+i *mA->cols+j)   = rnd_I(n);
        *(mA->pb+i *mA->cols+j+1) = 1;
       }
}

/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */


/* -------------------------------------------------------------------------- */
void rnd0_mI(
PmF mA,
int n)
{
int i;
int j;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j++,j++)
       {
        *(mA->pb+i *mA->cols+j)   = rnd0_I(n);
        *(mA->pb+i *mA->cols+j+1) = 1;
       }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -