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

📄 slu_scomplex.h

📁 LU矩阵分解单机版最新版本
💻 H
字号:
/* * -- SuperLU routine (version 2.0) -- * Univ. of California Berkeley, Xerox Palo Alto Research Center, * and Lawrence Berkeley National Lab. * November 15, 1997 * */#ifndef __SUPERLU_SCOMPLEX /* allow multiple inclusions */#define __SUPERLU_SCOMPLEX/*  * This header file is to be included in source files c*.c */#ifndef SCOMPLEX_INCLUDE#define SCOMPLEX_INCLUDEtypedef struct { float r, i; } complex;/* Macro definitions *//* Complex Addition c = a + b */#define c_add(c, a, b) { (c)->r = (a)->r + (b)->r; \			 (c)->i = (a)->i + (b)->i; }/* Complex Subtraction c = a - b */#define c_sub(c, a, b) { (c)->r = (a)->r - (b)->r; \			 (c)->i = (a)->i - (b)->i; }/* Complex-Double Multiplication */#define cs_mult(c, a, b) { (c)->r = (a)->r * (b); \                           (c)->i = (a)->i * (b); }/* Complex-Complex Multiplication */#define cc_mult(c, a, b) { \	float cr, ci; \    	cr = (a)->r * (b)->r - (a)->i * (b)->i; \    	ci = (a)->i * (b)->r + (a)->r * (b)->i; \    	(c)->r = cr; \    	(c)->i = ci; \    }#define cc_conj(a, b) { \        (a)->r = (b)->r; \        (a)->i = -((b)->i); \    }/* Complex equality testing */#define c_eq(a, b)  ( (a)->r == (b)->r && (a)->i == (b)->i )#ifdef __cplusplusextern "C" {#endif/* Prototypes for functions in scomplex.c */void c_div(complex *, complex *, complex *);double c_abs(complex *);     /* exact */double c_abs1(complex *);    /* approximate */void c_exp(complex *, complex *);void r_cnjg(complex *, complex *);double r_imag(complex *);#ifdef __cplusplus  }#endif#endif#endif  /* __SUPERLU_SCOMPLEX */

⌨️ 快捷键说明

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