Thanks for looking at this...

Couple of things:
1> your code won't compile, the "doc" variable in the initialValue
method is undefined.
2> on the "how to contribute" page, there should be links to style
files for Eclipse and IntelliJ
    For instance, indents should be two spaces.... Not a big deal, but
if you intend to get into
    more code it's worth the time to install it....

What do you think about this alternative?

  protected float func(int doc, FunctionValues[] valsArr) {
    if (valsArr.length == 0) return 0.0f;
    float val = Float.MIN_VALUE;
    for (FunctionValues vals : valsArr) {
      val = Math.max(vals.floatVal(doc), val);
    }
    return val;
  }

Best
Erick

On Thu, Jun 6, 2013 at 6:53 PM, Yogi Valani <[email protected]> wrote:
> Hi I noticed that the function 'func' in MaxFloatFunction.java could be
> refactored a little, so that the if statement is only evaluated once.Should
> make it run a little faster over large arrays.
>
>  Please share your thoughts on the change I have attached a patch file.
>
> Many thanks
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to