My Project
0.0.16
QUCS Mapping
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "logging.h"
#include "complex.h"
#include "object.h"
#include "consts.h"
#include "equation.h"
#include "differentiate.h"
#include "constants.h"
Go to the source code of this file.
Classes | |
struct | eqn |
Macros | |
#define | C(con) ((constant *) (con)) |
#define | A(con) ((application *) (con)) |
#define | R(con) ((reference *) (con)) |
#define | D(con) (C(con)->d) |
#define | isConst(n) ((n)->getTag()==CONSTANT && C(n)->getType()==TAG_DOUBLE) |
#define | isRef(r, v) ((r)->getTag()==REFERENCE && !strcmp(R(r)->n,v)) |
#define | isZero(n) (isConst(n) && D(n) == 0.0) |
#define | isOne(n) (isConst(n) && D(n) == 1.0) |
#define | isNeg(n) (isConst(n) && D(n) == -1.0) |
#define | isEuler(n) ((isConst(n) && D(n) == M_E) || isRef(n,"e")) |
#define | isval(n, v) (isConst(n) && D(n) == v) |
#define | isVar(v) ((v)->getTag()==REFERENCE) |
#define | isApp(v) ((v)->getTag()==APPLICATION) |
#define | isMul(v) (isApp(v) && !strcmp(A(v)->n,"*")) |
#define | isSqr(v) (isApp(v) && !strcmp(A(v)->n,"sqr")) |
#define | retCon(val) constant * res = new constant (TAG_DOUBLE); res->d = val; return res; |
#define | defCon(def, val) constant * def = new constant (TAG_DOUBLE); def->d = val; |
#define | defRef(def, var) reference * def = new reference (); def->n = strdup (var); |
#define | retApp1(op, f0) |
#define | defApp1(def, op, f0) |
#define | defApp2(def, op, f0, f1) |
#define | retApp2(op, f0, f1) |
#define | retApp3(op, f0, f1, f2) |
#define | defApp3(def, op, f0, f1, f2) |
#define | _A(idx) app->args->get(idx) |
#define | _A0 _A(0) |
#define | _A1 _A(1) |
#define | _A2 _A(2) |
#define | _D0 _A(0)->differentiate (derivative) |
#define | _D1 _A(1)->differentiate (derivative) |
#define | _D2 _A(2)->differentiate (derivative) |
#define | _AF0(var) node * var = _A0; |
#define | _AF1(var) node * var = _A1; |
#define | _AF2(var) node * var = _A2; |
#define | _AD0(var) node * var = _D0; |
#define | _AD1(var) node * var = _D1; |
#define | _AD2(var) node * var = _D2; |
#define | _AA(a, idx) A(a)->args->get(idx) |
#define | _AA0(a) _AA(a,0) |
#define | _AA1(a) _AA(a,1) |
#define | _AAF0(a, var) node * var = _AA0(a); |
#define | _AAF1(a, var) node * var = _AA1(a); |
#define _A | ( | idx | ) | app->args->get(idx) |
Definition at line 90 of file differentiate.cpp.
#define _A0 _A(0) |
Definition at line 91 of file differentiate.cpp.
#define _A1 _A(1) |
Definition at line 92 of file differentiate.cpp.
#define _A2 _A(2) |
Definition at line 93 of file differentiate.cpp.
#define _AA | ( | a, | |
idx | |||
) | A(a)->args->get(idx) |
Definition at line 105 of file differentiate.cpp.
#define _AA0 | ( | a | ) | _AA(a,0) |
Definition at line 106 of file differentiate.cpp.
#define _AA1 | ( | a | ) | _AA(a,1) |
Definition at line 107 of file differentiate.cpp.
Definition at line 109 of file differentiate.cpp.
Definition at line 110 of file differentiate.cpp.
Definition at line 101 of file differentiate.cpp.
Definition at line 102 of file differentiate.cpp.
Definition at line 103 of file differentiate.cpp.
Definition at line 98 of file differentiate.cpp.
Definition at line 99 of file differentiate.cpp.
Definition at line 100 of file differentiate.cpp.
#define _D0 _A(0)->differentiate (derivative) |
Definition at line 94 of file differentiate.cpp.
#define _D1 _A(1)->differentiate (derivative) |
Definition at line 95 of file differentiate.cpp.
#define _D2 _A(2)->differentiate (derivative) |
Definition at line 96 of file differentiate.cpp.
#define A | ( | con | ) | ((application *) (con)) |
Definition at line 46 of file differentiate.cpp.
#define C | ( | con | ) | ((constant *) (con)) |
Definition at line 45 of file differentiate.cpp.
#define D | ( | con | ) | (C(con)->d) |
Definition at line 48 of file differentiate.cpp.
#define defApp1 | ( | def, | |
op, | |||
f0 | |||
) |
Definition at line 72 of file differentiate.cpp.
#define defApp2 | ( | def, | |
op, | |||
f0, | |||
f1 | |||
) |
Definition at line 75 of file differentiate.cpp.
#define defApp3 | ( | def, | |
op, | |||
f0, | |||
f1, | |||
f2 | |||
) |
Definition at line 85 of file differentiate.cpp.
#define defCon | ( | def, | |
val | |||
) | constant * def = new constant (TAG_DOUBLE); def->d = val; |
Definition at line 65 of file differentiate.cpp.
#define defRef | ( | def, | |
var | |||
) | reference * def = new reference (); def->n = strdup (var); |
Definition at line 67 of file differentiate.cpp.
#define isApp | ( | v | ) | ((v)->getTag()==APPLICATION) |
Definition at line 59 of file differentiate.cpp.
Definition at line 50 of file differentiate.cpp.
Definition at line 55 of file differentiate.cpp.
Definition at line 60 of file differentiate.cpp.
Definition at line 51 of file differentiate.cpp.
Definition at line 61 of file differentiate.cpp.
#define isVar | ( | v | ) | ((v)->getTag()==REFERENCE) |
Definition at line 58 of file differentiate.cpp.
#define R | ( | con | ) | ((reference *) (con)) |
Definition at line 47 of file differentiate.cpp.
#define retApp1 | ( | op, | |
f0 | |||
) |
Definition at line 69 of file differentiate.cpp.
#define retApp2 | ( | op, | |
f0, | |||
f1 | |||
) |
Definition at line 78 of file differentiate.cpp.
#define retApp3 | ( | op, | |
f0, | |||
f1, | |||
f2 | |||
) |
Definition at line 81 of file differentiate.cpp.
#define retCon | ( | val | ) | constant * res = new constant (TAG_DOUBLE); res->d = val; return res; |
Definition at line 63 of file differentiate.cpp.