GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
DAERTFunc.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2002-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_DAERTFunc_h)
27#define octave_DAERTFunc_h 1
28
29#include "octave-config.h"
30
31#include "DAEFunc.h"
32
33class DAERTFunc : public DAEFunc
34{
35public:
36
37 typedef ColumnVector (*DAERTConstrFunc) (const ColumnVector& x, double t);
38
40 : DAEFunc (), m_constr (nullptr), m_reset (true) { }
41
43 : DAEFunc (f), m_constr (nullptr), m_reset (true) { }
44
46 : DAEFunc (f, j), m_constr (nullptr), m_reset (true) { }
47
50
53
55 : DAEFunc (a), m_constr (a.m_constr), m_reset (a.m_reset) { }
56
58 {
59 if (this != &a)
60 {
63 m_reset = a.m_reset;
64 }
65 return *this;
66 }
67
68 virtual ~DAERTFunc () = default;
69
71
73 {
74 m_constr = cf;
75 m_reset = true;
76 return *this;
77 }
78
79protected:
80
82
83 // This variable is TRUE when this object is constructed, and also
84 // after any internal data has changed. Derived classes may use
85 // this information (and change it) to know when to (re)initialize
86 // their own internal data related to this object.
87
88 bool m_reset;
89};
90
91#endif
DAEFunc & operator=(const DAEFunc &a)
Definition DAEFunc.h:61
Matrix(* DAEJacFunc)(const ColumnVector &x, const ColumnVector &xdot, double t, double cj)
Definition DAEFunc.h:45
ColumnVector(* DAERHSFunc)(const ColumnVector &x, const ColumnVector &xdot, double t, octave_idx_type &ires)
Definition DAEFunc.h:37
ColumnVector(* DAERTConstrFunc)(const ColumnVector &x, double t)
Definition DAERTFunc.h:37
DAERTFunc(DAERHSFunc f)
Definition DAERTFunc.h:42
DAERTFunc(const DAERTFunc &a)
Definition DAERTFunc.h:54
DAERTConstrFunc m_constr
Definition DAERTFunc.h:81
DAERTFunc & operator=(const DAERTFunc &a)
Definition DAERTFunc.h:57
DAERTFunc(DAERHSFunc f, DAEJacFunc j)
Definition DAERTFunc.h:45
DAERTFunc(DAERHSFunc f, DAERTConstrFunc cf)
Definition DAERTFunc.h:48
DAERTConstrFunc constraint_function() const
Definition DAERTFunc.h:70
DAERTFunc(DAERHSFunc f, DAERTConstrFunc cf, DAEJacFunc j)
Definition DAERTFunc.h:51
bool m_reset
Definition DAERTFunc.h:88
virtual ~DAERTFunc()=default
DAERTFunc & set_constraint_function(DAERTConstrFunc cf)
Definition DAERTFunc.h:72
F77_RET_T const F77_DBLE * x
F77_RET_T const F77_DBLE const F77_DBLE * f