chainlink_complex.h File Reference

#include <math.h>
#include <stdlib.h>
#include <stdio.h>

Go to the source code of this file.

Classes

struct  complex
 ChainLink complex data type. More...

Typedefs

typedef float real
 ChainLink real data type.
typedef long int32

Functions

complex cplex (real re, real im)
complex operator * (complex X1, complex X2)
complex operator/ (complex X1, complex X2)
complex operator+ (complex X1, complex X2)
complex operator- (complex X1, complex X2)
complex operator * (complex X1, real X2)
complex operator/ (complex X1, real X2)
complex operator+ (complex X1, real X2)
complex operator- (complex X1, real X2)
complex operator/ (real X1, complex X2)
bool operator== (complex X1, complex X2)
bool operator== (complex X1, real X2)
bool operator== (real X1, complex X2)
real abs (complex X)
complex conj (complex X)
complex exp (complex X)
complex log (complex X)
void get_complex_string (char *ret, complex X)
complex power (const complex &x, const complex &y)


Detailed Description


Typedef Documentation

typedef float real

ChainLink real data type.

Either single or double floating point (determined at ChainLink compilation time) Note: using double precision has not yet been tested


Function Documentation

real abs ( complex  X  ) 

Absolute value of a complex number

complex conj ( complex  X  ) 

Complex conjugate

complex cplex ( real  re,
real  im 
)

Returns a complex number with specified real and imaginary parts

complex exp ( complex  X  ) 

Complex exponential function

void get_complex_string ( char *  ret,
complex  X 
)

Convert complex number to string

complex log ( complex  X  ) 

Complex logarithmic function

complex operator * ( complex  X1,
real  X2 
)

Product of complex and real.

complex operator * ( complex  X1,
complex  X2 
)

Complex product.

complex operator+ ( complex  X1,
real  X2 
)

Sum of complex and real.

complex operator+ ( complex  X1,
complex  X2 
)

Complex sum.

complex operator- ( complex  X1,
real  X2 
)

Difference of complex and real.

complex operator- ( complex  X1,
complex  X2 
)

Complex difference.

complex operator/ ( real  X1,
complex  X2 
)

Quotient of real and complex.

complex operator/ ( complex  X1,
real  X2 
)

Quotient of complex and real.

complex operator/ ( complex  X1,
complex  X2 
)

Complex quotient.

bool operator== ( real  X1,
complex  X2 
)

Real/complex comparison.

bool operator== ( complex  X1,
real  X2 
)

Complex/real comparison.

bool operator== ( complex  X1,
complex  X2 
)

Complex comparison.

complex power ( const complex x,
const complex y 
)

Complex power


Generated on Mon Feb 5 12:16:36 2007 for ChainLinkBase by  doxygen 1.5.1-p1