From bug-request at octave dot org Wed Jan 19 02:47:06 2005 Subject: Re: Bug concatenation of NDArray's From: David Bateman To: "John W. Eaton" Cc: bug at octave dot org Date: Wed, 19 Jan 2005 09:47:56 +0100 John W. Eaton wrote: >| However, the fix assumes that >| only one element of ra_idx is non-zero and that only one element (the >| same as non-zero ra_idx element) of dims() and a.dims() differs. This is >| in fact the case everywhere that this function is currently. However, it >| doesn't cover the general case of insertion of one arbitrary matrix into >| another. Is this a problem? > >Yes, it seems that it could be. Even if this is incorrect usage, I >think it should be detected so we can issue an error message instead >of (potentially) crashing. > >jwe > > Having special cases is not that good an idea as it will reduce the speed of the basic operation of matrix concatenation. At the moment this version of insert is only used in the concat functions. What could be done is create an Array::concat function with the current insert code and then create an generic insert function that will be significantly slower. Regards David -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------