GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
liboctave
numeric
ODES.h
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2002-2013 John W. Eaton
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
9
Free Software Foundation; either version 3 of the License, or (at your
10
option) any later version.
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
18
along with Octave; see the file COPYING. If not, see
19
<http://www.gnu.org/licenses/>.
20
21
*/
22
23
#if !defined (octave_ODES_h)
24
#define octave_ODES_h 1
25
26
#include "
ODESFunc.h
"
27
#include "
base-de.h
"
28
29
class
30
ODES
:
public
base_diff_eqn
,
public
ODESFunc
31
{
32
public
:
33
34
ODES
(
void
)
35
:
base_diff_eqn
(),
ODESFunc
(), xdot (), theta () { }
36
37
ODES
(
const
ColumnVector
& s,
double
tm,
ODESFunc
&
f
)
38
:
base_diff_eqn
(s, tm),
ODESFunc
(f), xdot (s.
length
(), 0.0), theta () { }
39
40
ODES
(
const
ColumnVector
& s,
const
ColumnVector
& xtheta,
double
tm,
41
ODESFunc
&
f
)
42
:
base_diff_eqn
(s, tm),
ODESFunc
(f), xdot (s.
length
(), 0.0),
43
theta (xtheta) { }
44
45
ODES
(
const
ODES
& a)
46
:
base_diff_eqn
(a),
ODESFunc
(a), xdot (a.xdot), theta (a.theta) { }
47
48
ODES
&
operator =
(
const
ODES
& a)
49
{
50
if
(
this
!= &a)
51
{
52
base_diff_eqn::operator =
(a);
53
ODESFunc::operator =
(a);
54
55
xdot = a.
xdot
;
56
theta = a.
theta
;
57
}
58
return
*
this
;
59
}
60
61
~ODES
(
void
) { }
62
63
ColumnVector
parameter_vector
(
void
) {
return
theta; }
64
65
void
initialize
(
const
ColumnVector
&
x
,
double
t);
66
67
void
initialize
(
const
ColumnVector
&
x
,
double
t,
68
const
ColumnVector
& theta);
69
70
protected
:
71
72
// State vector time derivatives.
73
ColumnVector
xdot
;
74
75
// Parameter vector.
76
ColumnVector
theta
;
77
};
78
79
#endif
Generated on Mon Dec 30 2013 03:04:50 for GNU Octave by
1.8.1.2