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 #include "Matrix.h" |
238
|
28 #include "NLFunc.h" |
3
|
29 |
|
30 #ifndef Vector |
|
31 #define Vector ColumnVector |
|
32 #endif |
|
33 |
|
34 class NLEqn : public NLFunc |
|
35 { |
|
36 public: |
|
37 |
|
38 NLEqn (void); |
|
39 NLEqn (const Vector&, const NLFunc); |
|
40 |
|
41 NLEqn (const NLEqn &); |
|
42 |
|
43 NLEqn& operator = (const NLEqn& a); |
|
44 |
|
45 void resize (int); |
|
46 |
|
47 void set_states (const Vector&); |
|
48 |
|
49 Vector states (void) const; |
|
50 |
|
51 int size (void) const; |
|
52 |
|
53 Vector solve (void); |
|
54 Vector solve (const Vector&); |
|
55 |
|
56 Vector solve (int& info); |
|
57 Vector solve (const Vector&, int& info); |
|
58 |
|
59 private: |
|
60 |
|
61 int n; |
|
62 Vector x; |
|
63 |
|
64 void error (const char* msg); |
|
65 }; |
|
66 |
|
67 #endif |
|
68 |
|
69 /* |
|
70 ;;; Local Variables: *** |
|
71 ;;; mode: C++ *** |
|
72 ;;; page-delimiter: "^/\\*" *** |
|
73 ;;; End: *** |
|
74 */ |