1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
diff -Naur octave-2.1.72/liboctave/CMatrix.h octave-2.1.72-new/liboctave/CMatrix.h
--- octave-2.1.72/liboctave/CMatrix.h 2005-11-11 13:47:27.000000000 -0600
+++ octave-2.1.72-new/liboctave/CMatrix.h 2006-03-14 11:26:53.000000000 -0600
@@ -204,17 +204,6 @@
ComplexMatrix expm (void) const;
- // column vector by row vector -> matrix operations
-
- friend ComplexMatrix operator * (const ColumnVector& a,
- const ComplexRowVector& b);
-
- friend ComplexMatrix operator * (const ComplexColumnVector& a,
- const RowVector& b);
-
- friend ComplexMatrix operator * (const ComplexColumnVector& a,
- const ComplexRowVector& b);
-
// matrix by diagonal matrix -> matrix operations
ComplexMatrix& operator += (const DiagMatrix& a);
@@ -290,6 +279,17 @@
ComplexMatrix Sylvester (const ComplexMatrix&, const ComplexMatrix&,
const ComplexMatrix&);
+// column vector by row vector -> matrix operations
+
+ComplexMatrix operator * (const ColumnVector& a,
+ const ComplexRowVector& b);
+
+ComplexMatrix operator * (const ComplexColumnVector& a,
+ const RowVector& b);
+
+ComplexMatrix operator * (const ComplexColumnVector& a,
+ const ComplexRowVector& b);
+
extern ComplexMatrix operator * (const Matrix&, const ComplexMatrix&);
extern ComplexMatrix operator * (const ComplexMatrix&, const Matrix&);
extern ComplexMatrix operator * (const ComplexMatrix&, const ComplexMatrix&);
diff -Naur octave-2.1.72/liboctave/dColVector.h octave-2.1.72-new/liboctave/dColVector.h
--- octave-2.1.72/liboctave/dColVector.h 2005-11-11 13:47:32.000000000 -0600
+++ octave-2.1.72-new/liboctave/dColVector.h 2006-03-14 11:12:19.000000000 -0600
@@ -103,6 +103,13 @@
ColumnVector (double *d, int l) : MArray<double> (d, l) { }
};
+// Publish externally used friend functions.
+
+extern ColumnVector real (const ComplexColumnVector& a);
+extern ColumnVector imag (const ComplexColumnVector& a);
+
+
+
MARRAY_FORWARD_DEFS (MArray, ColumnVector, double)
#endif
diff -Naur octave-2.1.72/liboctave/dMatrix.h octave-2.1.72-new/liboctave/dMatrix.h
--- octave-2.1.72/liboctave/dMatrix.h 2005-11-11 13:47:32.000000000 -0600
+++ octave-2.1.72-new/liboctave/dMatrix.h 2006-03-14 11:14:00.000000000 -0600
@@ -181,10 +181,6 @@
boolMatrix operator ! (void) const;
- // column vector by row vector -> matrix operations
-
- friend Matrix operator * (const ColumnVector& a, const RowVector& b);
-
// other operations
Matrix map (d_d_Mapper f) const;
@@ -235,6 +231,15 @@
Matrix (double *d, int r, int c) : MArray2<double> (d, r, c) { }
};
+// Publish externally used friend functions.
+
+extern Matrix real (const ComplexMatrix& a);
+extern Matrix imag (const ComplexMatrix& a);
+
+// column vector by row vector -> matrix operations
+
+extern Matrix operator * (const ColumnVector& a, const RowVector& b);
+
extern Matrix Givens (double, double);
extern Matrix Sylvester (const Matrix&, const Matrix&, const Matrix&);
diff -Naur octave-2.1.72/liboctave/dNDArray.h octave-2.1.72-new/liboctave/dNDArray.h
--- octave-2.1.72/liboctave/dNDArray.h 2005-11-11 13:47:32.000000000 -0600
+++ octave-2.1.72-new/liboctave/dNDArray.h 2006-03-14 11:15:13.000000000 -0600
@@ -131,6 +131,11 @@
NDArray (double *d, const dim_vector& dv) : MArrayN<double> (d, dv) { }
};
+// Publish externally used friend functions.
+
+extern NDArray real (const ComplexNDArray& a);
+extern NDArray imag (const ComplexNDArray& a);
+
extern NDArray min (double d, const NDArray& m);
extern NDArray min (const NDArray& m, double d);
extern NDArray min (const NDArray& a, const NDArray& b);
diff -Naur octave-2.1.72/src/ov.h octave-2.1.72-new/src/ov.h
--- octave-2.1.72/src/ov.h 2005-11-11 13:48:31.000000000 -0600
+++ octave-2.1.72-new/src/ov.h 2006-03-14 11:16:03.000000000 -0600
@@ -814,6 +814,15 @@
octave_value *nil_rep (void) const;
};
+// Publish externally used friend functions.
+
+extern octave_value
+do_unary_op (octave_value::unary_op op, const octave_value& a);
+
+extern octave_value
+do_binary_op (octave_value::binary_op op,
+ const octave_value& a, const octave_value& b);
+
#define OV_UNOP_FN(name) \
inline octave_value \
name (const octave_value& a) \
|