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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
diff -wbBur FreeMat-4.0.1-Source/libs/libFreeMat/Array.cpp FreeMat-4.0.1-Source.my//libs/libFreeMat/Array.cpp
--- FreeMat-4.0.1-Source/libs/libFreeMat/Array.cpp 2009-10-09 06:24:20.000000000 +0000
+++ FreeMat-4.0.1-Source.my//libs/libFreeMat/Array.cpp 2010-12-27 12:38:46.000000000 +0000
@@ -465,7 +465,7 @@
void Array::set(const QString& field, ArrayVector& data) {
if (isEmpty() && m_type.Class != Struct)
- *this = Array::Array(Struct);
+ *this = Array(Struct);
if (m_type.Class != Struct) throw Exception("Unsupported type for A.field=B");
StructArray &rp(structPtr());
if (isEmpty())
diff -wbBur FreeMat-4.0.1-Source/libs/libFreeMat/Math.cpp FreeMat-4.0.1-Source.my//libs/libFreeMat/Math.cpp
--- FreeMat-4.0.1-Source/libs/libFreeMat/Math.cpp 2009-10-09 06:24:22.000000000 +0000
+++ FreeMat-4.0.1-Source.my//libs/libFreeMat/Math.cpp 2010-12-27 12:42:34.000000000 +0000
@@ -1590,9 +1590,9 @@
Array Not(const Array& A) {
if (A.isScalar())
- return Array::Array(!A.toClass(Bool).constRealScalar<bool>());
+ return Array(!A.toClass(Bool).constRealScalar<bool>());
const Array &Abool(A.toClass(Bool));
- return Array::Array(Apply(Abool.constReal<bool>(),notfunc));
+ return Array(Apply(Abool.constReal<bool>(),notfunc));
}
Array Plus(const Array& A) {
diff -wbBur FreeMat-4.0.1-Source/libs/libFreeMat/Operators.hpp FreeMat-4.0.1-Source.my//libs/libFreeMat/Operators.hpp
--- FreeMat-4.0.1-Source/libs/libFreeMat/Operators.hpp 2009-10-09 06:24:22.000000000 +0000
+++ FreeMat-4.0.1-Source.my//libs/libFreeMat/Operators.hpp 2010-12-27 14:04:11.000000000 +0000
@@ -142,11 +142,11 @@
if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
if (Acast.isScalar() && Bcast.isScalar()) {
if (Acast.allReal() && Bcast.allReal()) {
- F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+ F = Array(Op::func(Acast.constRealScalar<T>(),
Bcast.constRealScalar<T>()));
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(T(0),T(0));
+ F = Array(T(0),T(0));
Op::func(Acast.constRealScalar<T>(),
Acast.constImagScalar<T>(),
Bcast.constRealScalar<T>(),
@@ -155,7 +155,7 @@
}
} else if (Acast.isScalar()) {
if (Acast.allReal() && Bcast.allReal()) {
- F = Array::Array(Tclass,Bcast.dimensions());
+ F = Array(Tclass,Bcast.dimensions());
T* ret = F.real<T>().data();
const T& Ap = Acast.constRealScalar<T>();
const T* Bp = Bcast.constReal<T>().constData();
@@ -163,7 +163,7 @@
for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(Tclass,Bcast.dimensions());
+ F = Array(Tclass,Bcast.dimensions());
T* Cr = F.real<T>().data();
T* Ci = F.imag<T>().data();
const T& Ar = Acast.constRealScalar<T>();
@@ -175,7 +175,7 @@
}
} else if (Bcast.isScalar()) {
if (Bcast.allReal() && Acast.allReal()) {
- F = Array::Array(Tclass,Acast.dimensions());
+ F = Array(Tclass,Acast.dimensions());
T* ret = F.real<T>().data();
const T* Ap = Acast.constReal<T>().constData();
const T& Bp = Bcast.constRealScalar<T>();
@@ -183,7 +183,7 @@
for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(Tclass,Acast.dimensions());
+ F = Array(Tclass,Acast.dimensions());
T* Cr = F.real<T>().data();
T* Ci = F.imag<T>().data();
const T* Ar = Acast.constReal<T>().constData();
@@ -197,7 +197,7 @@
if (Acast.dimensions() != Bcast.dimensions())
throw Exception("size mismatch in arguments to binary operator");
if (Bcast.allReal() && Acast.allReal()) {
- F = Array::Array(Tclass,Acast.dimensions());
+ F = Array(Tclass,Acast.dimensions());
T* ret = F.real<T>().data();
const T* Ap = Acast.constReal<T>().constData();
const T* Bp = Bcast.constReal<T>().constData();
@@ -205,7 +205,7 @@
for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(Tclass,Acast.dimensions());
+ F = Array(Tclass,Acast.dimensions());
T* Cr = F.real<T>().data();
T* Ci = F.imag<T>().data();
const T* Ar = Acast.constReal<T>().constData();
@@ -328,17 +328,17 @@
if (!Acast.isScalar()) Acast = Acast.asDenseArray();
if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
if (Acast.isScalar() && Bcast.isScalar()) {
- F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+ F = Array(Op::func(Acast.constRealScalar<T>(),
Bcast.constRealScalar<T>()));
} else if (Acast.isScalar()) {
- F = Array::Array(Bool,Bcast.dimensions());
+ F = Array(Bool,Bcast.dimensions());
bool* ret = F.real<bool>().data();
const T& Ap = Acast.constRealScalar<T>();
const T* Bp = Bcast.constReal<T>().constData();
uint64 q = uint64(Bcast.length());
for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
} else if (Bcast.isScalar()) {
- F = Array::Array(Bool,Acast.dimensions());
+ F = Array(Bool,Acast.dimensions());
bool* ret = F.real<bool>().data();
const T* Ap = Acast.constReal<T>().constData();
const T& Bp = Bcast.constRealScalar<T>();
@@ -347,7 +347,7 @@
} else {
if (Acast.dimensions() != Bcast.dimensions())
throw Exception("size mismatch in arguments to binary operator");
- F = Array::Array(Bool,Acast.dimensions());
+ F = Array(Bool,Acast.dimensions());
bool* ret = F.real<bool>().data();
const T* Ap = Acast.constReal<T>().constData();
const T* Bp = Bcast.constReal<T>().constData();
@@ -395,18 +395,18 @@
if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
if (Acast.isScalar() && Bcast.isScalar()) {
if (Acast.allReal() && Bcast.allReal()) {
- F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+ F = Array(Op::func(Acast.constRealScalar<T>(),
Bcast.constRealScalar<T>()));
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(Op::func(Acast.constRealScalar<T>(),
+ F = Array(Op::func(Acast.constRealScalar<T>(),
Acast.constImagScalar<T>(),
Bcast.constRealScalar<T>(),
Bcast.constImagScalar<T>()));
}
} else if (Acast.isScalar()) {
if (Acast.allReal() && Bcast.allReal()) {
- F = Array::Array(Bool,Bcast.dimensions());
+ F = Array(Bool,Bcast.dimensions());
bool* ret = F.real<bool>().data();
const T& Ap = Acast.constRealScalar<T>();
const T* Bp = Bcast.constReal<T>().constData();
@@ -414,7 +414,7 @@
for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(Bool,Bcast.dimensions());
+ F = Array(Bool,Bcast.dimensions());
bool* ret = F.real<bool>().data();
const T& Ar = Acast.constRealScalar<T>();
const T& Ai = Acast.constImagScalar<T>();
@@ -425,7 +425,7 @@
}
} else if (Bcast.isScalar()) {
if (Bcast.allReal() && Acast.allReal()) {
- F = Array::Array(Bool,Acast.dimensions());
+ F = Array(Bool,Acast.dimensions());
bool* ret = F.real<bool>().data();
const T* Ap = Acast.constReal<T>().constData();
const T& Bp = Bcast.constRealScalar<T>();
@@ -433,7 +433,7 @@
for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(Bool,Acast.dimensions());
+ F = Array(Bool,Acast.dimensions());
bool* ret = F.real<bool>().data();
const T* Ar = Acast.constReal<T>().constData();
const T* Ai = Acast.constImag<T>().constData();
@@ -446,7 +446,7 @@
if (Acast.dimensions() != Bcast.dimensions())
throw Exception("size mismatch in arguments to binary operator");
if (Bcast.allReal() && Acast.allReal()) {
- F = Array::Array(Bool,Acast.dimensions());
+ F = Array(Bool,Acast.dimensions());
bool* ret = F.real<bool>().data();
const T* Ap = Acast.constReal<T>().constData();
const T* Bp = Bcast.constReal<T>().constData();
@@ -454,7 +454,7 @@
for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
} else {
Acast.forceComplex(); Bcast.forceComplex();
- F = Array::Array(Bool,Acast.dimensions());
+ F = Array(Bool,Acast.dimensions());
bool* ret = F.real<bool>().data();
const T* Ar = Acast.constReal<T>().constData();
const T* Ai = Acast.constImag<T>().constData();
@@ -533,9 +533,9 @@
if (!Acast.isScalar()) Acast = Acast.asDenseArray();
if (Acast.isScalar()) {
if (Acast.allReal()) {
- F = Array::Array(Op::func(Acast.constRealScalar<T>()));
+ F = Array(Op::func(Acast.constRealScalar<T>()));
} else {
- F = Array::Array(T(0),T(0));
+ F = Array(T(0),T(0));
Op::func(Acast.constRealScalar<T>(),
Acast.constImagScalar<T>(),
F.realScalar<T>(),F.imagScalar<T>());
|