annotate src/ov-flt-cx-diag.h @ 14138:72c96de7a403 stable

maint: update copyright notices for 2012
author John W. Eaton <jwe@octave.org>
date Mon, 02 Jan 2012 14:25:41 -0500
parents 12df7854fa7c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
1 /*
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
2
14138
72c96de7a403 maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents: 11586
diff changeset
3 Copyright (C) 2008-2012 Jaroslav Hajek
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
4
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
5 This file is part of Octave.
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
6
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
10 option) any later version.
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
11
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
15 for more details.
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
16
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, see
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
19 <http://www.gnu.org/licenses/>.
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
20
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
21 */
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
22
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
23 #if !defined (octave_float_complex_diag_matrix_h)
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
24 #define octave_float_complex_diag_matrix_h 1
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
25
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
26 #include "ov-base.h"
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
27 #include "ov-base-diag.h"
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
28 #include "ov-flt-cx-mat.h"
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
29 #include "ov-typeinfo.h"
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
30
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
31 // Real diagonal matrix values.
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
32
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
33 class
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
34 OCTINTERP_API
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
35 octave_float_complex_diag_matrix
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
36 : public octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix>
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
37 {
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
38 public:
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
39
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
40 octave_float_complex_diag_matrix (void)
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
41 : octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> () { }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
42
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
43 octave_float_complex_diag_matrix (const FloatComplexDiagMatrix& m)
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
44 : octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> (m) { }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
45
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
46 octave_float_complex_diag_matrix (const octave_float_complex_diag_matrix& m)
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
47 : octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> (m) { }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
48
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
49 ~octave_float_complex_diag_matrix (void) { }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
50
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
51 octave_base_value *clone (void) const { return new octave_float_complex_diag_matrix (*this); }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
52 octave_base_value *empty_clone (void) const { return new octave_float_complex_diag_matrix (); }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
53
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
54 type_conv_info numeric_conversion_function (void) const;
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
55
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
56 octave_base_value *try_narrowing_conversion (void);
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
57
9685
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
58 builtin_type_t builtin_type (void) const { return btyp_float_complex; }
e793865ede63 implement builtin_type
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
59
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
60 bool is_complex_matrix (void) const { return true; }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
61
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
62 bool is_complex_type (void) const { return true; }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
63
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
64 bool is_double_type (void) const { return true; }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
65
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
66 bool is_float_type (void) const { return true; }
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
67
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
68 DiagMatrix diag_matrix_value (bool = false) const;
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
69
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
70 FloatDiagMatrix float_diag_matrix_value (bool = false) const;
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
71
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
72 ComplexDiagMatrix complex_diag_matrix_value (bool = false) const;
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
73
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
74 FloatComplexDiagMatrix float_complex_diag_matrix_value (bool = false) const;
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
75
8381
ad896677a2e2 implement binary saving of diag & perm matrices
Jaroslav Hajek <highegg@gmail.com>
parents: 8366
diff changeset
76 bool save_binary (std::ostream& os, bool& save_as_floats);
ad896677a2e2 implement binary saving of diag & perm matrices
Jaroslav Hajek <highegg@gmail.com>
parents: 8366
diff changeset
77
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
78 bool load_binary (std::istream& is, bool swap,
10313
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
79 oct_mach_info::float_format fmt);
8381
ad896677a2e2 implement binary saving of diag & perm matrices
Jaroslav Hajek <highegg@gmail.com>
parents: 8366
diff changeset
80
9812
f80c566bc751 improve unary mapper system
Jaroslav Hajek <highegg@gmail.com>
parents: 9685
diff changeset
81 octave_value map (unary_mapper_t umap) const;
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
82
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
83 private:
8398
d95282fa0579 allow element assignment to diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents: 8381
diff changeset
84
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
85 bool chk_valid_scalar (const octave_value&,
8398
d95282fa0579 allow element assignment to diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents: 8381
diff changeset
86 FloatComplex&) const;
d95282fa0579 allow element assignment to diagonal matrices
Jaroslav Hajek <highegg@gmail.com>
parents: 8381
diff changeset
87
8366
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
88 DECLARE_OCTAVE_ALLOCATOR
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
89
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
90 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
91 };
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
92
8b1a2555c4e2 implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
93 #endif