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

📄 yrndm.h

📁 [[ Complex Matrices : Language c]]
💻 H
字号:
/* xrndm.h                    free ware                    xhunga@tiscali.fr  */


/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */
/* -------------------------------------------------------------------------- */
void rnd_mzF(
PmzF mA,
int     maxn,
int     maxd)
{
fraction f;
int      i;
int      j;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j += 4)
       {
        f = rnd_F(maxn,maxd);
        *(mA->pb+i *mA->cols+j  ) = f.n;
        *(mA->pb+i *mA->cols+j+1) = f.d;

        f = rnd_F(maxn,maxd);
        *(mA->pb+i *mA->cols+j+2) = f.n;
        *(mA->pb+i *mA->cols+j+3) = f.d;
       }
}

/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */
/* -------------------------------------------------------------------------- */
void rnd0_mzF(
PmzF mA,
int     maxn,
int     maxd)
{
fraction f;
int      i;
int      j;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j += 4)
       {
        f = rnd0_F(maxn,maxd);
        *(mA->pb+i *mA->cols+j  ) = f.n;
        *(mA->pb+i *mA->cols+j+1) = f.d;

        f = rnd0_F(maxn,maxd);
        *(mA->pb+i *mA->cols+j+2) = f.n;
        *(mA->pb+i *mA->cols+j+3) = f.d;
       }
}



/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */
/* -------------------------------------------------------------------------- */
void rnd_mzI(
PmzF mA,
int     maxn)
{
int i;
int j;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j += 4)
       {
        *(mA->pb+i *mA->cols+j)   = rnd_I(maxn);
        *(mA->pb+i *mA->cols+j+1) = 1;
        *(mA->pb+i *mA->cols+j+2) = rnd_I(maxn);
        *(mA->pb+i *mA->cols+j+3) = 1;
       }
}

/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */
/* -------------------------------------------------------------------------- */
void rnd0_mzI(
PmzF mA,
int     maxn)
{
int i;
int j;

  for (   i = 0 ; i < mA->rows ; i++)
    for ( j = 0 ; j < mA->cols ; j += 4)
       {
        *(mA->pb+i *mA->cols+j)   = rnd0_I(maxn);
        *(mA->pb+i *mA->cols+j+1) = 1;
        *(mA->pb+i *mA->cols+j+2) = rnd0_I(maxn);
        *(mA->pb+i *mA->cols+j+3) = 1;
       }
}

⌨️ 快捷键说明

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