Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 2008, 2009 Jaroslav Hajek 00004 00005 This file is part of Octave. 00006 00007 Octave is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 3 of the License, or (at your 00010 option) any later version. 00011 00012 Octave is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Octave; see the file COPYING. If not, see 00019 <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 00023 #if !defined (octave_float_complex_diag_matrix_h) 00024 #define octave_float_complex_diag_matrix_h 1 00025 00026 #include "ov-base.h" 00027 #include "ov-base-diag.h" 00028 #include "ov-flt-cx-mat.h" 00029 #include "ov-typeinfo.h" 00030 00031 // Real diagonal matrix values. 00032 00033 class 00034 OCTINTERP_API 00035 octave_float_complex_diag_matrix 00036 : public octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> 00037 { 00038 public: 00039 00040 octave_float_complex_diag_matrix (void) 00041 : octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> () { } 00042 00043 octave_float_complex_diag_matrix (const FloatComplexDiagMatrix& m) 00044 : octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> (m) { } 00045 00046 octave_float_complex_diag_matrix (const octave_float_complex_diag_matrix& m) 00047 : octave_base_diag<FloatComplexDiagMatrix, FloatComplexMatrix> (m) { } 00048 00049 ~octave_float_complex_diag_matrix (void) { } 00050 00051 octave_base_value *clone (void) const { return new octave_float_complex_diag_matrix (*this); } 00052 octave_base_value *empty_clone (void) const { return new octave_float_complex_diag_matrix (); } 00053 00054 type_conv_info numeric_conversion_function (void) const; 00055 00056 octave_base_value *try_narrowing_conversion (void); 00057 00058 builtin_type_t builtin_type (void) const { return btyp_float_complex; } 00059 00060 bool is_complex_matrix (void) const { return true; } 00061 00062 bool is_complex_type (void) const { return true; } 00063 00064 bool is_double_type (void) const { return true; } 00065 00066 bool is_float_type (void) const { return true; } 00067 00068 DiagMatrix diag_matrix_value (bool = false) const; 00069 00070 FloatDiagMatrix float_diag_matrix_value (bool = false) const; 00071 00072 ComplexDiagMatrix complex_diag_matrix_value (bool = false) const; 00073 00074 FloatComplexDiagMatrix float_complex_diag_matrix_value (bool = false) const; 00075 00076 bool save_binary (std::ostream& os, bool& save_as_floats); 00077 00078 bool load_binary (std::istream& is, bool swap, 00079 oct_mach_info::float_format fmt); 00080 00081 octave_value abs (void) const; 00082 octave_value conj (void) const; 00083 octave_value imag (void) const; 00084 octave_value real (void) const; 00085 octave_value sqrt (void) const; 00086 00087 private: 00088 00089 bool chk_valid_scalar (const octave_value&, 00090 FloatComplex&) const; 00091 00092 DECLARE_OCTAVE_ALLOCATOR 00093 00094 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA 00095 }; 00096 00097 #endif 00098 00099 /* 00100 ;;; Local Variables: *** 00101 ;;; mode: C++ *** 00102 ;;; End: *** 00103 */