annotate src/tc-rep.h @ 1197:ed01dfb2338d

[project @ 1995-03-31 19:33:00 by jwe]
author jwe
date Fri, 31 Mar 1995 19:33:00 +0000
parents e2036dce97ea
children db4f4009d6e8
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
1009
dfe01093f657 [project @ 1995-01-04 04:05:12 by jwe]
jwe
parents: 922
diff changeset
4 Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton
492
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,
745
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
45 map_constant,
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
46 magic_colon,
922
708827b941b4 [project @ 1994-11-14 22:14:13 by jwe]
jwe
parents: 782
diff changeset
47 all_va_args,
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
48 };
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
49
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
50 enum force_orient
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
51 {
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
52 no_orient,
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
53 row_orient,
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
54 column_orient,
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
55 };
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
56
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
57 tree_constant_rep (void);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
58
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
59 tree_constant_rep (double d);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
60 tree_constant_rep (const Matrix& m);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
61 tree_constant_rep (const DiagMatrix& d);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
62 tree_constant_rep (const RowVector& v, int pcv);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
63 tree_constant_rep (const ColumnVector& v, int pcv);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
64
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
65 tree_constant_rep (const Complex& c);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
66 tree_constant_rep (const ComplexMatrix& m);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
67 tree_constant_rep (const ComplexDiagMatrix& d);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
68 tree_constant_rep (const ComplexRowVector& v, int pcv);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
69 tree_constant_rep (const ComplexColumnVector& v, int pcv);
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 (const char *s);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
72
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
73 tree_constant_rep (double base, double limit, double inc);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
74 tree_constant_rep (const Range& r);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
75
745
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
76 tree_constant_rep (const Octave_map& m);
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
77
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
78 tree_constant_rep (tree_constant_rep::constant_type t);
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 tree_constant_rep (const tree_constant_rep& t);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
81
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
82 ~tree_constant_rep (void);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
83
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
84 void *operator new (size_t size);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
85 void operator delete (void *p, size_t size);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
86
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
87 int rows (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
88 int columns (void) const;
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
89
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
90 int is_defined (void) const
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
91 { return type_tag != tree_constant_rep::unknown_constant; }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
92
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
93 int is_undefined (void) const
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
94 { return type_tag == tree_constant_rep::unknown_constant; }
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
95
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
96 int is_unknown (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
97 { return type_tag == tree_constant_rep::unknown_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
98
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
99 int is_real_scalar (void) const
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
100 { return type_tag == tree_constant_rep::scalar_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
101
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
102 int is_real_matrix (void) const
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
103 { return type_tag == tree_constant_rep::matrix_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
104
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
105 int is_complex_scalar (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
106 { return type_tag == tree_constant_rep::complex_scalar_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
107
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
108 int is_complex_matrix (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
109 { return type_tag == tree_constant_rep::complex_matrix_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
110
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
111 int is_string (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
112 { return type_tag == tree_constant_rep::string_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
113
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
114 int is_range (void) const
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
115 { return type_tag == tree_constant_rep::range_constant; }
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
116
745
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
117 int is_map (void) const
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
118 { return type_tag == tree_constant_rep::map_constant; }
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
119
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
120 int is_magic_colon (void) const
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
121 { return type_tag == tree_constant_rep::magic_colon; }
605
4f65175911a6 [project @ 1994-08-13 20:10:39 by jwe]
jwe
parents: 593
diff changeset
122
922
708827b941b4 [project @ 1994-11-14 22:14:13 by jwe]
jwe
parents: 782
diff changeset
123 int is_all_va_args (void) const
708827b941b4 [project @ 1994-11-14 22:14:13 by jwe]
jwe
parents: 782
diff changeset
124 { return type_tag == tree_constant_rep::all_va_args; }
708827b941b4 [project @ 1994-11-14 22:14:13 by jwe]
jwe
parents: 782
diff changeset
125
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
126 tree_constant all (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
127 tree_constant any (void) const;
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_real_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 == scalar_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
132 || type_tag == matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
133 || type_tag == range_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
134 || type_tag == string_constant);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
135 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
136
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
137 int is_complex_type (void) const
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
138 {
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
139 return (type_tag == complex_matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
140 || type_tag == complex_scalar_constant);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
141 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
142
636
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
143 // 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
144
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
145 int is_scalar_type (void) const
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
146 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
147 return (type_tag == scalar_constant
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
148 || type_tag == complex_scalar_constant);
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
149 }
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
150
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
151 int is_matrix_type (void) const
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
152 {
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
153 return (type_tag == matrix_constant
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
154 || type_tag == complex_matrix_constant);
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
155 }
fae2bd91c027 [project @ 1994-08-23 18:39:50 by jwe]
jwe
parents: 628
diff changeset
156
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
157 int is_numeric_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 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
164
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
165 int is_numeric_or_range_type (void) const
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
166 {
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
167 return (type_tag == scalar_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
168 || type_tag == matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
169 || type_tag == complex_matrix_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
170 || type_tag == complex_scalar_constant
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
171 || type_tag == range_constant);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
172 }
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
173
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
174 int valid_as_scalar_index (void) const;
1041
7dbf5bb19bde [project @ 1995-01-18 15:06:19 by jwe]
jwe
parents: 1009
diff changeset
175 int valid_as_zero_index (void) const;
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
176
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
177 int is_true (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
178
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
179 double double_value (int force_string_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
180 Matrix matrix_value (int force_string_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
181 Complex complex_value (int force_string_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
182 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
183 char *string_value (void) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
184 Range range_value (void) const;
745
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
185 Octave_map map_value (void) const;
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
186
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
187 tree_constant& lookup_map_element (const char *name, int insert = 0);
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
188
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
189 ColumnVector vector_value (int force_string_conversion = 0,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
190 int force_vector_conversion = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
191
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
192 ComplexColumnVector complex_vector_value (int force_string_conv = 0,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
193 int force_vec_conv = 0) const;
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
194
722
c40cdd16121e [project @ 1994-09-21 15:22:21 by jwe]
jwe
parents: 647
diff changeset
195 tree_constant convert_to_str (void) const;
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
196
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
197 void convert_to_row_or_column_vector (void);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
198
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
199 void bump_value (tree_expression::type);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
200
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
201 void resize (int i, int j);
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
202 void resize (int i, int j, double val);
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 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
205 void maybe_resize (int imax, int jmax);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
206
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
207 void stash_original_text (char *s);
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
208
745
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
209 void maybe_mutate (void);
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
210
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
211 void print (void);
1197
ed01dfb2338d [project @ 1995-03-31 19:33:00 by jwe]
jwe
parents: 1168
diff changeset
212 void print (ostream& os);
745
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
213
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
214 void print_code (ostream& os);
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
215
777
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 767
diff changeset
216 void gripe_wrong_type_arg (const char *name,
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 767
diff changeset
217 const tree_constant_rep& tcr) const;
a2f9d3fd720c [project @ 1994-10-07 14:01:53 by jwe]
jwe
parents: 767
diff changeset
218
745
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
219 char *type_as_string (void) const;
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
220
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
221 // Binary and unary operations.
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
222
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
223 friend tree_constant do_binary_op (tree_constant& a, tree_constant& b,
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
224 tree_expression::type t);
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
225
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
226 friend tree_constant do_unary_op (tree_constant& a,
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
227 tree_expression::type t);
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
228
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
229 // -------------------------------------------------------------------
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
230
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
231 // We want to eliminate this.
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
232
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
233 constant_type const_type (void) const { return type_tag; }
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
234
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
235 // We want to get rid of these too:
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
236
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
237 void force_numeric (int force_str_conv = 0);
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
238 tree_constant make_numeric (int force_str_conv = 0) const;
586160369413 [project @ 1994-09-30 15:00:00 by jwe]
jwe
parents: 722
diff changeset
239
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
240 // Indexing.
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
241
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
242 tree_constant do_index (const Octave_object& args);
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_scalar_index (const Octave_object& args) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
245
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
246 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
247
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
248 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
249
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
250 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
251 const tree_constant& j_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
252
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
253 tree_constant do_matrix_index (constant_type i) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
254
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
255 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
256 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
257
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
258 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
259
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
260 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
261 tree_constant do_matrix_index (const idx_vector& i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
262 const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
263 tree_constant do_matrix_index (const Range& i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
264 const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
265 tree_constant do_matrix_index (constant_type i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
266 const tree_constant& i_arg) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
267
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
268 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
269 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
270 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
271 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
272
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
273 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
274 tree_constant do_matrix_index (const idx_vector& i,
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
275 const idx_vector& j) const;
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
276 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
277 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
278
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
279 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
280 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
281 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
282 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
283
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
284 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
285 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
286 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
287 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
288
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
289 // Assignment.
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
290
782
ffe18d3d64a6 [project @ 1994-10-07 19:01:20 by jwe]
jwe
parents: 777
diff changeset
291 void assign (tree_constant& rhs, const Octave_object& args);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
292
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
293 void do_scalar_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
294 const Octave_object& args);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
295
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
296 void do_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
297 const Octave_object& args);
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,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
300 const tree_constant& i_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
301
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
302 void fortran_style_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
303 const tree_constant& i_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
304
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
305 void fortran_style_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
306 constant_type ci);
492
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 fortran_style_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
309 idx_vector& i);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
310
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
311 void vector_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
312 const tree_constant& i_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
313
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
314 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
315 const char *rm);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
316
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
317 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
318 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
319 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
320
628
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
321 void do_matrix_assignment (const tree_constant& rhs,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
322 const tree_constant& i_arg,
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
323 const tree_constant& j_arg);
aecbe369233b [project @ 1994-08-19 13:27:51 by jwe]
jwe
parents: 620
diff changeset
324
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
325 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
326 const tree_constant& j_arg);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
327 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
328 const tree_constant& j_arg);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
329 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
330 const tree_constant& j_arg);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
331 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
332 const tree_constant& j_arg);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
333
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
334 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
335 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
336 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
337 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
338
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
339 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
340 int j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
341 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
342 idx_vector& jv);
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
343 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
344 Range& j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
345 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
346 constant_type j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
347
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
348 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
349 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
350 idx_vector& jv);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
351 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
352 Range& j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
353 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
354 constant_type j);
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
355
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
356 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
357 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
358 idx_vector& jv);
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
359 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
360 Range& j);
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
361 void do_matrix_assignment (const tree_constant& rhs,
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 506
diff changeset
362 const constant_type i,
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
363 constant_type j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
364
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
365 void delete_row (int);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
366 void delete_rows (idx_vector& i);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
367 void delete_rows (Range& i);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
368
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
369 void delete_column (int);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
370 void delete_columns (idx_vector& j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
371 void delete_columns (Range& j);
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
372
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
373 // Data.
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
374
1168
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
375 union
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
376 {
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
377 double scalar; // A real scalar constant.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
378 Matrix *matrix; // A real matrix constant.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
379 Complex *complex_scalar; // A real scalar constant.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
380 ComplexMatrix *complex_matrix; // A real matrix constant.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
381 char *string; // A character string constant.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
382 Range *range; // A set of evenly spaced values.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
383 Octave_map *a_map; // An associative array.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
384
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
385 tree_constant_rep *freeptr; // For custom memory management.
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
386 };
722
c40cdd16121e [project @ 1994-09-21 15:22:21 by jwe]
jwe
parents: 647
diff changeset
387
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
388 constant_type type_tag;
722
c40cdd16121e [project @ 1994-09-21 15:22:21 by jwe]
jwe
parents: 647
diff changeset
389
1168
e2036dce97ea [project @ 1995-03-10 18:49:55 by jwe]
jwe
parents: 1041
diff changeset
390 int count;
722
c40cdd16121e [project @ 1994-09-21 15:22:21 by jwe]
jwe
parents: 647
diff changeset
391
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 578
diff changeset
392 char *orig_text;
620
8e4e7e5f307e [project @ 1994-08-16 04:36:32 by jwe]
jwe
parents: 610
diff changeset
393 };
492
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
394
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
395 #endif
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
396
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
397 /*
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
398 ;;; Local Variables: ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
399 ;;; mode: C++ ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
400 ;;; page-delimiter: "^/\\*" ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
401 ;;; End: ***
d45bdf960233 [project @ 1994-07-06 14:54:58 by jwe]
jwe
parents:
diff changeset
402 */