00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026
00027 #include "gripes.h"
00028 #include "oct-obj.h"
00029 #include "ov.h"
00030 #include "ov-flt-cx-mat.h"
00031 #include "ov-flt-cx-diag.h"
00032 #include "ov-cx-diag.h"
00033 #include "ov-typeinfo.h"
00034 #include "ops.h"
00035 #include "xdiv.h"
00036 #include "xpow.h"
00037
00038
00039
00040 DEFUNOP_OP (uplus, float_complex_diag_matrix, )
00041 DEFUNOP_OP (uminus, float_complex_diag_matrix, -)
00042
00043 DEFUNOP (transpose, float_complex_diag_matrix)
00044 {
00045 CAST_UNOP_ARG (const octave_float_complex_diag_matrix&);
00046 return octave_value (v.float_complex_diag_matrix_value().transpose ());
00047 }
00048
00049 DEFUNOP (hermitian, float_complex_diag_matrix)
00050 {
00051 CAST_UNOP_ARG (const octave_float_complex_diag_matrix&);
00052 return octave_value (v.float_complex_diag_matrix_value().hermitian ());
00053 }
00054
00055
00056
00057 DEFBINOP_OP (add, float_complex_diag_matrix, float_complex_diag_matrix, +)
00058 DEFBINOP_OP (sub, float_complex_diag_matrix, float_complex_diag_matrix, -)
00059 DEFBINOP_OP (mul, float_complex_diag_matrix, float_complex_diag_matrix, *)
00060
00061 DEFBINOP (div, float_complex_diag_matrix, float_complex_diag_matrix)
00062 {
00063 CAST_BINOP_ARGS (const octave_float_complex_diag_matrix&, const octave_float_complex_diag_matrix&);
00064
00065 return xdiv (v1.float_complex_diag_matrix_value (),
00066 v2.float_complex_diag_matrix_value ());
00067 }
00068
00069 DEFBINOP (ldiv, float_complex_diag_matrix, float_complex_diag_matrix)
00070 {
00071 CAST_BINOP_ARGS (const octave_float_complex_diag_matrix&, const octave_float_complex_diag_matrix&);
00072
00073 return xleftdiv (v1.float_complex_diag_matrix_value (),
00074 v2.float_complex_diag_matrix_value ());
00075 }
00076
00077 CONVDECL (float_complex_diag_matrix_to_float_complex_matrix)
00078 {
00079 CAST_CONV_ARG (const octave_float_complex_diag_matrix&);
00080
00081 return new octave_float_complex_matrix (v.float_complex_matrix_value ());
00082 }
00083
00084 CONVDECL (float_complex_diag_matrix_to_complex_diag_matrix)
00085 {
00086 CAST_CONV_ARG (const octave_float_complex_diag_matrix&);
00087
00088 return new octave_complex_diag_matrix (v.complex_diag_matrix_value ());
00089 }
00090
00091 void
00092 install_fcdm_fcdm_ops (void)
00093 {
00094 INSTALL_UNOP (op_uplus, octave_float_complex_diag_matrix, uplus);
00095 INSTALL_UNOP (op_uminus, octave_float_complex_diag_matrix, uminus);
00096 INSTALL_UNOP (op_transpose, octave_float_complex_diag_matrix, transpose);
00097 INSTALL_UNOP (op_hermitian, octave_float_complex_diag_matrix, hermitian);
00098
00099 INSTALL_BINOP (op_add, octave_float_complex_diag_matrix, octave_float_complex_diag_matrix, add);
00100 INSTALL_BINOP (op_sub, octave_float_complex_diag_matrix, octave_float_complex_diag_matrix, sub);
00101 INSTALL_BINOP (op_mul, octave_float_complex_diag_matrix, octave_float_complex_diag_matrix, mul);
00102 INSTALL_BINOP (op_div, octave_float_complex_diag_matrix, octave_float_complex_diag_matrix, div);
00103 INSTALL_BINOP (op_ldiv, octave_float_complex_diag_matrix, octave_float_complex_diag_matrix, ldiv);
00104
00105 INSTALL_CONVOP (octave_float_complex_diag_matrix, octave_complex_diag_matrix,
00106 float_complex_diag_matrix_to_complex_diag_matrix);
00107 INSTALL_CONVOP (octave_float_complex_diag_matrix, octave_float_complex_matrix,
00108 float_complex_diag_matrix_to_float_complex_matrix);
00109 INSTALL_ASSIGNCONV (octave_float_complex_diag_matrix, octave_float_complex_matrix, octave_float_complex_matrix);
00110 INSTALL_WIDENOP (octave_float_complex_diag_matrix, octave_complex_diag_matrix,
00111 float_complex_diag_matrix_to_complex_diag_matrix);
00112 }