SuperLU 6.0.0

Data Structures | Macros | Functions
slu_dcomplex.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 | doublecomplex

## Macros
#define | DCOMPLEX_INCLUDE
#define | z_add(c, a, b)
| Complex Addition c = a + b. More...
#define | z_sub(c, a, b)
| Complex Subtraction c = a - b. More...
#define | zd_mult(c, a, b)
| Complex-Double Multiplication. More...
#define | zz_mult(c, a, b)
| Complex-Complex Multiplication. More...
#define | zz_conj(a, b)
#define | z_eq(a, b) ( (a)->r == (b)->r && (a)->i == (b)->i )
| Complex equality testing. More...

## Functions
void | z_div (doublecomplex *, doublecomplex *, doublecomplex *)
| Complex Division c = a/b. More...
double | z_abs (doublecomplex *)
| Returns sqrt(z.r^2 + z.i^2) More...
double | z_abs1 (doublecomplex *)
| Approximates the abs. Returns abs(z.r) + abs(z.i) More...
void | z_exp (doublecomplex *, doublecomplex *)
| Return the exponentiation. More...
void | d_cnjg (doublecomplex *r, doublecomplex *z)
| Return the complex conjugate. More...
double | d_imag (doublecomplex *)
| Return the imaginary part. More...
doublecomplex | z_sgn (doublecomplex *)
| SIGN functions for complex number. Returns z/abs(z) More...
doublecomplex | z_sqrt (doublecomplex *)
| 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 z*.c

## Macro Definition Documentation

## ◆ DCOMPLEX_INCLUDE

#define DCOMPLEX_INCLUDE

## ◆ z_add

#define z_add | ( |  | c,
|  |  | a,
|  |  | b
| ) |  |

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

## ◆ z_eq

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

## ◆ z_sub

#define z_sub | ( |  | c,
|  |  | a,
|  |  | b
| ) |  |

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

## ◆ zd_mult

#define zd_mult | ( |  | c,
|  |  | a,
|  |  | b
| ) |  |

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

## ◆ zz_conj

#define zz_conj | ( |  | a,
|  |  | b
| ) |  |

Value:
{ \
(a)->r = (b)->r; \
(a)->i = -((b)->i); \
}

## ◆ zz_mult

#define zz_mult | ( |  | c,
|  |  | a,
|  |  | b
| ) |  |

Value:
{ \
double 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; \
}

## Function Documentation

## ◆ d_cnjg()

void d_cnjg | ( | doublecomplex * | r,
|  | doublecomplex * | z
| ) |  |

## ◆ d_imag()

double d_imag | ( | doublecomplex * | z | ) |

## ◆ z_abs()

double z_abs | ( | doublecomplex * | z | ) |

## ◆ z_abs1()

double z_abs1 | ( | doublecomplex * | z | ) |

## ◆ z_div()

void z_div | ( | doublecomplex * | c,
|  | doublecomplex * | a,
|  | doublecomplex * | b
| ) |  |

## ◆ z_exp()

void z_exp | ( | doublecomplex * | r,
|  | doublecomplex * | z
| ) |  |

## ◆ z_sgn()

doublecomplex z_sgn | ( | doublecomplex * | z | ) |

Here is the call graph for this function:

## ◆ z_sqrt()

doublecomplex z_sqrt | ( | doublecomplex * | z | ) |