GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
ov-cx-sparse.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1998-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_ov_cx_sparse_h)
27#define octave_ov_cx_sparse_h 1
28
29#include "octave-config.h"
30
31#include <cstdlib>
32
33#include <iosfwd>
34#include <string>
35
36#include "mx-base.h"
37#include "str-vec.h"
38
39#include "error.h"
40#include "oct-stream.h"
41#include "ov-base.h"
42#include "ov-typeinfo.h"
43
44#include "CSparse.h"
45#include "ov-base-sparse.h"
46#include "ov-re-sparse.h"
47
49
50extern template class OCTINTERP_EXTERN_TEMPLATE_API
52
54{
55public:
56
59
62
65
68
72
75
79
83
86
89
91
93 { return new octave_sparse_complex_matrix (*this); }
96
97 octave_base_value * try_narrowing_conversion ();
98
100
101 bool is_complex_matrix () const { return true; }
102
103 bool iscomplex () const { return true; }
104
105 bool is_double_type () const { return true; }
106
107 bool isfloat () const { return true; }
108
109 double double_value (bool = false) const;
110
111 double scalar_value (bool frc_str_conv = false) const
112 { return double_value (frc_str_conv); }
113
114 Matrix matrix_value (bool = false) const;
115
116 Complex complex_value (bool = false) const;
117
118 ComplexMatrix complex_matrix_value (bool = false) const;
119
120 ComplexNDArray complex_array_value (bool = false) const;
121
122 charNDArray char_array_value (bool frc_str_conv = false) const;
123
124 SparseMatrix sparse_matrix_value (bool = false) const;
125
127 { return matrix; }
128
129 SparseBoolMatrix sparse_bool_matrix_value (bool warn = false) const;
130
131 octave_value as_double () const;
132
133 bool save_binary (std::ostream& os, bool save_as_floats);
134
135 bool load_binary (std::istream& is, bool swap,
136 octave::mach_info::float_format fmt);
137
138 bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
139
140 bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
141
142 mxArray * as_mxArray (bool interleaved) const;
143
144 octave_value map (unary_mapper_t umap) const;
145
146private:
147
149};
150
151#endif
SparseComplexMatrix sparse_complex_matrix_value(bool=false) const
double scalar_value(bool frc_str_conv=false) const
octave_base_value * clone() const
octave_sparse_complex_matrix(const octave_sparse_complex_matrix &cm)
octave_sparse_complex_matrix(const SparseComplexMatrix &m, const MatrixType &t)
builtin_type_t builtin_type() const
octave_sparse_complex_matrix(const MSparse< Complex > &m)
octave_sparse_complex_matrix(const MSparse< Complex > &m, const MatrixType &t)
octave_sparse_complex_matrix(const SparseComplexMatrix &m)
octave_sparse_complex_matrix(const ComplexNDArray &m)
octave_sparse_complex_matrix(const ComplexMatrix &m)
octave_sparse_complex_matrix(const Sparse< Complex > &m)
octave_base_value * empty_clone() const
octave_sparse_complex_matrix(const Sparse< Complex > &m, const MatrixType &t)
std::complex< double > Complex
Definition oct-cmplx.h:33
int64_t octave_hdf5_id
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA_API(API)
Definition ov-base.h:185
builtin_type_t
Definition ov-base.h:83
@ btyp_complex
Definition ov-base.h:86