octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with sum (...)


From: Ben Abbott
Subject: Re: problem with sum (...)
Date: Sun, 4 Nov 2007 13:23:29 -0500


On Nov 4, 2007, at 1:00 PM, Søren Hauberg wrote:

Ben Abbott skrev:
Søren,
The patch didn't work for me. However, I was able to apply in manually. What exactly should I have done to have it apply cleanly?
The patch is against the CVS version. Did you apply it to a recent CVS checkout?

I updated my cvs yesterday. One problem may be that I don't use the same directory structure as you, so I tried to apply the patch directly the ismember.m. For example,

patch ismember.m ismember.patch

Does this work for you?


In any event, you've done quite a bit more work on this than I. I had added some additional tests to my version that produced failures in the original. They pass in yours.
Are these tests part of the current set of tests? If not, then please send them so they can be part of the test suite.

I'm happy to send a patch, but would prefer that I'm able to create and apply patches correctly first ... although for such a simple change, I can send the tests to you. I'll look through the present tests to see if any others might be added for completeness.


I was attempting to simplify the "Magic" portion ... actually trying to incorporate numel(a)==1 and numel(a)>1 into the same code.
To be honest, I don't truly get the magic part. So, if you have an easier-to-understand idea that is just as fast, then it would be great.

I'm sure I can come up with a simpler algorithm, but will have to test it in order to determine if it is as efficient.

I'll play with the idea a bit longer, but since everything appears to work, I'm not sure it makes sense to tweak a solution that already works.
The part of my implementation that handles the 'rows' argument, is just horrible. It's an evil-and-dirty hack, and it really should be improved. So if you have a better idea, it would be great.

I'll take a look.

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]