lacomplex.h File Reference

Helper file for complex numbers. More...

Go to the source code of this file.

Typedefs

typedef doublecomplex COMPLEX
 Complex type that is used in LAPACK++ internally.
typedef la::complex< double > LaComplex
 Complex data type that can be used from the application.

Functions

std::ostream & operator<< (std::ostream &__os, const COMPLEX &__x)
bool operator== (const COMPLEX &_a, const COMPLEX &_b)
bool operator!= (const COMPLEX &_a, const COMPLEX &_b)


Detailed Description

Helper file for complex numbers.

This file exists to be a replacement to Lapack++'s inclusion of <complex.h>.

Note:
Complex numbers are a difficult issue. This solution might be non-trivial to understand, but please bear in mind that complex numbers are really a nuisance in the C++ programming language.
This file is being used to help the automated conversion from LAPACK++'s legacy type COMPLEX to the current up-to-date type std::complex<double>. More information at the type definitions below.

Typedef Documentation

typedef doublecomplex COMPLEX

Complex type that is used in LAPACK++ internally.

The complex type inside LAPACK++ should be the FORTRAN type, since LAPACK++ has to pass these values back and forth to the FORTRAN functions. Don't use this data type anywhere outside anymore.

typedef la::complex<double> LaComplex

Complex data type that can be used from the application.

This type is used for passing scalars in and out of LAPACK++. It is a copy of the std::complex<double> and it includes automatic conversion from and to std::complex<double>. Additionally it includes automatic conversion from and to the internal FORTRAN type COMPLEX, which is why this class is needed to pass complex values into Lapack++.

Again: If you get errors when passing a std::complex<double> into Lapack++, then you first need to convert your std::complex<double> into this LaComplex value.


Function Documentation

std::ostream& operator<< ( std::ostream &  __os,
const COMPLEX __x 
) [inline]

Additional operator to make stream output easier.

bool operator== ( const COMPLEX _a,
const COMPLEX _b 
) [inline]

Equality operator for COMPLEX. (New in lapackpp-2.4.5)

bool operator!= ( const COMPLEX _a,
const COMPLEX _b 
) [inline]

Inequality operator for COMPLEX. (New in lapackpp-2.4.5)


Generated on Sat Jul 14 11:40:36 2007 for Lapack++ by  doxygen 1.5.0