Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
history.h
Go to the documentation of this file.
1 /*
2  * history.h - history class definitions
3  *
4  * Copyright (C) 2006, 2007 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 __HISTORY_H__
26 #define __HISTORY_H__
27 
28 namespace qucs {
29 
30 class history
31 {
32  public:
33  // constructor and destructor set
34  history ();
35  history (nr_double_t);
36  history (const history &);
37  ~history ();
38 
39  void append (nr_double_t);
40  void truncate (int);
41  void truncate (nr_double_t);
42  void setAge (nr_double_t a) { age = a; }
43  nr_double_t getAge (void) { return age; }
44  int getSize (void);
45  nr_double_t duration (void);
46  nr_double_t last (void);
47  nr_double_t first (void);
48 
49  int leftidx (void);
50  int unused (void);
51  void drop (void);
53  tvector<nr_double_t> * getTvector (void) { return t; }
54  void self (void) { t = values; }
55 
56  nr_double_t interpol (nr_double_t, int, bool);
57  nr_double_t nearest (nr_double_t, bool interpolate = true);
58  int seek (nr_double_t, int, int, nr_double_t&, int);
59  nr_double_t getTfromidx (int);
60  nr_double_t getValfromidx (int);
61 
62  private:
63  bool sign;
64  nr_double_t age;
67 };
68 
69 } // namespace qucs
70 
71 #endif /* __HISTORY_H__ */
tvector< nr_double_t > * values
Definition: history.h:65
nr_double_t age
Definition: history.h:64
int leftidx(void)
Definition: history.cpp:93
nr_double_t getTfromidx(int)
Definition: history.cpp:206
tvector< nr_double_t > * getTvector(void)
Definition: history.h:53
nr_double_t last(void)
Definition: history.cpp:113
void append(nr_double_t)
Definition: history.cpp:62
nr_double_t getAge(void)
Definition: history.h:43
void truncate(int)
Definition: history.cpp:69
void setAge(nr_double_t a)
Definition: history.h:42
tvector< nr_double_t > * t
Definition: history.h:66
nr_double_t first(void)
Definition: history.cpp:108
v
Definition: parse_zvr.y:141
int getSize(void)
Definition: history.cpp:230
nr_double_t duration(void)
Definition: history.cpp:118
void setTvector(tvector< nr_double_t > *v)
Definition: history.h:52
int unused(void)
Definition: history.cpp:101
nr_double_t nearest(nr_double_t, bool interpolate=true)
Definition: history.cpp:160
bool sign
Definition: history.h:63
void drop(void)
Definition: history.cpp:124
nr_double_t getValfromidx(int)
Definition: history.cpp:218
int seek(nr_double_t, int, int, nr_double_t &, int)
Definition: history.cpp:179
nr_double_t interpol(nr_double_t, int, bool)
Definition: history.cpp:138