Qucs-core
0.0.18
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <cmath>
#include "logging.h"
#include "complex.h"
#include "object.h"
#include "vector.h"
#include "matrix.h"
#include "poly.h"
#include "spline.h"
#include "fourier.h"
#include "receiver.h"
#include "constants.h"
#include "fspecial.h"
#include "circuit.h"
#include "range.h"
#include "equation.h"
#include "evaluate.h"
#include "exception.h"
#include "exceptionstack.h"
#include "strlist.h"
#include "applications.h"
Go to the source code of this file.
Macros | |
#define | D(con) ((constant *) (con))->d |
#define | C(con) ((constant *) (con))->c |
#define | V(con) ((constant *) (con))->v |
#define | M(con) ((constant *) (con))->m |
#define | MV(con) ((constant *) (con))->mv |
#define | STR(con) ((constant *) (con))->s |
#define | CHR(con) ((constant *) (con))->chr |
#define | INT(con) ((int) D (con)) |
#define | RNG(con) ((constant *) (con))->r |
#define | B(con) ((constant *) (con))->b |
#define | A(a) ((assignment *) (a)) |
#define | R(r) ((reference *) (r)) |
#define | _ARES(idx) args->getResult(idx) |
#define | _ARG(idx) args->get(idx) |
#define | _D(var, idx) nr_double_t (var) = D (_ARES (idx)); |
#define | _BO(var, idx) bool (var) = B (_ARES (idx)); |
#define | _CX(var, idx) nr_complex_t * (var) = C (_ARES (idx)); |
#define | _V(var, idx) qucs::vector * (var) = V (_ARES (idx)); |
#define | _M(var, idx) matrix * (var) = M (_ARES (idx)); |
#define | _MV(var, idx) matvec * (var) = MV (_ARES (idx)); |
#define | _I(var, idx) int (var) = INT (_ARES (idx)); |
#define | _R(var, idx) range * (var) = RNG (_ARES (idx)); |
#define | _ARR0(var) _R (var,0) |
#define | _ARR1(var) _R (var,1) |
#define | _ARR2(var) _R (var,2) |
#define | _ARI0(var) _I (var,0) |
#define | _ARI1(var) _I (var,1) |
#define | _ARI2(var) _I (var,2) |
#define | _ARD0(var) _D (var,0) |
#define | _ARD1(var) _D (var,1) |
#define | _ARD2(var) _D (var,2) |
#define | _ARB0(var) _BO (var,0) |
#define | _ARB1(var) _BO (var,1) |
#define | _ARB2(var) _BO (var,2) |
#define | _ARC0(var) _CX (var,0) |
#define | _ARC1(var) _CX (var,1) |
#define | _ARC2(var) _CX (var,2) |
#define | _ARM0(var) _M (var,0) |
#define | _ARM1(var) _M (var,1) |
#define | _ARM2(var) _M (var,2) |
#define | _ARV0(var) _V (var,0) |
#define | _ARV1(var) _V (var,1) |
#define | _ARV2(var) _V (var,2) |
#define | _ARMV0(var) _MV (var,0) |
#define | _ARMV1(var) _MV (var,1) |
#define | _ARMV2(var) _MV (var,2) |
#define | _DEFD() constant * res = new constant (TAG_DOUBLE); |
#define | _DEFB() constant * res = new constant (TAG_BOOLEAN); |
#define | _DEFC() constant * res = new constant (TAG_COMPLEX); |
#define | _DEFV() constant * res = new constant (TAG_VECTOR); |
#define | _DEFM() constant * res = new constant (TAG_MATRIX); |
#define | _DEFMV() constant * res = new constant (TAG_MATVEC); |
#define | _DEFR() constant * res = new constant (TAG_RANGE); |
#define | _RETD(var) res->d = (var); return res; |
#define | _RETD_QUCS(var) res->d = (qucs::var); return res; |
#define | _RETD_STD(var) res->d = (std::var); return res; |
#define | _RETD_SPECIAL(var) res->d = (fspecial::var); return res; |
#define | _RETB(var) res->b = (var); return res; |
#define | _RETC(var) res->c = new nr_complex_t (var); return res; |
#define | _RETV(var) res->v = new qucs::vector (var); return res; |
#define | _RETM(var) res->m = new matrix (var); return res; |
#define | _RETMV(var) res->mv = new matvec (var); return res; |
#define | _RETR(var) res->r = (var); return res; |
#define | __RETC() res->c = new nr_complex_t (); return res; |
#define | __RETV() res->v = new qucs::vector (); return res; |
#define | __RETM() res->m = new matrix (); return res; |
#define | __RETMV() res->mv = new matvec (); return res; |
#define | SOLVEE(idx) args->get(idx)->solvee |
#define | THROW_MATH_EXCEPTION(txt) |
#define | QUCS_CONCAT2(a, b) a/* */b |
#define | QUCS_CONCAT3(a, b, c) a/* */b/* */c |
#define | MAKE_FUNC_DEFINITION_0(cfunc) |
#define | MAKE_FUNC_DEFINITION_0_STD(cfunc) |
#define | MAKE_FUNC_DEFINITION_0_QUCS(cfunc) |
#define | MAKE_FUNC_DEFINITION_0_SPECIAL(cfunc) |
#define | MAKE_FUNC_DEFINITION_1(cfunc) |
#define | MAKE_FUNC_DEFINITION_2(cfunc) |
#define | EQUATION_HAS_DEPS(v, n) |
#define | EQUATION_DEPS(v) ((v)->getDataDependencies() ? (v)->getDataDependencies()->length() : 1) |
#define | INTERPOL_HELPER() |
#define | FOURIER_HELPER_1(efunc, cfunc, isign, dep) |
#define | FOURIER_HELPER_2(cfunc) |
#define | MAKE_FUNC_DEFINITION_3(cfunc) |
#define | _CHKM(m) |
#define | _CHKMV(mv) |
#define | _CHKMA(m, cond) |
#define | _CHKMVA(mv, cond) |
#define | CIRCLE_HELPER_D(argi) |
#define | CIRCLE_HELPER_A() |
#define __RETC | ( | ) | res->c = new nr_complex_t (); return res; |
Definition at line 135 of file evaluate.cpp.
#define __RETM | ( | ) | res->m = new matrix (); return res; |
Definition at line 137 of file evaluate.cpp.
#define __RETMV | ( | ) | res->mv = new matvec (); return res; |
Definition at line 138 of file evaluate.cpp.
#define __RETV | ( | ) | res->v = new qucs::vector (); return res; |
Definition at line 136 of file evaluate.cpp.
Definition at line 97 of file evaluate.cpp.
Definition at line 98 of file evaluate.cpp.
Definition at line 99 of file evaluate.cpp.
Definition at line 100 of file evaluate.cpp.
Definition at line 101 of file evaluate.cpp.
Definition at line 102 of file evaluate.cpp.
Definition at line 94 of file evaluate.cpp.
Definition at line 95 of file evaluate.cpp.
Definition at line 96 of file evaluate.cpp.
#define _ARES | ( | idx | ) | args->getResult(idx) |
Definition at line 76 of file evaluate.cpp.
#define _ARG | ( | idx | ) | args->get(idx) |
Definition at line 77 of file evaluate.cpp.
Definition at line 91 of file evaluate.cpp.
Definition at line 92 of file evaluate.cpp.
Definition at line 93 of file evaluate.cpp.
Definition at line 103 of file evaluate.cpp.
Definition at line 104 of file evaluate.cpp.
Definition at line 105 of file evaluate.cpp.
Definition at line 109 of file evaluate.cpp.
Definition at line 110 of file evaluate.cpp.
Definition at line 111 of file evaluate.cpp.
Definition at line 88 of file evaluate.cpp.
Definition at line 89 of file evaluate.cpp.
Definition at line 90 of file evaluate.cpp.
Definition at line 106 of file evaluate.cpp.
Definition at line 107 of file evaluate.cpp.
Definition at line 108 of file evaluate.cpp.
#define _CHKM | ( | m | ) |
Definition at line 2423 of file evaluate.cpp.
#define _CHKMA | ( | m, | |
cond | |||
) |
Definition at line 2433 of file evaluate.cpp.
#define _CHKMV | ( | mv | ) |
Definition at line 2428 of file evaluate.cpp.
#define _CHKMVA | ( | mv, | |
cond | |||
) |
Definition at line 2438 of file evaluate.cpp.
#define _CX | ( | var, | |
idx | |||
) | nr_complex_t * (var) = C (_ARES (idx)); |
Definition at line 81 of file evaluate.cpp.
Definition at line 79 of file evaluate.cpp.
Definition at line 115 of file evaluate.cpp.
Definition at line 116 of file evaluate.cpp.
Definition at line 114 of file evaluate.cpp.
Definition at line 118 of file evaluate.cpp.
Definition at line 119 of file evaluate.cpp.
Definition at line 120 of file evaluate.cpp.
Definition at line 117 of file evaluate.cpp.
Definition at line 83 of file evaluate.cpp.
Definition at line 84 of file evaluate.cpp.
Definition at line 86 of file evaluate.cpp.
Definition at line 127 of file evaluate.cpp.
#define _RETC | ( | var | ) | res->c = new nr_complex_t (var); return res; |
Definition at line 128 of file evaluate.cpp.
Definition at line 123 of file evaluate.cpp.
Definition at line 124 of file evaluate.cpp.
#define _RETD_SPECIAL | ( | var | ) | res->d = (fspecial::var); return res; |
Definition at line 126 of file evaluate.cpp.
Definition at line 125 of file evaluate.cpp.
Definition at line 130 of file evaluate.cpp.
Definition at line 131 of file evaluate.cpp.
Definition at line 132 of file evaluate.cpp.
#define _RETV | ( | var | ) | res->v = new qucs::vector (var); return res; |
Definition at line 129 of file evaluate.cpp.
#define _V | ( | var, | |
idx | |||
) | qucs::vector * (var) = V (_ARES (idx)); |
Definition at line 82 of file evaluate.cpp.
#define A | ( | a | ) | ((assignment *) (a)) |
Definition at line 72 of file evaluate.cpp.
#define B | ( | con | ) | ((constant *) (con))->b |
Definition at line 70 of file evaluate.cpp.
Definition at line 62 of file evaluate.cpp.
Definition at line 67 of file evaluate.cpp.
#define CIRCLE_HELPER_A | ( | ) |
Definition at line 2809 of file evaluate.cpp.
#define CIRCLE_HELPER_D | ( | argi | ) |
Definition at line 2792 of file evaluate.cpp.
Definition at line 61 of file evaluate.cpp.
Definition at line 2121 of file evaluate.cpp.
Definition at line 2118 of file evaluate.cpp.
#define FOURIER_HELPER_1 | ( | efunc, | |
cfunc, | |||
isign, | |||
dep | |||
) |
Definition at line 2291 of file evaluate.cpp.
#define FOURIER_HELPER_2 | ( | cfunc | ) |
Definition at line 2318 of file evaluate.cpp.
Definition at line 68 of file evaluate.cpp.
#define INTERPOL_HELPER | ( | ) |
Definition at line 2245 of file evaluate.cpp.
#define M | ( | con | ) | ((constant *) (con))->m |
Definition at line 64 of file evaluate.cpp.
#define MAKE_FUNC_DEFINITION_0 | ( | cfunc | ) |
Definition at line 160 of file evaluate.cpp.
#define MAKE_FUNC_DEFINITION_0_QUCS | ( | cfunc | ) |
Definition at line 198 of file evaluate.cpp.
#define MAKE_FUNC_DEFINITION_0_SPECIAL | ( | cfunc | ) |
Definition at line 217 of file evaluate.cpp.
#define MAKE_FUNC_DEFINITION_0_STD | ( | cfunc | ) |
Definition at line 179 of file evaluate.cpp.
#define MAKE_FUNC_DEFINITION_1 | ( | cfunc | ) |
Definition at line 234 of file evaluate.cpp.
#define MAKE_FUNC_DEFINITION_2 | ( | cfunc | ) |
Definition at line 1783 of file evaluate.cpp.
#define MAKE_FUNC_DEFINITION_3 | ( | cfunc | ) |
Definition at line 2344 of file evaluate.cpp.
#define MV | ( | con | ) | ((constant *) (con))->mv |
Definition at line 65 of file evaluate.cpp.
#define QUCS_CONCAT2 | ( | a, | |
b | |||
) | a/* */b |
Definition at line 155 of file evaluate.cpp.
Definition at line 156 of file evaluate.cpp.
Definition at line 73 of file evaluate.cpp.
Definition at line 69 of file evaluate.cpp.
#define SOLVEE | ( | idx | ) | args->get(idx)->solvee |
Definition at line 140 of file evaluate.cpp.
Definition at line 66 of file evaluate.cpp.
#define THROW_MATH_EXCEPTION | ( | txt | ) |
Definition at line 143 of file evaluate.cpp.
Definition at line 63 of file evaluate.cpp.
FOURIER_HELPER_1 | ( | time2freq | , |
dft | , | ||
1 | , | ||
"Frequency" | |||
) |
FOURIER_HELPER_1 | ( | freq2time | , |
idft | , | ||
- | 1, | ||
"Time" | |||
) |
FOURIER_HELPER_2 | ( | fft | ) |
FOURIER_HELPER_2 | ( | ifft | ) |
FOURIER_HELPER_2 | ( | dft | ) |
FOURIER_HELPER_2 | ( | idft | ) |
MAKE_FUNC_DEFINITION_0 | ( | exp | ) |
MAKE_FUNC_DEFINITION_0 | ( | limexp | ) |
MAKE_FUNC_DEFINITION_0 | ( | sin | ) |
MAKE_FUNC_DEFINITION_0 | ( | cos | ) |
MAKE_FUNC_DEFINITION_0 | ( | tan | ) |
MAKE_FUNC_DEFINITION_0 | ( | sinh | ) |
MAKE_FUNC_DEFINITION_0 | ( | cosh | ) |
MAKE_FUNC_DEFINITION_0 | ( | tanh | ) |
MAKE_FUNC_DEFINITION_0 | ( | sqr | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | coth | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | sech | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | cosech | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | signum | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | sign | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | sinc | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | fix | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | step | ) |
MAKE_FUNC_DEFINITION_0_QUCS | ( | round | ) |
MAKE_FUNC_DEFINITION_0_SPECIAL | ( | erf | ) |
MAKE_FUNC_DEFINITION_0_SPECIAL | ( | erfc | ) |
MAKE_FUNC_DEFINITION_0_SPECIAL | ( | erfinv | ) |
MAKE_FUNC_DEFINITION_0_SPECIAL | ( | erfcinv | ) |
MAKE_FUNC_DEFINITION_0_SPECIAL | ( | i0 | ) |
MAKE_FUNC_DEFINITION_0_STD | ( | ceil | ) |
MAKE_FUNC_DEFINITION_0_STD | ( | floor | ) |
MAKE_FUNC_DEFINITION_1 | ( | real | ) |
MAKE_FUNC_DEFINITION_1 | ( | imag | ) |
MAKE_FUNC_DEFINITION_1 | ( | abs | ) |
MAKE_FUNC_DEFINITION_2 | ( | ztor | ) |
MAKE_FUNC_DEFINITION_2 | ( | rtoz | ) |
MAKE_FUNC_DEFINITION_2 | ( | ytor | ) |
MAKE_FUNC_DEFINITION_2 | ( | rtoy | ) |
MAKE_FUNC_DEFINITION_3 | ( | stoy | ) |
MAKE_FUNC_DEFINITION_3 | ( | ytos | ) |
MAKE_FUNC_DEFINITION_3 | ( | stoz | ) |
MAKE_FUNC_DEFINITION_3 | ( | ztos | ) |