Re: outer product implementation

Muthiah Annamalai <[email protected]> Thu, 28 Sep 2006 19:01:34 -0500
Newsgroups gmane.comp.gnu.octave.sources
Message-ID <1159488094.3646.29.camel@localhost>
On Sun, 2006-09-24 at 21:53 +0200, David Bateman wrote:
> Muthiah Annamalai wrote:
> > David,
> > Thanks for the tip on inline functions & the code.
> > Im still not sure if what I did was inline functions, but
> > the code works correctly after I have integrated the code
> > you posted earlier. 
> > 
> > Im attaching the 3rd attempt to outer product implementation.
> > 
> > It can take 2 forms of functions AFAIK: ones by @ sign, 
> > and using function name as a string.
> > 
> > Now I cut off from the code a useless pre-invocation, as
> > this doesnt help anyway, 'cos Octave itself while creating
> > function objects bails out, when the function is invalid or
> > undefined.
> > 
> > Thanks,
> > Muthu
> > 
> > PS: Again attaching the code & test case.
> > PPS: David please let me know if I have missed attribution 
> >      and/or citation in comments.
> 
> 
> Muthu,
> 
> >From the programs prespective inline and function handles aren't any
> different. There was also a small bug in the string function handling as
> the created function was never cleared. Finally you should use the
> unique_symbol_name function to ensure that you don't accidentally create
> a function with the same name. It seems you mixed up the way to handle
> string and inline function calls.


> Also, I agree with Paul. User functions should handle vector arguments,
> and so I changed the way the function works to handle a scalar and a
> vector at a time to reduce the number of calls to feval.
Ok

> You should also be careful with the use of "int" rather than
> octave_idx_type to allow future operation of your function on 64-bit
> platforms. The help should also start with a one sentence description of
> the function as the indexing code in octave-forge and the lookfor
> extracts this first sentence as the description. I converted the help
> string to be more in the style of other octave functions.


> Finally, it is an octave standard to call C++ files with an extension
> .cc. If you don't then some of the automatic scripts in octave and
> octave-forge won't index your function if you include it there. I added
> some test code to prove it all works. Run "test outer.cc".
> 

> Where is this targeted at? Octave core or octave-forge? If its the core,
> then you should probably post future stuff to maintainers so its seen as
> something to go in the core. Any comments?
> 
> Cheers
> David

David,
I think the outer should go wherever JWE wants to, or who ever put it up
on the requirements list. Thanks for fixing many issues, and please 
add a changelog and commit (or send it to) it wherever you think it
belongs.

Thanks
Muthu