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

📄 xcelcop.h

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

/* --------------------------------- FUNCTION ------------------------------  */
/* Do    :  swap two cols in a matrix                                         */
/*                                                                            */
/* -------------------------------------------------------------------------- */

void swapcol_mF(
PmF m,
int     col1,
int     col2)
{
  int    i;
  double tnumer;
  double tdenom;

for ( i = 0 ; i < m->rows ; i++)
 {
                                   tnumer = *(m->pb+i *m->cols+(col1*C2)  );
                                   tdenom = *(m->pb+i *m->cols+(col1*C2)+1);

  *(m->pb+i *m->cols+(col1*C2)  ) = *(m->pb+i *m->cols+(col2*C2)  );
  *(m->pb+i *m->cols+(col1*C2)+1) = *(m->pb+i *m->cols+(col2*C2)+1);

  *(m->pb+i *m->cols+(col2*C2)  ) = tnumer;
  *(m->pb+i *m->cols+(col2*C2)+1) = tdenom;
 }
}


/* --------------------------------- FUNCTION ------------------------------  */
/* Do    : returns a copy of the matrix m in which column is muliply         */
/*         by scalar                                                          */
/* -------------------------------------------------------------------------- */
void mulcol_mF(
PmF m,
int coln,
fraction f
)
{
 int i;

 for( i = 0 ; i < m->rows ; i++)
 {
                 (*(m->pb+i *m->cols+coln*C2)) = \
       f.n * (*(m->pb+i *m->cols+coln*C2)) ;

                 (*(m->pb+i *m->cols+coln*C2+1)) = \
       f.d * (*(m->pb+i *m->cols+coln*C2+1)) ;
 }
}

⌨️ 快捷键说明

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