You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/06/07 06:07:47 UTC

[GitHub] [commons-math] XenoAmess commented on a change in pull request #144: [MATH-1538] refine some codes dealing with filling an array with its first and second elements.

XenoAmess commented on a change in pull request #144:
URL: https://github.com/apache/commons-math/pull/144#discussion_r436328851



##########
File path: src/main/java/org/apache/commons/math4/analysis/differentiation/DSCompiler.java
##########
@@ -1497,11 +1497,11 @@ public void cosh(final double[] operand, final int operandOffset,
 
         // create the function value and derivatives
         double[] function = new double[1 + order];
-        function[0] = FastMath.cosh(operand[operandOffset]);
+        final double function0 = function[0] = FastMath.cosh(operand[operandOffset]);

Review comment:
       > final is useless
   
   Yep, if you think it that way.
   
   >and not the code style for these files
   
   There is final for local variable for class `FieldDenseMatrix` , `TricubicInterpolator` , `UnivariatePeriodicInterpolator` , `FieldDenseMatrix` , `SobolSequenceGenerator`, `GeometryExample`, and several test classes.
   So I think the `final` I used is not outside of "the code style for these files", thus no need to change.
   Or if I mis-understand something, please tell me.
   Thanks.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org