Mercurial > octave-nkf
annotate libinterp/octave-value/ov-cx-sparse.h @ 19632:76478d2da117
unconditionally disable the octave_allocator class
* configure.ac: Delete the --enable-octave-allocator option.
* oct-alloc.h: Delete octave_allocator class. Warn if file is
included. Unconditionally define macros to be empty.
* NEWS: Make note of these changes.
* oct-alloc.cc: Delete.
* liboctave/util/module.mk (UTIL_SRC): Remove it from the list.
* make_int.cc, Cell.h, oct-obj.cc, oct-obj.h, audiodevinfo.cc,
ov-base-int.h, ov-base-scalar.h, ov-bool-mat.cc, ov-bool-mat.h,
ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc, ov-bool.h,
ov-builtin.cc, ov-builtin.h, ov-cell.cc, ov-cell.h, ov-ch-mat.h,
ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h, ov-complex.cc,
ov-complex.h, ov-cs-list.cc, ov-cs-list.h, ov-cx-diag.cc,
ov-cx-diag.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc,
ov-cx-sparse.h, ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn-handle.cc,
ov-fcn-handle.h, ov-fcn-inline.cc, ov-fcn-inline.h, ov-fcn.cc,
ov-fcn.h, ov-float.cc, ov-float.h, ov-flt-complex.cc,
ov-flt-complex.h, ov-flt-cx-diag.cc, ov-flt-cx-diag.h,
ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-diag.cc,
ov-flt-re-diag.h, ov-flt-re-mat.cc, ov-flt-re-mat.h, ov-int16.cc,
ov-int32.cc, ov-int64.cc, ov-int8.cc, ov-intx.h, ov-java.cc,
ov-java.h, ov-mex-fcn.cc, ov-mex-fcn.h, ov-perm.cc, ov-perm.h,
ov-range.cc, ov-range.h, ov-re-diag.cc, ov-re-diag.h, ov-re-mat.cc,
ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc,
ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc, ov-struct.h,
ov-uint16.cc, ov-uint32.cc, ov-uint64.cc, ov-uint8.cc, ov-usr-fcn.cc,
ov-usr-fcn.h, ov.cc, ov.h, pt-const.cc, pt-const.h, idx-vector.cc,
idx-vector.h: Delete uses of oct-alloc.h and OCTAVE_ALLOCATOR macros.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2015 13:43:29 -0500 |
parents | ebb3ef964372 |
children | 4197fc428c7d |
rev | line source |
---|---|
5164 | 1 /* |
2 | |
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
3 Copyright (C) 2004-2013 David Bateman |
11523 | 4 Copyright (C) 1998-2004 Andy Adler |
7016 | 5 |
6 This file is part of Octave. | |
5164 | 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 | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
5164 | 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 | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
5164 | 21 |
22 */ | |
23 | |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
24 #if !defined (octave_ov_cx_sparse_h) |
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
25 #define octave_ov_cx_sparse_h 1 |
5164 | 26 |
27 #include <cstdlib> | |
28 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
29 #include <iosfwd> |
5164 | 30 #include <string> |
31 | |
32 #include "mx-base.h" | |
33 #include "str-vec.h" | |
34 | |
35 #include "error.h" | |
36 #include "oct-stream.h" | |
37 #include "ov-base.h" | |
38 #include "ov-typeinfo.h" | |
39 | |
40 #include "CSparse.h" | |
41 #include "ov-base-sparse.h" | |
42 #include "ov-re-sparse.h" | |
43 | |
44 class octave_value_list; | |
45 | |
46 class tree_walker; | |
47 | |
48 class | |
6109 | 49 OCTINTERP_API |
5164 | 50 octave_sparse_complex_matrix : public octave_base_sparse<SparseComplexMatrix> |
51 { | |
52 public: | |
53 | |
54 octave_sparse_complex_matrix (void) | |
55 : octave_base_sparse<SparseComplexMatrix> () { } | |
56 | |
57 octave_sparse_complex_matrix (const ComplexNDArray& m) | |
58 : octave_base_sparse<SparseComplexMatrix> (SparseComplexMatrix (m)) { } | |
59 | |
60 octave_sparse_complex_matrix (const ComplexMatrix& m) | |
61 : octave_base_sparse<SparseComplexMatrix> (SparseComplexMatrix (m)) { } | |
62 | |
63 octave_sparse_complex_matrix (const SparseComplexMatrix& m) | |
64 : octave_base_sparse<SparseComplexMatrix> (m) { } | |
65 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
66 octave_sparse_complex_matrix (const SparseComplexMatrix& m, |
10313 | 67 const MatrixType &t) |
5164 | 68 : octave_base_sparse<SparseComplexMatrix> (m, t) { } |
69 | |
70 octave_sparse_complex_matrix (const MSparse<Complex>& m) | |
71 : octave_base_sparse<SparseComplexMatrix> (m) { } | |
72 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
73 octave_sparse_complex_matrix (const MSparse<Complex>& m, |
10313 | 74 const MatrixType &t) |
6863 | 75 : octave_base_sparse<SparseComplexMatrix> (m, t) { } |
76 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
77 octave_sparse_complex_matrix (const Sparse<Complex>& m, |
10313 | 78 const MatrixType &t) |
6863 | 79 : octave_base_sparse<SparseComplexMatrix> (SparseComplexMatrix (m), t) { } |
80 | |
81 octave_sparse_complex_matrix (const Sparse<Complex>& m) | |
82 : octave_base_sparse<SparseComplexMatrix> (SparseComplexMatrix (m)) { } | |
83 | |
5164 | 84 octave_sparse_complex_matrix (const octave_sparse_complex_matrix& cm) |
85 : octave_base_sparse<SparseComplexMatrix> (cm) { } | |
86 | |
87 ~octave_sparse_complex_matrix (void) { } | |
88 | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
89 octave_base_value *clone (void) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
90 { return new octave_sparse_complex_matrix (*this); } |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
91 octave_base_value *empty_clone (void) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
92 { return new octave_sparse_complex_matrix (); } |
5164 | 93 |
5759 | 94 octave_base_value *try_narrowing_conversion (void); |
5164 | 95 |
9685 | 96 builtin_type_t builtin_type (void) const { return btyp_complex; } |
97 | |
5164 | 98 bool is_complex_matrix (void) const { return true; } |
99 | |
100 bool is_complex_type (void) const { return true; } | |
101 | |
5895 | 102 bool is_double_type (void) const { return true; } |
103 | |
7576 | 104 bool is_float_type (void) const { return true; } |
105 | |
5164 | 106 double double_value (bool = false) const; |
107 | |
108 double scalar_value (bool frc_str_conv = false) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
109 { return double_value (frc_str_conv); } |
5164 | 110 |
111 Matrix matrix_value (bool = false) const; | |
112 | |
113 Complex complex_value (bool = false) const; | |
114 | |
115 ComplexMatrix complex_matrix_value (bool = false) const; | |
116 | |
117 ComplexNDArray complex_array_value (bool = false) const; | |
118 | |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
119 charNDArray char_array_value (bool frc_str_conv = false) const; |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
120 |
5164 | 121 SparseMatrix sparse_matrix_value (bool = false) const; |
122 | |
123 SparseComplexMatrix sparse_complex_matrix_value (bool = false) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
124 { return matrix; } |
5164 | 125 |
9853
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
126 SparseBoolMatrix sparse_bool_matrix_value (bool warn = false) const; |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
127 |
5164 | 128 #if 0 |
129 int write (octave_stream& os, int block_size, | |
10313 | 130 oct_data_conv::data_type output_type, int skip, |
131 oct_mach_info::float_format flt_fmt) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
132 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
133 // Yes, for compatibility, we drop the imaginary part here. |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
134 return os.write (matrix_value (true), block_size, output_type, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
135 skip, flt_fmt); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
136 } |
5164 | 137 #endif |
138 | |
139 bool save_binary (std::ostream& os, bool& save_as_floats); | |
140 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
141 bool load_binary (std::istream& is, bool swap, |
10313 | 142 oct_mach_info::float_format fmt); |
5164 | 143 |
144 #if defined (HAVE_HDF5) | |
145 bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats); | |
146 | |
9881
b3089dba88bf
Remove HDF5 cruft for older versions of HDF5
Kacper Kowalik
parents:
9853
diff
changeset
|
147 bool load_hdf5 (hid_t loc_id, const char *name); |
5164 | 148 #endif |
149 | |
5900 | 150 mxArray *as_mxArray (void) const; |
151 | |
9812
f80c566bc751
improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents:
9685
diff
changeset
|
152 octave_value map (unary_mapper_t umap) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
153 |
5164 | 154 private: |
155 | |
156 | |
157 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA | |
158 }; | |
159 | |
160 #endif |