Mercurial > octave
annotate liboctave/numeric/DASRT.h @ 30564:796f54d4ddbf stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
In all .txi and .texi files except gpl.txi and gpl.texi in the
doc/liboctave and doc/interpreter directories, change the copyright
to "Octave Project Developers", the same as used for other source
files. Update copyright notices for 2022 (not done since 2019). For
gpl.txi and gpl.texi, change the copyright notice to be "Free Software
Foundation, Inc." and leave the date at 2007 only because this file
only contains the text of the GPL, not anything created by the Octave
Project Developers.
Add Paul Thomas to contributors.in.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Dec 2021 18:22:40 -0500 |
parents | 543dddb50f43 |
children | 597f3ee61a48 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
30093
diff
changeset
|
3 // Copyright (C) 2002-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
3990 | 25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
26 #if ! defined (octave_DASRT_h) |
3990 | 27 #define octave_DASRT_h 1 |
28 | |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21218
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21218
diff
changeset
|
30 |
23443
3f1bf237908b
maint: Eliminate <cfloat.h> header from liboctave files.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
31 #include <string> |
3990 | 32 |
23475
d691ed308237
maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents:
23443
diff
changeset
|
33 #include "Array.h" |
3998 | 34 #include "DASRT-opts.h" |
23475
d691ed308237
maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents:
23443
diff
changeset
|
35 #include "dMatrix.h" |
3990 | 36 |
37 class | |
38 DASRT_result | |
39 { | |
40 public: | |
41 | |
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
|
42 DASRT_result (void) |
30093
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
43 : m_x (), m_xdot (), m_t () { } |
3990 | 44 |
30093
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
45 DASRT_result (const Matrix& x, const Matrix& xdot, const ColumnVector& t) |
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
46 : m_x (x), m_xdot (xdot), m_t (t) { } |
3990 | 47 |
48 DASRT_result (const DASRT_result& r) | |
30093
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
49 : m_x (r.m_x), m_xdot (r.m_xdot), m_t (r.m_t) { } |
3990 | 50 |
51 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
|
52 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
53 if (this != &r) |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
54 { |
30093
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
55 m_x = r.m_x; |
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
56 m_xdot = r.m_xdot; |
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
57 m_t = r.m_t; |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
58 } |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
59 return *this; |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
60 } |
3990 | 61 |
22868
87e3163f6c87
use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
62 ~DASRT_result (void) = default; |
3990 | 63 |
30093
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
64 Matrix state (void) const { return m_x; } |
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
65 Matrix deriv (void) const { return m_xdot; } |
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
66 ColumnVector times (void) const { return m_t; } |
3990 | 67 |
68 private: | |
69 | |
30093
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
70 Matrix m_x; |
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
71 Matrix m_xdot; |
543dddb50f43
maint: use "m_" prefix for member variables in class DASRT_result.
Rik <rik@octave.org>
parents:
30046
diff
changeset
|
72 ColumnVector m_t; |
3990 | 73 }; |
74 | |
75 class | |
6108 | 76 OCTAVE_API |
3990 | 77 DASRT : public DAERT, public DASRT_options |
78 { | |
79 public: | |
80 | |
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 DASRT (void) |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
82 : DAERT (), DASRT_options (), m_initialized (false), |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
83 m_liw (0), m_lrw (0), m_ng (0), m_info (), m_iwork (), m_jroot (), |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
84 m_rwork (), m_abs_tol (), m_rel_tol () |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
85 { } |
3990 | 86 |
4587 | 87 DASRT (const ColumnVector& s, double tm, DAERTFunc& f) |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
88 : DAERT (s, tm, f), DASRT_options (), m_initialized (false), |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
89 m_liw (0), m_lrw (0), m_ng (0), m_info (), m_iwork (), m_jroot (), |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
90 m_rwork (), m_abs_tol (), m_rel_tol () |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
91 { } |
3994 | 92 |
4587 | 93 DASRT (const ColumnVector& s, const ColumnVector& deriv, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
94 double tm, DAERTFunc& f) |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
95 : DAERT (s, deriv, tm, f), DASRT_options (), m_initialized (false), |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
96 m_liw (0), m_lrw (0), m_ng (0), m_info (), m_iwork (), m_jroot (), |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
97 m_rwork (), m_abs_tol (), m_rel_tol () |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
98 { } |
3990 | 99 |
22868
87e3163f6c87
use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
100 ~DASRT (void) = default; |
3990 | 101 |
102 DASRT_result integrate (const ColumnVector& tout); | |
103 | |
104 DASRT_result integrate (const ColumnVector& tout, | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
105 const ColumnVector& tcrit); |
3990 | 106 |
3995 | 107 std::string error_message (void) const; |
108 | |
3990 | 109 private: |
110 | |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
111 bool m_initialized; |
3990 | 112 |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
113 octave_f77_int_type m_liw; |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
114 octave_f77_int_type m_lrw; |
3990 | 115 |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
116 octave_f77_int_type m_ng; |
3990 | 117 |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
118 Array<octave_f77_int_type> m_info; |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
119 Array<octave_f77_int_type> m_iwork; |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
120 Array<octave_f77_int_type> m_jroot; |
3990 | 121 |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
122 Array<double> m_rwork; |
3990 | 123 |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
124 Array<double> m_abs_tol; |
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
125 Array<double> m_rel_tol; |
3990 | 126 |
127 void integrate (double t); | |
128 }; | |
129 | |
130 #endif |