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-bool.h"
00031 #include "ov-bool-mat.h"
00032 #include "ov-scalar.h"
00033 #include "ov-float.h"
00034 #include "ov-re-mat.h"
00035 #include "ov-flt-re-mat.h"
00036 #include "ov-typeinfo.h"
00037 #include "ops.h"
00038 #include "xdiv.h"
00039 #include "xpow.h"
00040
00041
00042
00043 DEFNDBINOP_FN (el_and, bool, bool_matrix, bool, bool_array, mx_el_and)
00044 DEFNDBINOP_FN (el_or, bool, bool_matrix, bool, bool_array, mx_el_or)
00045
00046 DEFNDBINOP_FN (el_and_not, bool, bool_matrix, bool, bool_array, mx_el_and_not)
00047 DEFNDBINOP_FN (el_or_not, bool, bool_matrix, bool, bool_array, mx_el_or_not)
00048
00049 DEFNDCATOP_FN (b_bm, bool, bool_matrix, bool_array, bool_array, concat)
00050 DEFNDCATOP_FN (b_m, bool, matrix, array, array, concat)
00051 DEFNDCATOP_FN (s_bm, scalar, bool_matrix, array, array, concat)
00052
00053 DEFNDCATOP_FN (b_fm, bool, float_matrix, float_array, float_array, concat)
00054 DEFNDCATOP_FN (f_bm, float_scalar, bool_matrix, float_array, float_array, concat)
00055
00056 DEFCONV (bool_matrix_conv, bool, bool_matrix)
00057 {
00058 CAST_CONV_ARG (const octave_bool&);
00059
00060 return new octave_bool_matrix (v.bool_matrix_value ());
00061 }
00062
00063 void
00064 install_b_bm_ops (void)
00065 {
00066 INSTALL_BINOP (op_el_and, octave_bool, octave_bool_matrix, el_and);
00067 INSTALL_BINOP (op_el_or, octave_bool, octave_bool_matrix, el_or);
00068 INSTALL_BINOP (op_el_and_not, octave_bool, octave_bool_matrix, el_and_not);
00069 INSTALL_BINOP (op_el_or_not, octave_bool, octave_bool_matrix, el_or_not);
00070
00071 INSTALL_CATOP (octave_bool, octave_bool_matrix, b_bm);
00072 INSTALL_CATOP (octave_bool, octave_matrix, b_m);
00073 INSTALL_CATOP (octave_scalar, octave_bool_matrix, s_bm);
00074 INSTALL_CATOP (octave_bool, octave_float_matrix, b_fm);
00075 INSTALL_CATOP (octave_float_scalar, octave_bool_matrix, f_bm);
00076
00077 INSTALL_ASSIGNCONV (octave_bool, octave_bool_matrix, octave_bool_matrix);
00078
00079 INSTALL_WIDENOP (octave_bool, octave_bool_matrix, bool_matrix_conv);
00080 }