Mercurial > octave-nkf
comparison src/ov-re-nd-array.h @ 3665:0689afb1d001
[project @ 2000-05-11 19:07:56 by jwe]
author | jwe |
---|---|
date | Thu, 11 May 2000 19:10:09 +0000 |
parents | |
children | f9ea3dcf58ee |
comparison
equal
deleted
inserted
replaced
3664:d178e2bbd873 | 3665:0689afb1d001 |
---|---|
1 /* | |
2 | |
3 Copyright (C) 2000 John W. Eaton | |
4 | |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 2, or (at your option) any | |
10 later version. | |
11 | |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with Octave; see the file COPYING. If not, write to the Free | |
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
20 | |
21 */ | |
22 | |
23 #if !defined (octave_re_nd_array_h) | |
24 #define octave_re_nd_array_h 1 | |
25 | |
26 #if defined (__GNUG__) | |
27 #pragma interface | |
28 #endif | |
29 | |
30 #include <cstdlib> | |
31 | |
32 #include <iostream> | |
33 #include <string> | |
34 | |
35 #include "ArrayN.h" | |
36 #include "oct-alloc.h" | |
37 | |
38 #include "error.h" | |
39 #include "ov-base.h" | |
40 #include "ov-base-nd-array.h" | |
41 #include "ov-typeinfo.h" | |
42 | |
43 class octave_value_list; | |
44 | |
45 // Real N-dimensional array values. | |
46 | |
47 class | |
48 octave_double_nd_array : public octave_base_nd_array<ArrayN<double> > | |
49 { | |
50 public: | |
51 | |
52 octave_double_nd_array (void) | |
53 : octave_base_nd_array<ArrayN<double> > () { } | |
54 | |
55 octave_double_nd_array (const ArrayN<double>& a) | |
56 : octave_base_nd_array<ArrayN<double> > (a) { } | |
57 | |
58 octave_double_nd_array (const octave_double_nd_array& a) | |
59 : octave_base_nd_array<ArrayN<double> > (a) { } | |
60 | |
61 ~octave_double_nd_array (void) { } | |
62 | |
63 octave_value *clone (void) { return new octave_double_nd_array (*this); } | |
64 | |
65 #if 0 | |
66 octave_value *try_narrowing_conversion (void); | |
67 | |
68 void assign (const octave_value_list& idx, const Matrix& rhs); | |
69 | |
70 idx_vector index_vector (void) const { return idx_vector (matrix); } | |
71 | |
72 bool is_real_matrix (void) const { return false; } | |
73 | |
74 bool is_real_type (void) const { return true; } | |
75 | |
76 bool valid_as_scalar_index (void) const; | |
77 | |
78 double double_value (bool = false) const; | |
79 | |
80 double scalar_value (bool frc_str_conv = false) const | |
81 { return double_value (frc_str_conv); } | |
82 | |
83 Matrix matrix_value (bool = false) const; | |
84 | |
85 Complex complex_value (bool = false) const; | |
86 | |
87 ComplexMatrix complex_matrix_value (bool = false) const | |
88 { return ComplexMatrix (matrix_value ()); } | |
89 #endif | |
90 | |
91 private: | |
92 | |
93 DECLARE_OCTAVE_ALLOCATOR | |
94 | |
95 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA | |
96 }; | |
97 | |
98 #endif | |
99 | |
100 /* | |
101 ;;; Local Variables: *** | |
102 ;;; mode: C++ *** | |
103 ;;; End: *** | |
104 */ |