Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
differentiate.h
Go to the documentation of this file.
1 /*
2  * differentiate.h - definitions for Qucs equation derivatives
3  *
4  * Copyright (C) 2007, 2008 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id$
22  *
23  */
24 
25 #ifndef __DIFFERENTIATE_H__
26 #define __DIFFERENTIATE_H__
27 
28 namespace qucs {
29 
30 namespace eqn {
31 
32 class constant;
33 
34 /* This class is merely a container for the derivatives which can be
35  applied to equations. */
37 {
38  public:
39  static node * plus_binary (application *, char *);
40  static node * plus_unary (application *, char *);
41  static node * minus_binary (application *, char *);
42  static node * minus_unary (application *, char *);
43  static node * times (application *, char *);
44  static node * over (application *, char *);
45  static node * power (application *, char *);
46  static node * ln (application *, char *);
47  static node * log10 (application *, char *);
48  static node * log2 (application *, char *);
49  static node * sqrt (application *, char *);
50  static node * exp (application *, char *);
51  static node * sinc (application *, char *);
52  static node * norm (application *, char *);
53  static node * sin (application *, char *);
54  static node * cos (application *, char *);
55  static node * tan (application *, char *);
56  static node * sec (application *, char *);
57  static node * cot (application *, char *);
58  static node * cosec (application *, char *);
59  static node * arcsin (application *, char *);
60  static node * square (application *, char *);
61  static node * arccos (application *, char *);
62  static node * arctan (application *, char *);
63  static node * arccot (application *, char *);
64  static node * arcsec (application *, char *);
65  static node * arccosec (application *, char *);
66  static node * abs (application *, char *);
67  static node * step (application *, char *);
68  static node * sign (application *, char *);
69  static node * sinh (application *, char *);
70  static node * cosh (application *, char *);
71  static node * tanh (application *, char *);
72  static node * coth (application *, char *);
73  static node * arsinh (application *, char *);
74  static node * arcosh (application *, char *);
75  static node * artanh (application *, char *);
76  static node * arcoth (application *, char *);
77  static node * arsech (application *, char *);
78  static node * arcosech (application *, char *);
79  static node * ifthenelse (application *, char *);
80  static node * xhypot (application *, char *);
81  static node * limexp (application *, char *);
82  static node * vt (application *, char *);
83 
84  private:
85  static node * plus_reduce (node *, node *);
86  static node * minus_reduce (node *, node *);
87  static node * minus_reduce (node *);
88  static node * times_reduce (node *, node *);
89  static node * over_reduce (node *, node *);
90  static node * power_reduce (node *, node *);
91  static node * ln_reduce (node *);
92  static node * sqrt_reduce (node *);
93  static node * sqr_reduce (node *);
94  static node * app_reduce (const char *, node *, node *);
95  static node * hypot_reduce (node *, node *);
96 
97  private:
98  static void over_reduce_adv (node * &, node * &);
99 };
100 
101 // Type of derivative function.
102 typedef node * (* differentiator_t) (application *, char *);
103 
104 // Structure defining an differentiation.
106 {
107  const char * application; /* the name of the application */
108  differentiator_t derive; /* the actual differentiation function */
109  int nargs; /* number of arguments */
110 };
111 
112 extern struct differentiation_t differentiations[];
113 
114 } /* namespace eqn */
115 
116 } // namespace qucs
117 
118 #endif /* __DIFFERENTIATE_H__ */
static node * sec(application *, char *)
static node * sqrt_reduce(node *)
static node * times(application *, char *)
static node * limexp(application *, char *)
static node * power_reduce(node *, node *)
static node * plus_reduce(node *, node *)
static node * over(application *, char *)
static node * app_reduce(const char *, node *, node *)
static node * arcoth(application *, char *)
static node * times_reduce(node *, node *)
static node * sqr_reduce(node *)
static node * log2(application *, char *)
static void over_reduce_adv(node *&, node *&)
static node * sqrt(application *, char *)
static node * square(application *, char *)
static node * sinc(application *, char *)
static node * abs(application *, char *)
static node * ln(application *, char *)
static node * cot(application *, char *)
static node * vt(application *, char *)
static node * sinh(application *, char *)
static node * plus_binary(application *, char *)
static node * arcosech(application *, char *)
static node * tanh(application *, char *)
static node * sign(application *, char *)
static node * step(application *, char *)
static node * plus_unary(application *, char *)
static node * sin(application *, char *)
static node * xhypot(application *, char *)
static node * ln_reduce(node *)
static node * arcsin(application *, char *)
static node * norm(application *, char *)
struct differentiation_t differentiations[]
static node * hypot_reduce(node *, node *)
static node * tan(application *, char *)
static node * arcosh(application *, char *)
static node * power(application *, char *)
static node * exp(application *, char *)
static node * minus_unary(application *, char *)
static node * arccos(application *, char *)
static node * minus_binary(application *, char *)
static node * over_reduce(node *, node *)
static node * arccosec(application *, char *)
static node * cosh(application *, char *)
static node * ifthenelse(application *, char *)
static node * arcsec(application *, char *)
static node * arccot(application *, char *)
static node * minus_reduce(node *, node *)
static node * log10(application *, char *)
static node * arctan(application *, char *)
static node * cosec(application *, char *)
node *(* differentiator_t)(application *, char *)
static node * arsech(application *, char *)
static node * coth(application *, char *)
static node * arsinh(application *, char *)
static node * artanh(application *, char *)
static node * cos(application *, char *)