Mercurial > hg > octave-shane
changeset 7289:e5055ed23f52
[project @ 2007-12-11 17:36:19 by jwe]
author | jwe |
---|---|
date | Tue, 11 Dec 2007 17:36:20 +0000 |
parents | 1885f4c7e4b3 |
children | 7c0a18b10c8e |
files | src/ChangeLog src/OPERATORS/op-b-sbm.cc src/OPERATORS/op-bm-sbm.cc src/OPERATORS/op-cm-scm.cc src/OPERATORS/op-cm-sm.cc src/OPERATORS/op-cs-scm.cc src/OPERATORS/op-cs-sm.cc src/OPERATORS/op-m-scm.cc src/OPERATORS/op-m-sm.cc src/OPERATORS/op-s-scm.cc |
diffstat | 10 files changed, 37 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2007-12-11 David Bateman <dbateman@free.fr> + * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc, + OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, + OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, + OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, + OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc: Privilege + conversion to dense matrices for compatibility. + * DLD-FUNCTIONS/sparse.cc (FSparse): Remove the mutate flag, as default bahavior is now to keep matrix sparse always.
--- a/src/OPERATORS/op-b-sbm.cc +++ b/src/OPERATORS/op-b-sbm.cc @@ -30,6 +30,7 @@ #include "ov.h" #include "ov-typeinfo.h" #include "ov-bool.h" +#include "ov-bool-mat.h" #include "ov-scalar.h" #include "ops.h" @@ -86,7 +87,8 @@ INSTALL_CATOP (octave_bool, octave_sparse_matrix, b_sm); INSTALL_CATOP (octave_scalar, octave_sparse_bool_matrix, s_sbm); - INSTALL_ASSIGNCONV (octave_bool, octave_sparse_bool_matrix, octave_sparse_bool_matrix); + INSTALL_ASSIGNCONV (octave_bool, octave_sparse_bool_matrix, + octave_bool_matrix); INSTALL_WIDENOP (octave_bool, octave_sparse_bool_matrix, sparse_bool_matrix_conv); }
--- a/src/OPERATORS/op-bm-sbm.cc +++ b/src/OPERATORS/op-bm-sbm.cc @@ -75,6 +75,8 @@ (SparseBoolMatrix (v.bool_matrix_value ())); } +DEFNDASSIGNOP_FN (assign, bool_matrix, sparse_bool_matrix, bool_array, assign) + void install_bm_sbm_ops (void) { @@ -90,8 +92,10 @@ INSTALL_CATOP (octave_bool_matrix, octave_sparse_matrix, bm_sm); INSTALL_CATOP (octave_matrix, octave_sparse_bool_matrix, m_sbm); + INSTALL_ASSIGNOP (op_asn_eq, octave_bool_matrix, octave_sparse_bool_matrix, + assign) INSTALL_ASSIGNCONV (octave_bool_matrix, octave_sparse_bool_matrix, - octave_sparse_bool_matrix); + octave_bool_matrix); INSTALL_WIDENOP (octave_bool_matrix, octave_sparse_bool_matrix, sparse_bool_matrix_conv);
--- a/src/OPERATORS/op-cm-scm.cc +++ b/src/OPERATORS/op-cm-scm.cc @@ -140,6 +140,9 @@ (SparseComplexMatrix (v.complex_matrix_value ())); } +DEFNDASSIGNOP_FN (assign, complex_matrix, sparse_complex_matrix, + complex_array, assign) + void install_cm_scm_ops (void) { @@ -183,8 +186,10 @@ INSTALL_CATOP (octave_complex_matrix, octave_sparse_complex_matrix, cm_scm); + INSTALL_ASSIGNOP (op_asn_eq, octave_complex_matrix, + octave_sparse_complex_matrix, assign) INSTALL_ASSIGNCONV (octave_complex_matrix, octave_sparse_complex_matrix, - octave_sparse_complex_matrix); + octave_complex_matrix); INSTALL_WIDENOP (octave_complex_matrix, octave_sparse_complex_matrix, sparse_complex_matrix_conv);
--- a/src/OPERATORS/op-cm-sm.cc +++ b/src/OPERATORS/op-cm-sm.cc @@ -128,6 +128,8 @@ return octave_value (tmp. concat (v2.sparse_matrix_value (), ra_idx)); } +DEFNDASSIGNOP_FN (assign, complex_matrix, sparse_matrix, complex_array, assign) + void install_cm_sm_ops (void) { @@ -158,6 +160,11 @@ INSTALL_CATOP (octave_complex_matrix, octave_sparse_matrix, cm_sm); + INSTALL_ASSIGNOP (op_asn_eq, octave_complex_matrix, octave_sparse_matrix, + assign); + INSTALL_ASSIGNCONV (octave_complex_matrix, octave_sparse_matrix, + octave_complex_matrix) + } /*
--- a/src/OPERATORS/op-cs-scm.cc +++ b/src/OPERATORS/op-cs-scm.cc @@ -169,7 +169,7 @@ INSTALL_CATOP (octave_complex, octave_sparse_complex_matrix, cs_scm); INSTALL_ASSIGNCONV (octave_complex, octave_sparse_complex_matrix, - octave_sparse_complex_matrix); + octave_complex_matrix); INSTALL_WIDENOP (octave_complex, octave_sparse_complex_matrix, sparse_complex_matrix_conv);
--- a/src/OPERATORS/op-cs-sm.cc +++ b/src/OPERATORS/op-cs-sm.cc @@ -167,7 +167,8 @@ INSTALL_CATOP (octave_complex, octave_sparse_matrix, cs_sm); - INSTALL_ASSIGNCONV (octave_complex, octave_sparse_matrix, octave_sparse_matrix); + INSTALL_ASSIGNCONV (octave_complex, octave_sparse_matrix, + octave_complex_matrix); INSTALL_WIDENOP (octave_complex, octave_sparse_matrix, sparse_matrix_conv); }
--- a/src/OPERATORS/op-m-scm.cc +++ b/src/OPERATORS/op-m-scm.cc @@ -168,7 +168,7 @@ INSTALL_CATOP (octave_matrix, octave_sparse_complex_matrix, m_scm); INSTALL_ASSIGNCONV (octave_matrix, octave_sparse_complex_matrix, - octave_sparse_complex_matrix); + octave_complex_matrix); INSTALL_WIDENOP (octave_matrix, octave_sparse_complex_matrix, sparse_complex_matrix_conv);
--- a/src/OPERATORS/op-m-sm.cc +++ b/src/OPERATORS/op-m-sm.cc @@ -129,6 +129,8 @@ return new octave_sparse_matrix (SparseMatrix (v.matrix_value ())); } +DEFNDASSIGNOP_FN (assign, matrix, sparse_matrix, array, assign) + void install_m_sm_ops (void) { @@ -153,8 +155,8 @@ INSTALL_CATOP (octave_matrix, octave_sparse_matrix, m_sm); - INSTALL_ASSIGNCONV (octave_matrix, octave_sparse_matrix, - octave_sparse_matrix); + INSTALL_ASSIGNOP (op_asn_eq, octave_matrix, octave_sparse_matrix, assign) + INSTALL_ASSIGNCONV (octave_matrix, octave_sparse_matrix, octave_matrix) INSTALL_WIDENOP (octave_matrix, octave_sparse_matrix, sparse_matrix_conv);
--- a/src/OPERATORS/op-s-scm.cc +++ b/src/OPERATORS/op-s-scm.cc @@ -179,7 +179,7 @@ INSTALL_CATOP (octave_scalar, octave_sparse_complex_matrix, s_scm); INSTALL_ASSIGNCONV (octave_scalar, octave_sparse_complex_matrix, - octave_sparse_complex_matrix); + octave_complex_matrix); INSTALL_WIDENOP (octave_scalar, octave_sparse_complex_matrix, sparse_complex_matrix_conv);