Complex type


Data Structures

struct  _cplx_

Defines

#define cplx(r, i)   { r, i }
#define creal(c)   ((c).r)
#define cimag(c)   ((c).i)
#define __it_abs(x)   (((x)>=0)?(x):(-x))
#define cplx_swap(a, b)   __cplx_swap(&a, &b)
#define cplx_zero   cplx_0
#define cplx_one   cplx_1

Typedefs

typedef struct _cplx_ cplx

Functions

static cplx cadd (cplx a, cplx b)
static cplx csub (cplx a, cplx b)
static cplx cmul (cplx a, cplx b)
static cplx cscale (cplx a, double b)
static cplx cdiv (cplx a, cplx b)
static cplx cconj (cplx a)
static cplx cneg (cplx a)
static cplx cinv (cplx a)
static int ceq (cplx a, cplx b)
static double cnorm (cplx a)
static double cang (cplx a)
static void __cplx_swap (cplx *a, cplx *b)

Variables

cplx const cplx_0
cplx const cplx_1
cplx const cplx_I

Detailed Description


Define Documentation

#define __it_abs (  )     (((x)>=0)?(x):(-x))

Definition at line 46 of file cplx.h.

Referenced by cdiv(), cinv(), and cnorm().

#define cplx ( r,
 )     { r, i }

Definition at line 43 of file cplx.h.

Referenced by main().

#define cplx_one   cplx_1

Definition at line 218 of file cplx.h.

#define cplx_swap ( a,
 )     __cplx_swap(&a, &b)

Definition at line 210 of file cplx.h.

Referenced by cplx_array_bitrev_permute().

#define cplx_zero   cplx_0

Definition at line 217 of file cplx.h.


Typedef Documentation

typedef struct _cplx_ cplx


Function Documentation

static void __cplx_swap ( cplx a,
cplx b 
) [inline, static]

Definition at line 201 of file cplx.h.

References _cplx_::i, and _cplx_::r.

static double cang ( cplx  a  )  [inline, static]

Definition at line 166 of file cplx.h.

References _cplx_::i, M_PI, and _cplx_::r.

Referenced by it_fzt(), and main().

static cplx cconj ( cplx  a  )  [inline, static]

Definition at line 102 of file cplx.h.

References _cplx_::i, and _cplx_::r.

Referenced by cvec_conj(), cvec_conj_mul(), and main().

static cplx cdiv ( cplx  a,
cplx  b 
) [inline, static]

Definition at line 79 of file cplx.h.

References __it_abs, _cplx_::i, and _cplx_::r.

Referenced by cmat_div_by(), cmat_elem_div(), cvec_div(), and main().

static int ceq ( cplx  a,
cplx  b 
) [inline, static]

static cplx cinv ( cplx  a  )  [inline, static]

Definition at line 118 of file cplx.h.

References __it_abs, _cplx_::i, and _cplx_::r.

Referenced by cvec_div_by(), and it_fzt().

static cplx cneg ( cplx  a  )  [inline, static]

Definition at line 110 of file cplx.h.

References _cplx_::i, and _cplx_::r.

Referenced by cvec_neg().

static double cnorm ( cplx  a  )  [inline, static]

Definition at line 145 of file cplx.h.

References __it_abs, _cplx_::i, and _cplx_::r.

Referenced by cmat_inv(), cvec_eq_tol(), cvec_new_abs(), it_fzt(), and main().

static cplx cscale ( cplx  a,
double  b 
) [inline, static]

Definition at line 71 of file cplx.h.

References _cplx_::i, and _cplx_::r.

Referenced by cmat_vec_mul(), it_fdft(), and it_fzt().

static cplx csub ( cplx  a,
cplx  b 
) [inline, static]

Definition at line 54 of file cplx.h.

References _cplx_::i, and _cplx_::r.

Referenced by __fft_dif(), __ifft_dit(), cmat_decr(), cmat_elem_sub(), cmat_inv(), cvec_decr(), cvec_eq_tol(), and cvec_sub().


Variable Documentation

cplx const cplx_I

Definition at line 33 of file cplx.c.

Referenced by main().


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau