1
|
1 // Helper functions for arithmetic operations. -*- C++ -*- |
|
2 // Used by the tree class. |
|
3 /* |
|
4 |
|
5 Copyright (C) 1992, 1993 John W. Eaton |
|
6 |
|
7 This file is part of Octave. |
|
8 |
|
9 Octave is free software; you can redistribute it and/or modify it |
|
10 under the terms of the GNU General Public License as published by the |
|
11 Free Software Foundation; either version 2, or (at your option) any |
|
12 later version. |
|
13 |
|
14 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
17 for more details. |
|
18 |
|
19 You should have received a copy of the GNU General Public License |
|
20 along with Octave; see the file COPYING. If not, write to the Free |
|
21 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
22 |
|
23 */ |
|
24 |
|
25 #if !defined (_arith_ops_h) |
|
26 #define _arith_ops_h 1 |
|
27 |
164
|
28 #include "tree-base.h" |
1
|
29 |
164
|
30 class Complex; |
|
31 class Matrix; |
|
32 class ComplexMatrix; |
|
33 class tree_constant; |
1
|
34 |
164
|
35 extern tree_constant do_unary_op (double d, tree::expression_type t); |
1
|
36 |
164
|
37 extern tree_constant do_unary_op (const Matrix& a, tree::expression_type t); |
|
38 |
|
39 extern tree_constant do_unary_op (const Complex& c, tree::expression_type t); |
1
|
40 |
164
|
41 extern tree_constant do_unary_op (const ComplexMatrix& a, |
|
42 tree::expression_type t); |
1
|
43 |
164
|
44 extern tree_constant do_binary_op (double a, double b, |
|
45 tree::expression_type t); |
|
46 |
|
47 extern tree_constant do_binary_op (double a, const Matrix& b, |
|
48 tree::expression_type t); |
1
|
49 |
164
|
50 extern tree_constant do_binary_op (double a, const Complex& b, |
|
51 tree::expression_type t); |
1
|
52 |
164
|
53 extern tree_constant do_binary_op (double a, const ComplexMatrix& b, |
|
54 tree::expression_type t); |
1
|
55 |
164
|
56 extern tree_constant do_binary_op (const Matrix& a, double b, |
|
57 tree::expression_type t); |
1
|
58 |
164
|
59 extern tree_constant do_binary_op (const Matrix& a, const Matrix& b, |
|
60 tree::expression_type t); |
1
|
61 |
164
|
62 extern tree_constant do_binary_op (const Matrix& a, const Complex& b, |
|
63 tree::expression_type t); |
1
|
64 |
164
|
65 extern tree_constant do_binary_op (const Matrix& a, const ComplexMatrix& b, |
|
66 tree::expression_type t); |
1
|
67 |
164
|
68 extern tree_constant do_binary_op (const Complex& a, double b, |
|
69 tree::expression_type t); |
1
|
70 |
164
|
71 extern tree_constant do_binary_op (const Complex& a, const Matrix& b, |
|
72 tree::expression_type t); |
1
|
73 |
164
|
74 extern tree_constant do_binary_op (const Complex& a, const Complex& b, |
|
75 tree::expression_type t); |
1
|
76 |
164
|
77 extern tree_constant do_binary_op (const Complex& a, const ComplexMatrix& b, |
|
78 tree::expression_type t); |
1
|
79 |
164
|
80 extern tree_constant do_binary_op (const ComplexMatrix& a, double b, |
|
81 tree::expression_type t); |
1
|
82 |
164
|
83 extern tree_constant do_binary_op (const ComplexMatrix& a, const Matrix& b, |
|
84 tree::expression_type t); |
1
|
85 |
164
|
86 extern tree_constant do_binary_op (const ComplexMatrix& a, const Complex& b, |
|
87 tree::expression_type t); |
1
|
88 |
164
|
89 extern tree_constant do_binary_op (const ComplexMatrix& a, |
|
90 const ComplexMatrix& b, |
|
91 tree::expression_type t); |
1
|
92 |
|
93 #endif |
|
94 |
|
95 /* |
|
96 ;;; Local Variables: *** |
|
97 ;;; mode: C++ *** |
|
98 ;;; page-delimiter: "^/\\*" *** |
|
99 ;;; End: *** |
|
100 */ |