3
Copyright (C) 2008-2013 Jaroslav Hajek
5
This file is part of Octave.
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 3 of the License, or (at your
10
option) any later version.
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
17
You should have received a copy of the GNU General Public License
18
along with Octave; see the file COPYING. If not, see
19
<http://www.gnu.org/licenses/>.
23
#if !defined (octave_ov_flt_cx_diag_h)
24
#define octave_ov_flt_cx_diag_h 1
27
#include "ov-base-diag.h"
28
#include "ov-flt-cx-mat.h"
29
#include "ov-typeinfo.h"
31
// Real diagonal matrix values.
35
octave_float_complex_diag_matrix
36
: public octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix>
40
octave_float_complex_diag_matrix (void)
41
: octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> () { }
43
octave_float_complex_diag_matrix (const FloatComplexDiagMatrix& m)
44
: octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> (m) { }
46
octave_float_complex_diag_matrix (const octave_float_complex_diag_matrix& m)
47
: octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> (m) { }
49
~octave_float_complex_diag_matrix (void) { }
51
octave_base_value *clone (void) const
52
{ return new octave_float_complex_diag_matrix (*this); }
53
octave_base_value *empty_clone (void) const
54
{ return new octave_float_complex_diag_matrix (); }
56
type_conv_info numeric_conversion_function (void) const;
58
octave_base_value *try_narrowing_conversion (void);
60
builtin_type_t builtin_type (void) const { return btyp_float_complex; }
62
bool is_complex_matrix (void) const { return true; }
64
bool is_complex_type (void) const { return true; }
66
bool is_single_type (void) const { return true; }
68
bool is_float_type (void) const { return true; }
70
DiagMatrix diag_matrix_value (bool = false) const;
72
FloatDiagMatrix float_diag_matrix_value (bool = false) const;
74
ComplexDiagMatrix complex_diag_matrix_value (bool = false) const;
76
FloatComplexDiagMatrix float_complex_diag_matrix_value (bool = false) const;
78
bool save_binary (std::ostream& os, bool& save_as_floats);
80
bool load_binary (std::istream& is, bool swap,
81
oct_mach_info::float_format fmt);
83
octave_value map (unary_mapper_t umap) const;
87
bool chk_valid_scalar (const octave_value&,
90
DECLARE_OCTAVE_ALLOCATOR
92
DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA