GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov-flt-cx-diag.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2008-2024 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_flt_cx_diag_h)
27 #define octave_ov_flt_cx_diag_h 1
28 
29 #include "octave-config.h"
30 
31 #include "ov-base.h"
32 #include "ov-base-diag.h"
33 #include "ov-flt-cx-mat.h"
34 #include "ov-typeinfo.h"
35 
36 // Real diagonal matrix values.
37 
38 class
39 OCTINTERP_API
42 {
43 public:
44 
47 
50 
53 
55 
57  { return new octave_float_complex_diag_matrix (*this); }
59  { return new octave_float_complex_diag_matrix (); }
60 
61  type_conv_info numeric_conversion_function () const;
62 
63  octave_base_value * try_narrowing_conversion ();
64 
66 
67  bool is_complex_matrix () const { return true; }
68 
69  bool iscomplex () const { return true; }
70 
71  bool is_single_type () const { return true; }
72 
73  bool isfloat () const { return true; }
74 
75  DiagMatrix diag_matrix_value (bool = false) const;
76 
77  FloatDiagMatrix float_diag_matrix_value (bool = false) const;
78 
79  ComplexDiagMatrix complex_diag_matrix_value (bool = false) const;
80 
81  FloatComplexDiagMatrix float_complex_diag_matrix_value (bool = false) const;
82 
83  octave_value as_double () const;
84  octave_value as_single () const;
85 
86  bool save_binary (std::ostream& os, bool save_as_floats);
87 
88  bool load_binary (std::istream& is, bool swap,
90 
91  octave_value map (unary_mapper_t umap) const;
92 
93 private:
94 
95  bool chk_valid_scalar (const octave_value&,
96  FloatComplex&) const;
97 
99 };
100 
101 #endif
octave_float_complex_diag_matrix(const FloatComplexDiagMatrix &m)
builtin_type_t builtin_type() const
octave_base_value * clone() const
octave_float_complex_diag_matrix(const octave_float_complex_diag_matrix &m)
octave_base_value * empty_clone() const
float_format
Definition: mach-info.h:38
T octave_idx_type m
Definition: mx-inlines.cc:781
std::complex< float > FloatComplex
Definition: oct-cmplx.h:34
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
Definition: ov-base.h:181
builtin_type_t
Definition: ov-base.h:83
@ btyp_float_complex
Definition: ov-base.h:87