# HG changeset patch # User John W. Eaton # Date 1308588748 14400 # Node ID e8fe03bfc051f2130b350052b4dba5e95e228dd9 # Parent ecd1364a270074527060d953aa0f9cf6f7ccaa51 allow concatenation of scalar structures with [] * op-struct.cc (DEFNDCATOP_FN (s_s_concat, ...)): Rename from DEFNDCATOP_FN (struct_struct)). (DEFNDCATOP_FN (s_ss_concat, ...): New function. (DEFNDCATOP_FN (ss_s_concat, ...): New function. (DEFNDCATOP_FN (ss_ss_concat, ...): New function. (install_struct_ops): Install new concat functions. diff -r ecd1364a2700 -r e8fe03bfc051 src/OPERATORS/op-struct.cc --- a/src/OPERATORS/op-struct.cc Mon Jun 20 11:11:16 2011 -0400 +++ b/src/OPERATORS/op-struct.cc Mon Jun 20 12:52:28 2011 -0400 @@ -54,7 +54,10 @@ return octave_value (v.scalar_map_value ()); } -DEFNDCATOP_FN (struct_struct, struct, struct, map, map, concat) +DEFNDCATOP_FN (s_s_concat, struct, struct, map, map, concat) +DEFNDCATOP_FN (s_ss_concat, struct, scalar_struct, map, map, concat) +DEFNDCATOP_FN (ss_s_concat, scalar_struct, struct, map, map, concat) +DEFNDCATOP_FN (ss_ss_concat, scalar_struct, scalar_struct, map, map, concat) static octave_value oct_catop_struct_matrix (octave_base_value& a1, const octave_base_value& a2, @@ -95,7 +98,11 @@ INSTALL_UNOP (op_transpose, octave_scalar_struct, scalar_transpose); INSTALL_UNOP (op_hermitian, octave_scalar_struct, scalar_transpose); - INSTALL_CATOP (octave_struct, octave_struct, struct_struct); + INSTALL_CATOP (octave_struct, octave_struct, s_s_concat); + INSTALL_CATOP (octave_struct, octave_scalar_struct, s_ss_concat) + INSTALL_CATOP (octave_scalar_struct, octave_struct, ss_s_concat) + INSTALL_CATOP (octave_scalar_struct, octave_scalar_struct, ss_ss_concat) + INSTALL_CATOP (octave_struct, octave_matrix, struct_matrix); INSTALL_CATOP (octave_matrix, octave_struct, matrix_struct); }