annotate src/tc-rep.h @ 636:fae2bd91c027

[project @ 1994-08-23 18:39:50 by jwe]
author jwe
date Tue, 23 Aug 1994 18:39:50 +0000
parents aecbe369233b
children d5ae051388b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
1 // tc-rep.h -*- C++ -*-
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
2 /*
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
3
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
4 Copyright (C) 1992, 1993, 1994 John W. Eaton
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
5
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
7
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
11 later version.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
12
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
16 for more details.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
17
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
19 along with Octave; see the file COPYING. If not, write to the Free
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
21
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
22 */
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
23
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
24 #if !defined (octave_tree_const_rep_h)
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
25 #define octave_tree_const_rep_h 1
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
26
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
27 // The actual representation of the tree_constant.
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
28
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
29 class
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
30 tree_constant_rep
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
31 {
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
32 friend class tree_constant;
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
33
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
34 private:
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
35
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
36 enum constant_type
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
37 {
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
38 unknown_constant,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
39 scalar_constant,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
40 matrix_constant,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
41 complex_scalar_constant,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
42 complex_matrix_constant,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
43 string_constant,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
44 range_constant,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
45 magic_colon,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
46 };
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
47
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
48 enum force_orient
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
49 {
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
50 no_orient,
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
51 row_orient,
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
52 column_orient,
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
53 };
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
54
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
55 tree_constant_rep (void);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
56
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
57 tree_constant_rep (double d);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
58 tree_constant_rep (const Matrix& m);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
59 tree_constant_rep (const DiagMatrix& d);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
60 tree_constant_rep (const RowVector& v, int pcv);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
61 tree_constant_rep (const ColumnVector& v, int pcv);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
62
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
63 tree_constant_rep (const Complex& c);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
64 tree_constant_rep (const ComplexMatrix& m);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
65 tree_constant_rep (const ComplexDiagMatrix& d);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
66 tree_constant_rep (const ComplexRowVector& v, int pcv);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
67 tree_constant_rep (const ComplexColumnVector& v, int pcv);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
68
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
69 tree_constant_rep (const char *s);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
70
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
71 tree_constant_rep (double base, double limit, double inc);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
72 tree_constant_rep (const Range& r);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
73
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
74 tree_constant_rep (tree_constant_rep::constant_type t);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
75
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
76 tree_constant_rep (const tree_constant_rep& t);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
77
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
78 ~tree_constant_rep (void);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
79
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
80 #if defined (MDEBUG)
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
81 void *operator new (size_t size);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
82 void operator delete (void *p, size_t size);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
83 #endif
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
84
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
85 int rows (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
86 int columns (void) const;
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
87
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
88 int is_defined (void) const
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
89 { return type_tag != tree_constant_rep::unknown_constant; }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
90
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
91 int is_undefined (void) const
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
92 { return type_tag == tree_constant_rep::unknown_constant; }
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
93
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
94 int is_unknown (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
95 { return type_tag == tree_constant_rep::unknown_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
96
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
97 int is_real_scalar (void) const
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
98 { return type_tag == tree_constant_rep::scalar_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
99
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
100 int is_real_matrix (void) const
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
101 { return type_tag == tree_constant_rep::matrix_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
102
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
103 int is_complex_scalar (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
104 { return type_tag == tree_constant_rep::complex_scalar_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
105
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
106 int is_complex_matrix (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
107 { return type_tag == tree_constant_rep::complex_matrix_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
108
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
109 int is_string (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
110 { return type_tag == tree_constant_rep::string_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
111
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
112 int is_range (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
113 { return type_tag == tree_constant_rep::range_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
114
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
115 int is_magic_colon (void) const
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
116 { return type_tag == tree_constant_rep::magic_colon; }
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
117
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
118 tree_constant all (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
119 tree_constant any (void) const;
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
120
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
121 int is_real_type (void) const
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
122 {
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
123 return (type_tag == scalar_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
124 || type_tag == matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
125 || type_tag == range_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
126 || type_tag == string_constant);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
127 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
128
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
129 int is_complex_type (void) const
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
130 {
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
131 return (type_tag == complex_matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
132 || type_tag == complex_scalar_constant);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
133 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
134
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
135 // Would be nice to get rid of the next four functions:
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
136
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
137 int is_scalar_type (void) const
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
138 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
139 return (type_tag == scalar_constant
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
140 || type_tag == complex_scalar_constant);
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
141 }
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
142
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
143 int is_matrix_type (void) const
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
144 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
145 return (type_tag == matrix_constant
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
146 || type_tag == complex_matrix_constant);
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
147 }
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
148
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
149 int is_numeric_type (void) const
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
150 {
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
151 return (type_tag == scalar_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
152 || type_tag == matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
153 || type_tag == complex_matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
154 || type_tag == complex_scalar_constant);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
155 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
156
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
157 int is_numeric_or_range_type (void) const
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
158 {
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
159 return (type_tag == scalar_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
160 || type_tag == matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
161 || type_tag == complex_matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
162 || type_tag == complex_scalar_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
163 || type_tag == range_constant);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
164 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
165
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
166 int valid_as_scalar_index (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
167
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
168 int is_true (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
169
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
170 double double_value (int force_string_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
171 Matrix matrix_value (int force_string_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
172 Complex complex_value (int force_string_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
173 ComplexMatrix complex_matrix_value (int force_string_conversion = 0) const;
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
174 char *string_value (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
175 Range range_value (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
176
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
177 ColumnVector vector_value (int force_string_conversion = 0,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
178 int force_vector_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
179
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
180 ComplexColumnVector complex_vector_value (int force_string_conv = 0,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
181 int force_vec_conv = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
182
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
183 tree_constant convert_to_str (void);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
184
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
185 void convert_to_row_or_column_vector (void);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
186
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
187 void force_numeric (int force_str_conv = 0);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
188 tree_constant make_numeric (int force_str_conv = 0) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
189
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
190 void bump_value (tree_expression::type);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
191
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
192 void resize (int i, int j);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
193 void resize (int i, int j, double val);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
194
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
195 void maybe_resize (int imax, force_orient fo = no_orient);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
196 void maybe_resize (int imax, int jmax);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
197
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
198 void stash_original_text (char *s);
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
199
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
200 // Indexing.
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
201
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
202 tree_constant do_index (const Octave_object& args);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
203
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
204 tree_constant do_scalar_index (const Octave_object& args) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
205
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
206 tree_constant do_matrix_index (const Octave_object& args) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
207
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
208 tree_constant do_matrix_index (const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
209
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
210 tree_constant do_matrix_index (const tree_constant& i_arg,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
211 const tree_constant& j_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
212
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
213 tree_constant do_matrix_index (constant_type i) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
214
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
215 tree_constant fortran_style_matrix_index (const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
216 tree_constant fortran_style_matrix_index (const Matrix& mi) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
217
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
218 tree_constant do_vector_index (const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
219
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
220 tree_constant do_matrix_index (int i, const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
221 tree_constant do_matrix_index (const idx_vector& i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
222 const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
223 tree_constant do_matrix_index (const Range& i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
224 const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
225 tree_constant do_matrix_index (constant_type i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
226 const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
227
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
228 tree_constant do_matrix_index (int i, int j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
229 tree_constant do_matrix_index (int i, const idx_vector& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
230 tree_constant do_matrix_index (int i, const Range& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
231 tree_constant do_matrix_index (int i, constant_type cj) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
232
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
233 tree_constant do_matrix_index (const idx_vector& i, int j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
234 tree_constant do_matrix_index (const idx_vector& i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
235 const idx_vector& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
236 tree_constant do_matrix_index (const idx_vector& i, const Range& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
237 tree_constant do_matrix_index (const idx_vector& i, constant_type j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
238
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
239 tree_constant do_matrix_index (const Range& i, int j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
240 tree_constant do_matrix_index (const Range& i, const idx_vector& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
241 tree_constant do_matrix_index (const Range& i, const Range& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
242 tree_constant do_matrix_index (const Range& i, constant_type j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
243
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
244 tree_constant do_matrix_index (constant_type i, int j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
245 tree_constant do_matrix_index (constant_type i, const idx_vector& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
246 tree_constant do_matrix_index (constant_type i, const Range& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
247 tree_constant do_matrix_index (constant_type i, constant_type j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
248
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
249 // Assignment.
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
250
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
251 void assign (const tree_constant& rhs, const Octave_object& args);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
252
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
253 void do_scalar_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
254 const Octave_object& args);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
255
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
256 void do_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
257 const Octave_object& args);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
258
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
259 void do_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
260 const tree_constant& i_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
261
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
262 void fortran_style_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
263 const tree_constant& i_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
264
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
265 void fortran_style_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
266 constant_type ci);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
267
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
268 void fortran_style_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
269 idx_vector& i);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
270
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
271 void vector_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
272 const tree_constant& i_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
273
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
274 void check_vector_assign (int rhs_nr, int rhs_nc, int ilen,
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
275 const char *rm);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
276
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
277 void do_vector_assign (const tree_constant& rhs, int i);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
278 void do_vector_assign (const tree_constant& rhs, idx_vector& i);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
279 void do_vector_assign (const tree_constant& rhs, Range& i);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
280
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
281 void do_matrix_assignment (const tree_constant& rhs,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
282 const tree_constant& i_arg,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
283 const tree_constant& j_arg);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
284
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
285 void do_matrix_assignment (const tree_constant& rhs, int i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
286 const tree_constant& j_arg);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
287 void do_matrix_assignment (const tree_constant& rhs, idx_vector& i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
288 const tree_constant& j_arg);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
289 void do_matrix_assignment (const tree_constant& rhs, Range& i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
290 const tree_constant& j_arg);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
291 void do_matrix_assignment (const tree_constant& rhs, constant_type i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
292 const tree_constant& j_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
293
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
294 void do_matrix_assignment (const tree_constant& rhs, int i, int j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
295 void do_matrix_assignment (const tree_constant& rhs, int i, idx_vector& jv);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
296 void do_matrix_assignment (const tree_constant& rhs, int i, Range& j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
297 void do_matrix_assignment (const tree_constant& rhs, int i, constant_type cj);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
298
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
299 void do_matrix_assignment (const tree_constant& rhs, idx_vector& iv,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
300 int j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
301 void do_matrix_assignment (const tree_constant& rhs, idx_vector& iv,
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
302 idx_vector& jv);
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
303 void do_matrix_assignment (const tree_constant& rhs, idx_vector& iv,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
304 Range& j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
305 void do_matrix_assignment (const tree_constant& rhs, idx_vector& iv,
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
306 constant_type j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
307
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
308 void do_matrix_assignment (const tree_constant& rhs, Range& i, int j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
309 void do_matrix_assignment (const tree_constant& rhs, Range& i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
310 idx_vector& jv);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
311 void do_matrix_assignment (const tree_constant& rhs, Range& i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
312 Range& j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
313 void do_matrix_assignment (const tree_constant& rhs, Range& i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
314 constant_type j);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
315
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
316 void do_matrix_assignment (const tree_constant& rhs, constant_type i, int j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
317 void do_matrix_assignment (const tree_constant& rhs, constant_type i,
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
318 idx_vector& jv);
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
319 void do_matrix_assignment (const tree_constant& rhs, constant_type i,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
320 Range& j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
321 void do_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
322 const constant_type i,
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
323 constant_type j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
324
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
325 void delete_row (int);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
326 void delete_rows (idx_vector& i);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
327 void delete_rows (Range& i);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
328
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
329 void delete_column (int);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
330 void delete_columns (idx_vector& j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
331 void delete_columns (Range& j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
332
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
333 void maybe_mutate (void);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
334
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
335 void print (void);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
336
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
337 void print_code (ostream& os);
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
338
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
339 char *type_as_string (void) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
340
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
341 // Binary and unary operations.
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
342
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
343 friend tree_constant do_binary_op (tree_constant& a, tree_constant& b,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
344 tree_expression::type t);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
345
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
346 friend tree_constant do_unary_op (tree_constant& a,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
347 tree_expression::type t);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
348
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
349 // Data.
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
350
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
351 int count;
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
352 constant_type type_tag;
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
353 union
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
354 {
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
355 double scalar; // A real scalar constant.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
356 Matrix *matrix; // A real matrix constant.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
357 Complex *complex_scalar; // A real scalar constant.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
358 ComplexMatrix *complex_matrix; // A real matrix constant.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
359 char *string; // A character string constant.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
360 Range *range; // A set of evenly spaced values.
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
361 };
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
362 char *orig_text;
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
363
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
364 // -------------------------------------------------------------------
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
365
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
366 // These may not need to be member functions.
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
367
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
368 tree_constant cumprod (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
369 tree_constant cumsum (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
370 tree_constant prod (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
371 tree_constant sum (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
372 tree_constant sumsq (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
373
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
374 tree_constant diag (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
375 tree_constant diag (const tree_constant& a) const;
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
376
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
377 tree_constant mapper (Mapper_fcn& m_fcn, int print) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
378
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
379 // -------------------------------------------------------------------
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
380
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
381 // We want to eliminate this.
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
382
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
383 constant_type const_type (void) const { return type_tag; }
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
384 };
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
385
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
386 #endif
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
387
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
388 /*
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
389 ;;; Local Variables: ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
390 ;;; mode: C++ ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
391 ;;; page-delimiter: "^/\\*" ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
392 ;;; End: ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
393 */