Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
spfile.h
Go to the documentation of this file.
1 /*
2  * spfile.h - S-parameter file class definitions
3  *
4  * Copyright (C) 2004, 2005, 2006, 2008, 2009 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 __SPFILE_H__
26 #define __SPFILE_H__
27 
28 namespace qucs {
29  class vector;
30  class matvec;
31  class dataset;
32  class interpolator;
33 }
34 
36 {
37  public:
38  spfile_vector ();
39  ~spfile_vector ();
40 
41  public:
42  void prepare (qucs::vector *, qucs::vector *, bool, int, int);
43  nr_complex_t interpolate (nr_double_t);
44 
45  public:
48  int isreal;
50  int r;
51  int c;
52 };
53 
54 class spfile : public qucs::circuit
55 {
56  public:
57  CREATOR (spfile);
58  ~spfile ();
59  void initSP (void);
60  void calcSP (nr_double_t);
61  void calcNoiseSP (nr_double_t);
62  void initDC (void);
63  void initTR (void);
64  void initAC (void);
65  void calcAC (nr_double_t);
66  void calcNoiseAC (nr_double_t);
67  void createIndex (void);
68  void prepare (void);
69  void createVector (int, int);
70  qucs::matrix correlationMatrix (nr_double_t, nr_complex_t, nr_double_t, qucs::matrix);
71  nr_double_t noiseFigure (qucs::matrix, qucs::matrix, nr_double_t&, nr_complex_t&,
72  nr_double_t&);
77  qucs::matrix getInterpolMatrixS (nr_double_t);
78  qucs::matrix calcMatrixCs (nr_double_t);
79 
80  private:
88  char paraType;
89  int dataType;
91 };
92 
93 #endif /* __SPFILE_H__ */
std::complex< nr_double_t > nr_complex_t
Definition: complex.h:31
void prepare(qucs::vector *, qucs::vector *, bool, int, int)
Definition: spfile.cpp:54
void calcNoiseSP(nr_double_t)
Definition: spfile.cpp:144
qucs::vector * v
Definition: spfile.h:46
qucs::matrix calcMatrixCs(nr_double_t)
Definition: spfile.cpp:150
spfile_vector * FMIN
Definition: spfile.h:86
qucs::matrix expandNoiseMatrix(qucs::matrix, qucs::matrix)
Definition: spfile.cpp:225
void initDC(void)
Definition: spfile.cpp:453
int dataType
Definition: spfile.h:89
~spfile_vector()
Definition: spfile.cpp:49
void initTR(void)
Definition: spfile.cpp:513
void prepare(void)
Definition: spfile.cpp:287
qucs::matrix expandSParaMatrix(qucs::matrix)
Definition: spfile.cpp:164
qucs::matrix correlationMatrix(nr_double_t, nr_complex_t, nr_double_t, qucs::matrix)
Definition: spfile.cpp:405
base class for qucs circuit elements.
Definition: circuit.h:92
int isreal
Definition: spfile.h:48
char paraType
Definition: spfile.h:88
spfile_vector * RN
Definition: spfile.h:85
void createVector(int, int)
Definition: spfile.cpp:342
spfile_vector * SOPT
Definition: spfile.h:87
void calcAC(nr_double_t)
Definition: spfile.cpp:498
Dense complex matrix class This class defines a matrix object with its methods, operators and operati...
Definition: matrix.h:92
void calcSP(nr_double_t)
Definition: spfile.cpp:103
spfile_vector * spara
Definition: spfile.h:84
int interpolType
Definition: spfile.h:90
qucs::matrix shrinkNoiseMatrix(qucs::matrix, qucs::matrix)
Definition: spfile.cpp:262
void initAC(void)
Definition: spfile.cpp:492
nr_complex_t interpolate(nr_double_t)
Definition: spfile.cpp:71
~spfile()
Definition: spfile.cpp:89
CREATOR(spfile)
qucs::matrix getInterpolMatrixS(nr_double_t)
Definition: spfile.cpp:115
qucs::dataset * data
Definition: spfile.h:81
void calcNoiseAC(nr_double_t)
Definition: spfile.cpp:507
void createIndex(void)
Definition: spfile.cpp:358
void initSP(void)
placehoder for S-Parameter initialisation function
Definition: spfile.cpp:333
qucs::vector * nfreq
Definition: spfile.h:83
nr_double_t noiseFigure(qucs::matrix, qucs::matrix, nr_double_t &, nr_complex_t &, nr_double_t &)
Definition: spfile.cpp:421
qucs::vector * f
Definition: spfile.h:47
qucs::vector * sfreq
Definition: spfile.h:82
qucs::interpolator * inter
Definition: spfile.h:49
qucs::matrix shrinkSParaMatrix(qucs::matrix)
Definition: spfile.cpp:204