1559
|
1 // Template array classes -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1995 John W. Eaton |
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #include "idx-vector.h" |
|
25 #include "lo-error.h" |
|
26 |
|
27 #if defined (OCTAVE_SOURCE) |
|
28 extern int& dfi_flag; |
|
29 extern int& pcv_flag; |
|
30 extern int& pzo_flag; |
|
31 extern int& rre_flag; |
|
32 #else |
|
33 extern int dfi_flag; |
|
34 extern int pcv_flag; |
|
35 extern int pzo_flag; |
|
36 extern int rre_flag; |
|
37 #endif |
|
38 |
|
39 template <class T> |
|
40 void |
|
41 ArrayRep<T>::clear_index (void) |
|
42 { |
|
43 delete [] idx; |
|
44 idx = 0; |
|
45 idx_count = 0; |
|
46 } |
|
47 |
|
48 template <class T> |
|
49 void |
|
50 ArrayRep<T>::set_index (const idx_vector& i) |
|
51 { |
|
52 if (! idx) |
|
53 idx = new idx_vector [max_indices]; |
|
54 |
|
55 if (idx_count < max_indices) |
|
56 { |
|
57 idx[idx_count++] = i; |
|
58 } |
|
59 else |
|
60 { |
|
61 (*current_liboctave_error_handler) |
|
62 ("invalid number of indices specified"); |
|
63 clear_index (); |
|
64 } |
|
65 } |
|
66 |
|
67 template <class T> |
|
68 Array<T> |
|
69 Array<T>::value (void) |
|
70 { |
|
71 Array<T> retval; |
|
72 |
|
73 idx_vector *tmp = get_idx (); |
|
74 idx_vector idx = tmp[0]; |
|
75 |
|
76 int len = length (); |
|
77 |
|
78 int n = idx.freeze (len, "vector", pzo_flag); |
|
79 |
|
80 if (idx) |
|
81 { |
|
82 if (idx.is_colon_equiv (len)) |
|
83 { |
|
84 retval = *this; |
|
85 } |
|
86 else if (n == 0) |
|
87 { |
|
88 retval.resize (0); |
|
89 } |
|
90 else if (len == 1 && n > 1 |
|
91 && idx.one_zero_only () |
|
92 && idx.ones_count () == n) |
|
93 { |
|
94 retval.resize (n, elem (0)); |
|
95 } |
|
96 else |
|
97 { |
|
98 retval.resize (n); |
|
99 |
|
100 for (int i = 0; i < n; i++) |
|
101 { |
|
102 int ii = idx.elem (i); |
|
103 retval.elem (i) = elem (ii); |
|
104 } |
|
105 } |
|
106 } |
|
107 // idx_vector::freeze() printed an error message for us. |
|
108 |
|
109 clear_index (); |
|
110 |
|
111 return retval; |
|
112 } |
|
113 |
|
114 template <class T> |
|
115 void |
|
116 Array<T>::maybe_delete_elements (idx_vector& idx) |
|
117 { |
|
118 int len = length (); |
|
119 |
|
120 if (len == 0) |
|
121 return; |
|
122 |
|
123 if (idx.is_colon_equiv (len, 1)) |
|
124 resize (0); |
|
125 else |
|
126 { |
|
127 int num_to_delete = idx.length (len); |
|
128 |
|
129 if (num_to_delete != 0) |
|
130 { |
|
131 int new_len = len - num_to_delete; |
|
132 if (new_len > 0) |
|
133 { |
|
134 T *new_data = new T [new_len]; |
|
135 |
|
136 int ii = 0; |
|
137 int iidx = 0; |
|
138 for (int i = 0; i < len; i++) |
|
139 { |
|
140 if (i == idx.elem (iidx)) |
|
141 iidx++; |
|
142 else |
|
143 { |
|
144 new_data[ii] = elem (i); |
|
145 ii++; |
|
146 } |
|
147 } |
|
148 |
|
149 if (--rep->count <= 0) |
|
150 delete rep; |
|
151 |
|
152 rep = new ArrayRep<T> (new_data, new_len); |
|
153 rep->count = 1; |
|
154 set_max_indices (1); |
|
155 } |
|
156 else |
|
157 (*current_liboctave_error_handler) |
|
158 ("%s: %d: internal indexing error", __FILE__, __LINE__); |
|
159 } |
|
160 } |
|
161 } |
|
162 |
|
163 // ??? FIXME ??? -- this doesn't handle assignment of empty vectors |
|
164 // to delete elements. Should it? |
|
165 |
|
166 template <class LT, class RT> |
|
167 int |
|
168 assign (Array<LT>& lhs, const Array<RT>& rhs) |
|
169 { |
|
170 int retval = 1; |
|
171 |
|
172 idx_vector *tmp = lhs.get_idx (); |
|
173 |
|
174 idx_vector idx = tmp[0]; |
|
175 |
|
176 int lhs_len = lhs.length (); |
|
177 int rhs_len = rhs.length (); |
|
178 |
|
179 int n = idx.freeze (lhs_len, "vector", pzo_flag, rre_flag); |
|
180 |
|
181 if (n != 0) |
|
182 { |
|
183 if (rre_flag) |
|
184 { |
|
185 int max_idx = idx.max () + 1; |
|
186 if (max_idx > lhs_len) |
|
187 lhs.resize (max_idx, 0.0); |
|
188 } |
|
189 |
|
190 if (rhs_len == n) |
|
191 { |
|
192 for (int i = 0; i < n; i++) |
|
193 { |
|
194 int ii = idx.elem (i); |
|
195 lhs.elem (ii) = rhs.elem (i); |
|
196 } |
|
197 } |
|
198 else if (rhs_len == 1) |
|
199 { |
|
200 RT scalar = rhs.elem (0); |
|
201 |
|
202 for (int i = 0; i < n; i++) |
|
203 { |
|
204 int ii = idx.elem (i); |
|
205 lhs.elem (ii) = scalar; |
|
206 } |
|
207 } |
|
208 else |
|
209 { |
|
210 (*current_liboctave_error_handler) |
|
211 ("A(I) = X: X must be a scalar or a vector with same length as I"); |
|
212 |
|
213 retval = 0; |
|
214 } |
|
215 } |
|
216 else |
|
217 { |
|
218 (*current_liboctave_error_handler) |
|
219 ("A([]) = X: X must also be an empty matrix"); |
|
220 |
|
221 retval = 0; |
|
222 } |
|
223 |
|
224 lhs.clear_index (); |
|
225 |
|
226 return retval; |
|
227 } |
|
228 |
|
229 template <class T> |
|
230 Array2<T> |
|
231 Array2<T>::value (void) |
|
232 { |
|
233 Array2<T> retval; |
|
234 |
|
235 int n_idx = index_count (); |
|
236 |
|
237 int nr = d1; |
|
238 int nc = d2; |
|
239 |
|
240 if (n_idx == 2) |
|
241 { |
|
242 idx_vector *tmp = get_idx (); |
|
243 idx_vector idx_i = tmp[0]; |
|
244 idx_vector idx_j = tmp[1]; |
|
245 |
|
246 int n = idx_i.freeze (nr, "row", pzo_flag); |
|
247 int m = idx_j.freeze (nc, "column", pzo_flag); |
|
248 |
|
249 if (idx_i && idx_j) |
|
250 { |
|
251 if (n == 0) |
|
252 { |
|
253 if (m == 0 || idx_j.is_colon_equiv (nc, 1)) |
|
254 retval.resize (0, 0); |
|
255 else |
|
256 (*current_liboctave_error_handler) |
|
257 ("invalid row index = 0"); |
|
258 } |
|
259 else if (m == 0) |
|
260 { |
|
261 if (n == 0 || idx_i.is_colon_equiv (nr, 1)) |
|
262 retval.resize (0, 0); |
|
263 else |
|
264 (*current_liboctave_error_handler) |
|
265 ("invalid column index = 0"); |
|
266 } |
|
267 else if (idx_i.is_colon_equiv (nr) && idx_j.is_colon_equiv (nc)) |
|
268 { |
|
269 retval = *this; |
|
270 } |
|
271 else |
|
272 { |
|
273 retval.resize (n, m); |
|
274 |
|
275 for (int j = 0; j < m; j++) |
|
276 { |
|
277 int jj = idx_j.elem (j); |
|
278 for (int i = 0; i < n; i++) |
|
279 { |
|
280 int ii = idx_i.elem (i); |
|
281 retval.elem (i, j) = elem (ii, jj); |
|
282 } |
|
283 } |
|
284 } |
|
285 } |
|
286 // idx_vector::freeze() printed an error message for us. |
|
287 } |
|
288 else if (n_idx == 1) |
|
289 { |
|
290 if (nr == 1 && nc == 1) |
|
291 { |
|
292 Array<T> tmp = Array<T>::value (); |
|
293 |
|
294 int len = tmp.length (); |
|
295 |
|
296 if (pcv_flag) |
|
297 retval = Array2<T> (tmp, len, 1); |
|
298 else |
|
299 retval = Array2<T> (tmp, 1, len); |
|
300 } |
|
301 else if (nr == 1 || nc == 1) |
|
302 { |
|
303 int result_is_column_vector = (nc == 1); |
|
304 |
|
305 if (dfi_flag) |
|
306 { |
|
307 idx_vector *tmp = get_idx (); |
|
308 idx_vector idx = tmp[0]; |
|
309 |
|
310 result_is_column_vector = idx.is_colon (); |
|
311 } |
|
312 |
|
313 Array<T> tmp = Array<T>::value (); |
|
314 |
|
315 int len = tmp.length (); |
|
316 |
|
317 if (result_is_column_vector) |
|
318 retval = Array2<T> (tmp, len, 1); |
|
319 else |
|
320 retval = Array2<T> (tmp, 1, len); |
|
321 } |
|
322 else if (dfi_flag) |
|
323 { |
|
324 idx_vector *tmp = get_idx (); |
|
325 idx_vector idx = tmp[0]; |
|
326 |
|
327 idx.freeze (nr * nc, "matrix", pzo_flag); |
|
328 |
|
329 if (idx) |
|
330 { |
|
331 int result_nr = idx.orig_rows (); |
|
332 int result_nc = idx.orig_columns (); |
|
333 |
|
334 if (idx.is_colon ()) |
|
335 { |
|
336 result_nr = nr * nc; |
|
337 result_nc = 1; |
|
338 } |
|
339 else if (idx.one_zero_only ()) |
|
340 { |
|
341 result_nr = idx.ones_count (); |
|
342 result_nc = (result_nr > 0 ? 1 : 0); |
|
343 } |
|
344 |
|
345 retval.resize (result_nr, result_nc); |
|
346 |
|
347 int k = 0; |
|
348 for (int j = 0; j < result_nc; j++) |
|
349 { |
|
350 for (int i = 0; i < result_nr; i++) |
|
351 { |
|
352 int ii = idx.elem (k++); |
|
353 int fr = ii % nr; |
|
354 int fc = (ii - fr) / nr; |
|
355 retval.elem (i, j) = elem (fr, fc); |
|
356 } |
|
357 } |
|
358 } |
|
359 // idx_vector::freeze() printed an error message for us. |
|
360 } |
|
361 else |
|
362 (*current_liboctave_error_handler) |
|
363 ("single index only valid for row or column vector"); |
|
364 } |
|
365 else |
|
366 (*current_liboctave_error_handler) |
|
367 ("invalid number of indices for matrix expression"); |
|
368 |
|
369 clear_index (); |
|
370 |
|
371 return retval; |
|
372 } |
|
373 |
|
374 template <class T> |
|
375 void |
|
376 Array2<T>::maybe_delete_elements (idx_vector& idx_i, idx_vector& idx_j) |
|
377 { |
|
378 int nr = d1; |
|
379 int nc = d2; |
|
380 |
|
381 if (nr == 0 && nc == 0) |
|
382 return; |
|
383 |
|
384 if (idx_i.is_colon_equiv (nr, 1)) |
|
385 { |
|
386 if (idx_j.is_colon_equiv (nc, 1)) |
|
387 resize (0, 0); |
|
388 else |
|
389 { |
|
390 int num_to_delete = idx_j.length (nc); |
|
391 |
|
392 if (num_to_delete != 0) |
|
393 { |
|
394 if (nr == 1 && num_to_delete == nc) |
|
395 resize (0, 0); |
|
396 else |
|
397 { |
|
398 int new_nc = nc - num_to_delete; |
|
399 if (new_nc > 0) |
|
400 { |
|
401 T *new_data = new T [nr * new_nc]; |
|
402 |
|
403 int jj = 0; |
|
404 int idx = 0; |
|
405 for (int j = 0; j < nc; j++) |
|
406 { |
|
407 if (j == idx_j.elem (idx)) |
|
408 idx++; |
|
409 else |
|
410 { |
|
411 for (int i = 0; i < nr; i++) |
|
412 new_data[nr*jj+i] = elem (i, j); |
|
413 jj++; |
|
414 } |
|
415 } |
|
416 |
|
417 if (--rep->count <= 0) |
|
418 delete rep; |
|
419 |
|
420 rep = new ArrayRep<T> (new_data, nr * new_nc); |
|
421 rep->count = 1; |
|
422 d2 = new_nc; |
|
423 set_max_indices (2); |
|
424 } |
|
425 else |
|
426 (*current_liboctave_error_handler) |
|
427 ("%s: %d: internal indexing error", __FILE__, __LINE__); |
|
428 } |
|
429 } |
|
430 } |
|
431 } |
|
432 else if (idx_j.is_colon_equiv (nr, 1)) |
|
433 { |
|
434 if (idx_i.is_colon_equiv (nc, 1)) |
|
435 resize (0, 0); |
|
436 else |
|
437 { |
|
438 int num_to_delete = idx_i.length (nr); |
|
439 |
|
440 if (num_to_delete != 0) |
|
441 { |
|
442 if (nc == 1 && num_to_delete == nr) |
|
443 resize (0, 0); |
|
444 else |
|
445 { |
|
446 int new_nr = nr - num_to_delete; |
|
447 if (new_nr > 0) |
|
448 { |
|
449 T *new_data = new T [new_nr * nc]; |
|
450 |
|
451 int ii = 0; |
|
452 int idx = 0; |
|
453 for (int i = 0; i < nr; i++) |
|
454 { |
|
455 if (i == idx_i.elem (idx)) |
|
456 idx++; |
|
457 else |
|
458 { |
|
459 for (int j = 0; j < nc; j++) |
|
460 new_data[new_nr*j+ii] = elem (i, j); |
|
461 ii++; |
|
462 } |
|
463 } |
|
464 |
|
465 if (--rep->count <= 0) |
|
466 delete rep; |
|
467 |
|
468 rep = new ArrayRep<T> (new_data, new_nr * nc); |
|
469 rep->count = 1; |
|
470 d1 = new_nr; |
|
471 set_max_indices (2); |
|
472 } |
|
473 else |
|
474 (*current_liboctave_error_handler) |
|
475 ("%s: %d: internal indexing error", __FILE__, __LINE__); |
|
476 } |
|
477 } |
|
478 } |
|
479 } |
|
480 } |
|
481 |
|
482 template <class LT, class RT> |
|
483 int |
|
484 assign (Array2<LT>& lhs, const Array2<RT>& rhs) |
|
485 { |
|
486 int retval = 1; |
|
487 |
|
488 int n_idx = lhs.index_count (); |
|
489 |
|
490 int lhs_nr = lhs.rows (); |
|
491 int lhs_nc = lhs.cols (); |
|
492 |
|
493 int rhs_nr = rhs.rows (); |
|
494 int rhs_nc = rhs.cols (); |
|
495 |
|
496 if (n_idx == 2) |
|
497 { |
|
498 idx_vector *tmp = lhs.get_idx (); |
|
499 |
|
500 idx_vector idx_i = tmp[0]; |
|
501 idx_vector idx_j = tmp[1]; |
|
502 |
|
503 int n = idx_i.freeze (lhs_nr, "row", pzo_flag, rre_flag); |
|
504 int m = idx_j.freeze (lhs_nc, "column", pzo_flag, rre_flag); |
|
505 |
|
506 if (idx_i && idx_j) |
|
507 { |
|
508 if (rhs_nr == 0 && rhs_nc == 0) |
|
509 { |
|
510 lhs.maybe_delete_elements (idx_i, idx_j); |
|
511 } |
|
512 else |
|
513 { |
|
514 if (rre_flag) |
|
515 { |
|
516 int max_row_idx = idx_i.max () + 1; |
|
517 int max_col_idx = idx_j.max () + 1; |
|
518 |
|
519 int new_nr = max_row_idx > lhs_nr ? max_row_idx : lhs_nr; |
|
520 int new_nc = max_col_idx > lhs_nc ? max_col_idx : lhs_nc; |
|
521 |
|
522 lhs.resize (new_nr, new_nc, 0.0); |
|
523 } |
|
524 |
|
525 if (n == rhs_nr && m == rhs_nc) |
|
526 { |
|
527 for (int j = 0; j < m; j++) |
|
528 { |
|
529 int jj = idx_j.elem (j); |
|
530 for (int i = 0; i < n; i++) |
|
531 { |
|
532 int ii = idx_i.elem (i); |
|
533 lhs.elem (ii, jj) = rhs.elem (i, j); |
|
534 } |
|
535 } |
|
536 } |
|
537 else if (rhs_nr == 1 && rhs_nc == 1) |
|
538 { |
1561
|
539 RT scalar = rhs.elem (0, 0); |
|
540 |
1559
|
541 for (int j = 0; j < m; j++) |
|
542 { |
|
543 int jj = idx_j.elem (j); |
|
544 for (int i = 0; i < n; i++) |
|
545 { |
|
546 int ii = idx_i.elem (i); |
1561
|
547 lhs.elem (ii, jj) = scalar; |
1559
|
548 } |
|
549 } |
|
550 } |
|
551 else |
|
552 { |
|
553 (*current_liboctave_error_handler) |
|
554 ("A(I, J) = X: X must be a scalar or the number of elements in I must"); |
|
555 (*current_liboctave_error_handler) |
|
556 ("match the number of rows in X and the number of elements in J must"); |
|
557 (*current_liboctave_error_handler) |
|
558 ("match the number of columns in X"); |
|
559 |
|
560 retval = 0; |
|
561 } |
|
562 } |
|
563 } |
|
564 // idx_vector::freeze() printed an error message for us. |
|
565 } |
|
566 else if (n_idx == 1) |
|
567 { |
|
568 if (lhs_nr == 0 || lhs_nc == 0 |
|
569 || (lhs_nr == 1 && lhs_nc == 1)) |
|
570 { |
|
571 idx_vector *tmp = lhs.get_idx (); |
|
572 |
|
573 idx_vector idx = tmp[0]; |
|
574 |
|
575 int lhs_len = lhs.length (); |
|
576 |
|
577 int n = idx.freeze (lhs_len, 0, pzo_flag, rre_flag); |
|
578 |
|
579 if (idx) |
|
580 { |
|
581 if (rhs_nr == 0 && rhs_nc == 0) |
|
582 { |
|
583 if (n != 0 && (lhs_nr != 0 || lhs_nc != 0)) |
|
584 { |
|
585 idx_vector tmp (':'); |
|
586 lhs.maybe_delete_elements (idx, tmp); |
|
587 } |
|
588 } |
|
589 else |
|
590 { |
|
591 if (assign ((Array<LT>&) lhs, (Array<RT>&) rhs)) |
|
592 { |
|
593 int len = lhs.length (); |
|
594 |
|
595 if (len > 0) |
|
596 { |
|
597 if (pcv_flag) |
|
598 { |
|
599 lhs.d1 = lhs.length (); |
|
600 lhs.d2 = 1; |
|
601 } |
|
602 else |
|
603 { |
|
604 lhs.d1 = 1; |
|
605 lhs.d2 = lhs.length (); |
|
606 } |
|
607 } |
|
608 else |
|
609 { |
|
610 lhs.d1 = 0; |
|
611 lhs.d2 = 0; |
|
612 } |
|
613 } |
|
614 else |
|
615 retval = 0; |
|
616 } |
|
617 } |
|
618 // idx_vector::freeze() printed an error message for us. |
|
619 } |
|
620 else if (lhs_nr == 1) |
|
621 { |
|
622 idx_vector *tmp = lhs.get_idx (); |
|
623 |
|
624 idx_vector idx = tmp[0]; |
|
625 |
|
626 idx.freeze (lhs_nc, "vector", pzo_flag, rre_flag); |
|
627 |
|
628 if (idx) |
|
629 { |
|
630 if (rhs_nr == 0 && rhs_nc == 0) |
|
631 { |
|
632 idx_vector tmp (':'); |
|
633 lhs.maybe_delete_elements (tmp, idx); |
|
634 } |
|
635 else |
|
636 { |
|
637 if (assign ((Array<LT>&) lhs, (Array<RT>&) rhs)) |
|
638 lhs.d2 = lhs.length (); |
|
639 else |
|
640 retval = 0; |
|
641 } |
|
642 } |
|
643 // idx_vector::freeze() printed an error message for us. |
|
644 } |
|
645 else if (lhs_nc == 1) |
|
646 { |
|
647 idx_vector *tmp = lhs.get_idx (); |
|
648 |
|
649 idx_vector idx = tmp[0]; |
|
650 |
|
651 idx.freeze (lhs_nr, "vector", pzo_flag, rre_flag); |
|
652 |
|
653 if (idx) |
|
654 { |
|
655 if (rhs_nr == 0 && rhs_nc == 0) |
|
656 { |
|
657 idx_vector tmp (':'); |
|
658 lhs.maybe_delete_elements (idx, tmp); |
|
659 } |
|
660 else |
|
661 { |
|
662 if (assign ((Array<LT>&) lhs, (Array<RT>&) rhs)) |
|
663 lhs.d1 = lhs.length (); |
|
664 else |
|
665 retval = 0; |
|
666 } |
|
667 } |
|
668 // idx_vector::freeze() printed an error message for us. |
|
669 } |
|
670 else if (dfi_flag) |
|
671 { |
|
672 idx_vector *tmp = lhs.get_idx (); |
|
673 idx_vector idx = tmp[0]; |
|
674 |
|
675 int len = idx.freeze (lhs_nr * lhs_nc, "matrix", pzo_flag); |
|
676 |
|
677 if (idx) |
|
678 { |
|
679 if (len == rhs_nr * rhs_nc) |
|
680 { |
|
681 int k = 0; |
|
682 for (int j = 0; j < rhs_nc; j++) |
|
683 { |
|
684 for (int i = 0; i < rhs_nr; i++) |
|
685 { |
|
686 int ii = idx.elem (k++); |
|
687 int fr = ii % lhs_nr; |
|
688 int fc = (ii - fr) / lhs_nr; |
|
689 lhs.elem (fr, fc) = rhs.elem (i, j); |
|
690 } |
|
691 } |
|
692 } |
|
693 else |
|
694 { |
|
695 (*current_liboctave_error_handler) |
|
696 ("A(I) = X: X must be a scalar or a matrix with the same size as I"); |
|
697 |
|
698 retval = 0; |
|
699 } |
|
700 } |
|
701 // idx_vector::freeze() printed an error message for us. |
|
702 } |
|
703 else |
|
704 { |
|
705 (*current_liboctave_error_handler) |
|
706 ("single index only valid for row or column vector"); |
|
707 |
|
708 retval = 0; |
|
709 } |
|
710 } |
|
711 else |
|
712 { |
|
713 (*current_liboctave_error_handler) |
|
714 ("invalid number of indices for matrix expression"); |
|
715 |
|
716 retval = 0; |
|
717 } |
|
718 |
|
719 lhs.clear_index (); |
|
720 |
|
721 return retval; |
|
722 } |
|
723 |
|
724 template <class T> |
|
725 void |
|
726 Array3<T>::maybe_delete_elements (idx_vector&, idx_vector&, idx_vector&) |
|
727 { |
|
728 assert (0); |
|
729 } |
|
730 |
|
731 template <class T> |
|
732 Array3<T> |
|
733 Array3<T>::value (void) |
|
734 { |
|
735 Array3<T> retval; |
|
736 assert (0); |
|
737 return retval; |
|
738 } |
|
739 |
|
740 template <class LT, class RT> |
|
741 int |
|
742 assign (Array3<LT>&, const Array3<RT>&) |
|
743 { |
|
744 assert (0); |
|
745 return 0; |
|
746 } |
|
747 |
|
748 /* |
|
749 ;;; Local Variables: *** |
|
750 ;;; mode: C++ *** |
|
751 ;;; page-delimiter: "^/\\*" *** |
|
752 ;;; End: *** |
|
753 */ |