ycmid.h

来自「[[ Complex Matrices : Language c]]」· C头文件 代码 · 共 51 行

H
51
字号
/* xrndf.h                   free ware                     xhunga@tiscali.fr  */

/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */
/* -------------------------------------------------------------------------- */
void mid_mzF(
PmzF mID)
{
int i;
int j;

  if (mID->rows * C4 != mID->cols)
    {
     printf("\n mid() error - matrix must be square");
     printf("\n Press return to continue");
     getchar();
     exit(1);
    }
  for (   i = 0 ; i < mID->rows ; i++)
    for ( j = 0 ; j < mID->cols ; j += C4)
       {
       *(mID->pb+i *mID->cols+j   ) = 0;
       *(mID->pb+i *mID->cols+j+1 ) = 1;
       *(mID->pb+i *mID->cols+j+2 ) = 0;
       *(mID->pb+i *mID->cols+j+3 ) = 1;
       *(mID->pb+i *mID->cols+i*C4) = 1;
       }
}

/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :                                                                    */
/*                                                                            */
/* -------------------------------------------------------------------------- */
void m0_mzF(
PmzF m0)
{
int i;
int j;

  for (   i = 0 ; i < m0->rows ; i++)
    for ( j = 0 ; j < m0->cols ; j += C4)
       {
       *(m0->pb+i *m0->cols+j  ) = 0;
       *(m0->pb+i *m0->cols+j+1) = 1;
       *(m0->pb+i *m0->cols+j+2) = 0;
       *(m0->pb+i *m0->cols+j+3) = 1;
       }
}

⌨️ 快捷键说明

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