3
|
1 // NLEqn.h -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993 John W. Eaton |
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (_NLEqn_h) |
|
25 #define _NLEqn_h 1 |
|
26 |
|
27 #ifdef __GNUG__ |
|
28 #pragma interface |
|
29 #endif |
|
30 |
|
31 #include <NLFunc.h> |
|
32 #include "Matrix.h" |
|
33 |
|
34 #ifndef Vector |
|
35 #define Vector ColumnVector |
|
36 #endif |
|
37 |
|
38 class NLEqn : public NLFunc |
|
39 { |
|
40 public: |
|
41 |
|
42 NLEqn (void); |
|
43 NLEqn (const Vector&, const NLFunc); |
|
44 |
|
45 NLEqn (const NLEqn &); |
|
46 |
|
47 NLEqn& operator = (const NLEqn& a); |
|
48 |
|
49 void resize (int); |
|
50 |
|
51 void set_states (const Vector&); |
|
52 |
|
53 Vector states (void) const; |
|
54 |
|
55 int size (void) const; |
|
56 |
|
57 Vector solve (void); |
|
58 Vector solve (const Vector&); |
|
59 |
|
60 Vector solve (int& info); |
|
61 Vector solve (const Vector&, int& info); |
|
62 |
|
63 private: |
|
64 |
|
65 int n; |
|
66 Vector x; |
|
67 |
|
68 void error (const char* msg); |
|
69 |
|
70 }; |
|
71 |
|
72 #endif |
|
73 |
|
74 /* |
|
75 ;;; Local Variables: *** |
|
76 ;;; mode: C++ *** |
|
77 ;;; page-delimiter: "^/\\*" *** |
|
78 ;;; End: *** |
|
79 */ |