commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Barnhill <>
Subject Re: [MATH] ComplexUtils pull request; some future proposals
Date Fri, 30 Oct 2015 09:20:00 GMT

On 30/10/15 02:15, Gilles wrote:
> There are some problems with the Javadoc (wrong "@return" comment).
> Not all local variables that are constant are declared "final".

I am happy to give it all another proof read. I take it the procedure is 
to fork the dedicated branch and then submit a pull request to that branch?

> Shouldn't independent changes be performed in separate commits?
> [Referring to "IntegerSequence" and "LaguerreSolver".]

I made edits to the Solver in particular because my commit would 
otherwise have left it broken. If that is not best practice I am happy 
to revert and submit independently.

> Actually, I don't like the new "size" method in "IntegerSequence".
> Although the number of elements is needed in the new methods in
> ComplexUtils, I don't think that we should advertise the functionality
> in its current (necessarily) poor implementation.
> A better alternative is to have an instance that will hold the
> number of elements it contains:

My first impulse was to see if I could add a field to the range object 
that contained its size. But as the method returns an Iterator I didn't 
see a way to do that without returning a subclass that extended Iterator 
in some way instead. I figured that was not a desired outcome. So 
instead I incorporated what as far as I know is best practice:

Alternatively I could just create a local private method in ComplexUtils 
that determined the size by iterating through the range and call that, 
and leave IntegerSequence alone.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message