2012-02-06 14:59:56 +01:00
|
|
|
/***************************************************************************
|
|
|
|
|
2012-07-08 16:35:58 +02:00
|
|
|
c_complex.h
|
2012-02-06 14:59:56 +01:00
|
|
|
|
2012-07-08 16:35:58 +02:00
|
|
|
gb.gsl component
|
2012-02-06 14:59:56 +01:00
|
|
|
|
2012-07-08 16:35:58 +02:00
|
|
|
(c) 2012 Randall Morgan <rmorgan62@gmail.com>
|
2012-02-06 14:59:56 +01:00
|
|
|
|
2012-07-08 16:35:58 +02:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 1, or (at your option)
|
|
|
|
any later version.
|
2012-02-06 14:59:56 +01:00
|
|
|
|
2012-07-08 16:35:58 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2012-02-06 14:59:56 +01:00
|
|
|
|
2012-07-08 16:35:58 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA.
|
2012-02-06 14:59:56 +01:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
2012-07-08 18:55:35 +02:00
|
|
|
#ifndef __C_COMPLEX_H
|
|
|
|
#define __C_COMPLEX_H
|
2012-02-06 14:59:56 +01:00
|
|
|
|
2012-07-08 18:55:35 +02:00
|
|
|
#include "main.h"
|
2012-02-18 23:06:10 +01:00
|
|
|
|
2012-07-08 18:55:35 +02:00
|
|
|
#ifndef _C_COMPLEX_C
|
|
|
|
extern GB_DESC ComplexDesc[];
|
2012-07-10 02:13:00 +02:00
|
|
|
extern gsl_complex COMPLEX_zero;
|
|
|
|
//extern GB_DESC ComplexArrayDesc[];
|
2012-07-08 18:55:35 +02:00
|
|
|
#endif
|
2012-02-06 14:59:56 +01:00
|
|
|
|
|
|
|
typedef
|
2012-07-08 16:35:58 +02:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
GB_BASE ob;
|
|
|
|
gsl_complex number;
|
|
|
|
}
|
2012-07-10 02:13:00 +02:00
|
|
|
CCOMPLEX;
|
2012-07-08 16:35:58 +02:00
|
|
|
|
2012-07-10 17:23:59 +02:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
CGV_ERR,
|
|
|
|
CGV_FLOAT,
|
|
|
|
CGV_COMPLEX
|
|
|
|
};
|
2012-07-10 02:13:00 +02:00
|
|
|
|
|
|
|
CCOMPLEX *COMPLEX_create(gsl_complex number);
|
|
|
|
CCOMPLEX *COMPLEX_push_complex(double value);
|
2012-07-09 01:23:24 +02:00
|
|
|
char *COMPLEX_to_string(gsl_complex number, bool local);
|
2012-02-16 00:52:30 +01:00
|
|
|
|
2012-07-10 02:13:00 +02:00
|
|
|
#define COMPLEX_get(_c) ((_c) ? (_c)->number : COMPLEX_zero)
|
|
|
|
|
2012-07-10 17:23:59 +02:00
|
|
|
int COMPLEX_get_value(GB_VALUE *value, double *x, gsl_complex *z);
|
|
|
|
|
2012-07-08 18:55:35 +02:00
|
|
|
#endif /* __C_COMPLEX_H */
|