Mercurial > octave
annotate liboctave/numeric/DASRT.h @ 21218:2bb4e5a6290d
don't include lo-math.h in header files unnecessarily
* DASPK.h, DASRT.h, DASSL.h, LSODE.h, Quad.h, oct-time.h: Don't
include lo-math.h.
* oct-time.cc (octave_time::octave_time (double)): Move definition
here, from oct-time.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 07 Feb 2016 13:19:04 -0500 |
parents | f7084eae3318 |
children | 1473547f50f5 |
rev | line source |
---|---|
3990 | 1 /* |
2 | |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17769
diff
changeset
|
3 Copyright (C) 2002-2015 John W. Eaton |
3990 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
3990 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
3990 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_DASRT_h) |
3990 | 24 #define octave_DASRT_h 1 |
25 | |
26 #include <cfloat> | |
27 | |
3998 | 28 #include "DASRT-opts.h" |
3990 | 29 |
30 class | |
31 DASRT_result | |
32 { | |
33 public: | |
34 | |
11502
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
35 DASRT_result (void) |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
36 : x (), xdot (), t () { } |
3990 | 37 |
38 DASRT_result (const Matrix& xx, const Matrix& xxdot, const ColumnVector& tt) | |
39 : x (xx), xdot (xxdot), t (tt) { } | |
40 | |
41 DASRT_result (const DASRT_result& r) | |
42 : x (r.x), xdot (r.xdot), t (r.t) { } | |
43 | |
44 DASRT_result& operator = (const DASRT_result& r) | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
45 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
46 if (this != &r) |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
47 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
48 x = r.x; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
49 xdot = r.xdot; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
50 t = r.t; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
51 } |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
52 return *this; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
53 } |
3990 | 54 |
55 ~DASRT_result (void) { } | |
56 | |
57 Matrix state (void) const { return x; } | |
58 Matrix deriv (void) const { return xdot; } | |
59 ColumnVector times (void) const { return t; } | |
60 | |
61 private: | |
62 | |
63 Matrix x; | |
64 Matrix xdot; | |
65 ColumnVector t; | |
66 }; | |
67 | |
68 class | |
6108 | 69 OCTAVE_API |
3990 | 70 DASRT : public DAERT, public DASRT_options |
71 { | |
72 public: | |
73 | |
11502
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
74 DASRT (void) |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
75 : DAERT (), DASRT_options (), initialized (false), |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
76 liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (), |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
77 abs_tol (), rel_tol () |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
78 { } |
3990 | 79 |
4587 | 80 DASRT (const ColumnVector& s, double tm, DAERTFunc& f) |
11502
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
81 : DAERT (s, tm, f), DASRT_options (), initialized (false), |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
82 liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (), |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
83 abs_tol (), rel_tol () |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
84 { } |
3994 | 85 |
4587 | 86 DASRT (const ColumnVector& s, const ColumnVector& deriv, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
87 double tm, DAERTFunc& f) |
11502
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
88 : DAERT (s, deriv, tm, f), DASRT_options (), initialized (false), |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
89 liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (), |
4638800cd660
delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents:
10312
diff
changeset
|
90 abs_tol (), rel_tol () |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
91 { } |
3990 | 92 |
93 ~DASRT (void) { } | |
94 | |
95 DASRT_result integrate (const ColumnVector& tout); | |
96 | |
97 DASRT_result integrate (const ColumnVector& tout, | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
98 const ColumnVector& tcrit); |
3990 | 99 |
3995 | 100 std::string error_message (void) const; |
101 | |
3990 | 102 private: |
103 | |
104 bool initialized; | |
105 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
106 octave_idx_type liw; |
5275 | 107 octave_idx_type lrw; |
3990 | 108 |
5275 | 109 octave_idx_type ng; |
3990 | 110 |
5275 | 111 Array<octave_idx_type> info; |
112 Array<octave_idx_type> iwork; | |
113 Array<octave_idx_type> jroot; | |
3990 | 114 |
115 Array<double> rwork; | |
116 | |
3998 | 117 Array<double> abs_tol; |
118 Array<double> rel_tol; | |
3990 | 119 |
120 void integrate (double t); | |
121 }; | |
122 | |
123 #endif |