SuperLU 6.0.1
Data Structures | Macros | Functions
slu_scomplex.h File Reference

Header file for complex operations. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  complex
 

Macros

#define SCOMPLEX_INCLUDE
 
#define c_add(c, a, b)
 Complex Addition c = a + b. More...
 
#define c_sub(c, a, b)
 Complex Subtraction c = a - b. More...
 
#define cs_mult(c, a, b)
 Complex-Double Multiplication. More...
 
#define cc_mult(c, a, b)
 Complex-Complex Multiplication. More...
 
#define cc_conj(a, b)
 
#define c_eq(a, b)   ( (a)->r == (b)->r && (a)->i == (b)->i )
 Complex equality testing. More...
 

Functions

void c_div (complex *, complex *, complex *)
 Complex Division c = a/b. More...
 
double c_abs (complex *)
 Returns sqrt(z.r^2 + z.i^2) More...
 
double c_abs1 (complex *)
 Approximates the abs. Returns abs(z.r) + abs(z.i) More...
 
void c_exp (complex *, complex *)
 Return the exponentiation. More...
 
void r_cnjg (complex *, complex *)
 Return the complex conjugate. More...
 
double r_imag (complex *)
 Return the imaginary part. More...
 
complex c_sgn (complex *)
 SIGN functions for complex number. Returns z/abs(z) More...
 
complex c_sqrt (complex *)
 Square-root of a complex number. More...
 

Detailed Description

Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy)

All rights reserved.

The source code is distributed under BSD license, see the file License.txt at the top-level directory.

 
 -- SuperLU routine (version 2.0) --
Univ. of California Berkeley, Xerox Palo Alto Research Center,
and Lawrence Berkeley National Lab.
November 15, 1997

Contains definitions for various complex operations.
This header file is to be included in source files c*.c

Macro Definition Documentation

◆ c_add

#define c_add (   c,
  a,
 
)
Value:
{ (c)->r = (a)->r + (b)->r; \
(c)->i = (a)->i + (b)->i; }

◆ c_eq

#define c_eq (   a,
 
)    ( (a)->r == (b)->r && (a)->i == (b)->i )

◆ c_sub

#define c_sub (   c,
  a,
 
)
Value:
{ (c)->r = (a)->r - (b)->r; \
(c)->i = (a)->i - (b)->i; }

◆ cc_conj

#define cc_conj (   a,
 
)
Value:
{ \
(a)->r = (b)->r; \
(a)->i = -((b)->i); \
}

◆ cc_mult

#define cc_mult (   c,
  a,
 
)
Value:
{ \
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; \
}

◆ cs_mult

#define cs_mult (   c,
  a,
 
)
Value:
{ (c)->r = (a)->r * (b); \
(c)->i = (a)->i * (b); }

◆ SCOMPLEX_INCLUDE

#define SCOMPLEX_INCLUDE

Function Documentation

◆ c_abs()

double c_abs ( complex z)

◆ c_abs1()

double c_abs1 ( complex z)

◆ c_div()

void c_div ( complex c,
complex a,
complex b 
)

◆ c_exp()

void c_exp ( complex r,
complex z 
)

◆ c_sgn()

complex c_sgn ( complex z)
Here is the call graph for this function:

◆ c_sqrt()

complex c_sqrt ( complex z)

◆ r_cnjg()

void r_cnjg ( complex r,
complex z 
)

◆ r_imag()

double r_imag ( complex z)