# HG changeset patch # User John W. Eaton # Date 1308582676 14400 # Node ID ecd1364a270074527060d953aa0f9cf6f7ccaa51 # Parent 824c60c8f7b9edeeb75bc8e4591b9cfc9fa6483a allow assignment of [], "", and '' to sparse logical matrix * op-sbm-bm.cc (DEFNULLASSIGNOP_FN (null_assign, ...)): New assignment operator function. (install_sbm_bm_ops): Install it for various RHS types. diff -r 824c60c8f7b9 -r ecd1364a2700 src/OPERATORS/op-sbm-bm.cc --- a/src/OPERATORS/op-sbm-bm.cc Mon Jun 20 11:03:21 2011 -0400 +++ b/src/OPERATORS/op-sbm-bm.cc Mon Jun 20 11:11:16 2011 -0400 @@ -43,6 +43,7 @@ #include "ov-scalar.h" #include "ov-str-mat.h" #include "ops.h" +#include "ov-null-mat.h" #include "ov-re-sparse.h" #include "ov-bool-sparse.h" #include "smx-bm-sbm.h" @@ -88,6 +89,8 @@ return octave_value (); } +DEFNULLASSIGNOP_FN (null_assign, sparse_bool_matrix, delete_elements) + static octave_value oct_assignop_conv_and_assign (octave_base_value& a1, const octave_value_list& idx, @@ -154,4 +157,11 @@ conv_and_assign); INSTALL_ASSIGNOP (op_asn_eq, octave_sparse_bool_matrix, octave_uint64_matrix, conv_and_assign); + + INSTALL_ASSIGNOP (op_asn_eq, octave_sparse_bool_matrix, octave_null_matrix, + null_assign); + INSTALL_ASSIGNOP (op_asn_eq, octave_sparse_bool_matrix, octave_null_str, + null_assign); + INSTALL_ASSIGNOP (op_asn_eq, octave_sparse_bool_matrix, octave_null_sq_str, + null_assign); }