1739
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1739
|
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 2, or (at your option) any |
|
10 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, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
1739
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_tree_mat_h) |
|
25 #define octave_tree_mat_h 1 |
|
26 |
3523
|
27 #include <iostream> |
1739
|
28 |
2086
|
29 class octave_value; |
2982
|
30 class octave_value_list; |
|
31 class tree_argument_list; |
1739
|
32 |
2124
|
33 class tree_walker; |
|
34 |
4219
|
35 #include "base-list.h" |
1739
|
36 #include "pt-exp.h" |
|
37 |
|
38 // General matrices. This allows us to construct matrices from |
|
39 // other matrices, variables, and functions. |
|
40 |
|
41 class |
4219
|
42 tree_matrix : public tree_expression, |
|
43 public octave_base_list<tree_argument_list *> |
1739
|
44 { |
|
45 public: |
|
46 |
4587
|
47 tree_matrix (tree_argument_list *row = 0, int l = -1, int c = -1) |
|
48 : tree_expression (l, c) |
2990
|
49 { |
|
50 if (row) |
4219
|
51 append (row); |
2990
|
52 } |
1827
|
53 |
2990
|
54 ~tree_matrix (void); |
1827
|
55 |
4267
|
56 bool has_magic_end (void) const; |
|
57 |
2529
|
58 bool all_elements_are_constant (void) const; |
1827
|
59 |
3933
|
60 bool rvalue_ok (void) const { return true; } |
2971
|
61 |
|
62 octave_value rvalue (void); |
|
63 |
|
64 octave_value_list rvalue (int nargout); |
1739
|
65 |
2124
|
66 void accept (tree_walker& tw); |
2988
|
67 |
|
68 private: |
|
69 |
|
70 // No copying! |
|
71 |
|
72 tree_matrix (const tree_matrix&); |
|
73 |
|
74 tree_matrix& operator = (const tree_matrix&); |
1739
|
75 }; |
|
76 |
3836
|
77 // The character to fill with when creating string arrays. |
|
78 extern char Vstring_fill_char; |
|
79 |
1739
|
80 #endif |
|
81 |
|
82 /* |
|
83 ;;; Local Variables: *** |
|
84 ;;; mode: C++ *** |
|
85 ;;; End: *** |
|
86 */ |