Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tridiag.h
Go to the documentation of this file.
1 /*
2  * tridiag.h - tridiagonal matrix template class definitions
3  *
4  * Copyright (C) 2005 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 __TRIDIAG_H__
26 #define __TRIDIAG_H__
27 
28 #include "tvector.h"
29 
30 namespace qucs {
31 
32 // Types of tridiagonal matrices.
39 };
40 
41 template <class nr_type_t>
42 class tridiag
43 {
44  public:
45  tridiag ();
46  tridiag (const tridiag &);
47  const tridiag& operator = (const tridiag &);
48  ~tridiag ();
49 
52  void setA (tvector<nr_type_t> *);
53  void setB (tvector<nr_type_t> *);
54  void setRHS (tvector<nr_type_t> *);
55  void setType (int t) { type = t; }
56 
57  void solve (void);
58  void solve_ns (void);
59  void solve_ns_cyc (void);
60  void solve_s (void);
61  void solve_s_cyc (void);
62 
63  private:
69 
70  nr_type_t * d;
71  nr_type_t * e;
72  nr_type_t * f;
73  nr_type_t * z;
74  nr_type_t * c;
75  nr_type_t * b;
76  nr_type_t * x;
77  nr_type_t * al;
78  nr_type_t * be;
79  nr_type_t * ga;
80  nr_type_t * de;
81  nr_type_t * ep;
82 
83  int type;
84 };
85 
86 } // namespace qucs
87 
88 #include "tridiag.cpp"
89 
90 #endif /* __TRIDIAG_H__ */
nr_type_t * x
Definition: tridiag.h:76
nr_type_t * be
Definition: tridiag.h:78
void setDiagonal(tvector< nr_type_t > *)
Definition: tridiag.cpp:83
tvector< nr_type_t > * diag
Definition: tridiag.h:66
nr_type_t * ep
Definition: tridiag.h:81
t
Definition: parse_vcd.y:290
nr_type_t * c
Definition: tridiag.h:74
nr_type_t * e
Definition: tridiag.h:71
void solve_ns(void)
Definition: tridiag.cpp:140
tvector< nr_type_t > * offdiag
Definition: tridiag.h:67
void solve_s_cyc(void)
Definition: tridiag.cpp:290
tridiag_type
Definition: tridiag.h:33
nr_type_t * al
Definition: tridiag.h:77
tvector< nr_type_t > * abov
Definition: tridiag.h:64
tvector< nr_type_t > * belo
Definition: tridiag.h:65
void setType(int t)
Definition: tridiag.h:55
void solve_s(void)
Definition: tridiag.cpp:243
void solve(void)
Definition: tridiag.cpp:117
nr_type_t * b
Definition: tridiag.h:75
nr_type_t * de
Definition: tridiag.h:80
tvector< nr_type_t > * rhs
Definition: tridiag.h:68
void setOffDiagonal(tvector< nr_type_t > *)
Definition: tridiag.cpp:89
void setB(tvector< nr_type_t > *)
Definition: tridiag.cpp:101
const tridiag & operator=(const tridiag &)
Definition: tridiag.cpp:64
nr_type_t * ga
Definition: tridiag.h:79
nr_type_t * f
Definition: tridiag.h:72
void solve_ns_cyc(void)
Definition: tridiag.cpp:179
nr_type_t * d
Definition: tridiag.h:70
void setRHS(tvector< nr_type_t > *)
Definition: tridiag.cpp:107
void setA(tvector< nr_type_t > *)
Definition: tridiag.cpp:95
nr_type_t * z
Definition: tridiag.h:73