Mercurial > hg > octave-lyh
annotate liboctave/numeric/DASRT.h @ 17425:9289bb0ff4dd
io.tst: fix for-loop upper bound after change 3856298f1ff8
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Sat, 14 Sep 2013 11:19:25 +0200 |
parents | 648dabbb4c6b |
children |
rev | line source |
---|---|
3990 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
3 Copyright (C) 2002-2012 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 | |
23 #if !defined (octave_DASRT_h) | |
24 #define octave_DASRT_h 1 | |
25 | |
26 #include <cfloat> | |
27 | |
3998 | 28 #include "DASRT-opts.h" |
7231 | 29 #include "lo-math.h" |
3990 | 30 |
31 class | |
32 DASRT_result | |
33 { | |
34 public: | |
35 | |
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
|
36 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
|
37 : x (), xdot (), t () { } |
3990 | 38 |
39 DASRT_result (const Matrix& xx, const Matrix& xxdot, const ColumnVector& tt) | |
40 : x (xx), xdot (xxdot), t (tt) { } | |
41 | |
42 DASRT_result (const DASRT_result& r) | |
43 : x (r.x), xdot (r.xdot), t (r.t) { } | |
44 | |
45 DASRT_result& operator = (const DASRT_result& r) | |
46 { | |
47 if (this != &r) | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
48 { |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
49 x = r.x; |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
50 xdot = r.xdot; |
3990 | 51 t = r.t; |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
52 } |
3990 | 53 return *this; |
54 } | |
55 | |
56 ~DASRT_result (void) { } | |
57 | |
58 Matrix state (void) const { return x; } | |
59 Matrix deriv (void) const { return xdot; } | |
60 ColumnVector times (void) const { return t; } | |
61 | |
62 private: | |
63 | |
64 Matrix x; | |
65 Matrix xdot; | |
66 ColumnVector t; | |
67 }; | |
68 | |
69 class | |
6108 | 70 OCTAVE_API |
3990 | 71 DASRT : public DAERT, public DASRT_options |
72 { | |
73 public: | |
74 | |
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
|
75 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
|
76 : 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
|
77 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
|
78 abs_tol (), rel_tol () |
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
|
79 { } |
3990 | 80 |
4587 | 81 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
|
82 : 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
|
83 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
|
84 abs_tol (), rel_tol () |
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
|
85 { } |
3994 | 86 |
4587 | 87 DASRT (const ColumnVector& s, const ColumnVector& deriv, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
88 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
|
89 : 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
|
90 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
|
91 abs_tol (), rel_tol () |
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
|
92 { } |
3990 | 93 |
94 ~DASRT (void) { } | |
95 | |
96 DASRT_result integrate (const ColumnVector& tout); | |
97 | |
98 DASRT_result integrate (const ColumnVector& tout, | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
99 const ColumnVector& tcrit); |
3990 | 100 |
3995 | 101 std::string error_message (void) const; |
102 | |
3990 | 103 private: |
104 | |
105 bool initialized; | |
106 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
107 octave_idx_type liw; |
5275 | 108 octave_idx_type lrw; |
3990 | 109 |
5275 | 110 octave_idx_type ng; |
3990 | 111 |
5275 | 112 Array<octave_idx_type> info; |
113 Array<octave_idx_type> iwork; | |
114 Array<octave_idx_type> jroot; | |
3990 | 115 |
116 Array<double> rwork; | |
117 | |
3998 | 118 Array<double> abs_tol; |
119 Array<double> rel_tol; | |
3990 | 120 |
121 void integrate (double t); | |
122 }; | |
123 | |
124 #endif |