00001 /*=============================================================================
00002 File: global.h
00003 Purpose: Define and include some general definitions valid for all
00004 matrix header files
00005 Revision: $Id: matrix_global.h,v 1.5 2002/05/24 17:08:34 philosophil Exp $
00006 Created by: Philippe Lavoie (3 Oct, 1996)
00007 Modified by:
00008
00009 Copyright notice:
00010 Copyright (C) 1996-1998 Philippe Lavoie
00011
00012 This library is free software; you can redistribute it and/or
00013 modify it under the terms of the GNU Library General Public
00014 License as published by the Free Software Foundation; either
00015 version 2 of the License, or (at your option) any later version.
00016
00017 This library is distributed in the hope that it will be useful,
00018 but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00020 Library General Public License for more details.
00021
00022 You should have received a copy of the GNU Library General Public
00023 License along with this library; if not, write to the Free
00024 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00025 =============================================================================*/
00026 #ifndef _Matrix_Global_h_
00027 #define _Matrix_Global_h_
00028
00029 #undef PACKAGE
00030 #undef VERSION
00031
00032 #include "plib.h"
00033
00034 #undef PACKAGE
00035 #undef VERSION
00036
00037 #include <cmath>
00038 #include <iostream>
00039 #include <complex>
00040 #include <sstream>
00041 #include <iomanip>
00042 #include <fstream>
00043
00044 using std::cerr;
00045 using std::cout;
00046 using std::cin;
00047 using std::endl;
00048 using std::setw;
00049 using std::real;
00050 using std::imag;
00051 using std::complex;
00052 using std::ostream;
00053 using std::istream;
00054 using std::ofstream;
00055 using std::ifstream;
00056
00057 #ifdef USING_VCC
00058 namespace PLib {
00059 const double M_PI = 3.1415926535897932385;
00060 }
00061 #endif
00062
00063
00064 //#ifdef __GNUG__
00065 //typedef double_complex Complex ;
00066 //#else
00067 typedef std::complex<double> Complex ;
00068
00069
00070 #ifndef HAS_COMPLEX_CONJ
00071 Complex conj(Complex &value){
00072 return Complex(value.real(),-value.imag());
00073 }
00074 #endif
00075
00076 #ifndef HAS_COMPLEX_ABS
00077 double abs(Complex &value){
00078 return sqrt(value.real()*value.real()+value.imag()*value.imag());
00079 }
00080 #endif
00081
00082
00083 //#ifdef __sgi
00084 //inline Complex operator*(double a1, Complex a2)
00085 //{
00086 // return Complex(a1*real(a2), a1*imag(a2));
00087 //}
00088 //#endif
00089 //#endif
00090
00091 #include "error.h"
00092
00093 #endif
1.2.14 written by Dimitri van Heesch,
© 1997-2002