GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ODES.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2002-2017 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 "octave-config.h"
27 
28 #include "ODESFunc.h"
29 #include "base-de.h"
30 
31 class
32 ODES : public base_diff_eqn, public ODESFunc
33 {
34 public:
35 
36  ODES (void)
37  : base_diff_eqn (), ODESFunc (), xdot (), theta () { }
38 
39  ODES (const ColumnVector& s, double tm, ODESFunc& f)
40  : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.numel (), 0.0), theta () { }
41 
42  ODES (const ColumnVector& s, const ColumnVector& xtheta, double tm,
43  ODESFunc& f)
44  : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.numel (), 0.0),
45  theta (xtheta) { }
46 
47  ODES (const ODES& a)
48  : base_diff_eqn (a), ODESFunc (a), xdot (a.xdot), theta (a.theta) { }
49 
51  {
52  if (this != &a)
53  {
56 
57  xdot = a.xdot;
58  theta = a.theta;
59  }
60  return *this;
61  }
62 
63  ~ODES (void) { }
64 
65  ColumnVector parameter_vector (void) { return theta; }
66 
67  void initialize (const ColumnVector& x, double t);
68 
69  void initialize (const ColumnVector& x, double t,
70  const ColumnVector& theta);
71 
72 protected:
73 
74  // State vector time derivatives.
76 
77  // Parameter vector.
79 };
80 
81 #endif
ODES(const ODES &a)
Definition: ODES.h:47
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE * f
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
Definition: ov-usr-fcn.cc:935
ODES(const ColumnVector &s, double tm, ODESFunc &f)
Definition: ODES.h:39
s
Definition: file-io.cc:2682
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
ColumnVector theta
Definition: ODES.h:78
ColumnVector & operator=(const ColumnVector &a)
Definition: dColVector.h:55
base_diff_eqn & operator=(const base_diff_eqn &a)
Definition: base-de.h:52
~ODES(void)
Definition: ODES.h:63
OCTAVE_EXPORT octave_value_list angle of ex theta
Definition: mappers.cc:229
ColumnVector xdot
Definition: ODES.h:75
Definition: ODES.h:31
T::size_type numel(const T &str)
Definition: oct-string.cc:61
ODES(const ColumnVector &s, const ColumnVector &xtheta, double tm, ODESFunc &f)
Definition: ODES.h:42
ODES(void)
Definition: ODES.h:36
ColumnVector parameter_vector(void)
Definition: ODES.h:65
static void initialize(void)
Definition: mkoctfile.cc:123
ODESFunc & operator=(const ODESFunc &a)
Definition: ODESFunc.h:65
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * x