You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (Commented) (JIRA)" <ji...@apache.org> on 2012/03/03 02:38:38 UTC
[jira] [Commented] (MATH-758) Fields which could be private and/or
final
[ https://issues.apache.org/jira/browse/MATH-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221445#comment-13221445 ]
Sebb commented on MATH-758:
---------------------------
LaguerreSolver.complexSolver - could this be private and final?
Dfp fields exp/mant/nans/sign - looks like these could be private with getters, apart from nans which is written by subclasses.
AbstractFormat.setDenominatorFormat()
AbstractFormat.setNumeratorFormat() - are these needed (only used in test code)? If not, the underlying fields could be made final
NordsieckStepInterpolator.stateVariation is only used internally AFAICT, so could be private
FirstMoment.n has a getter, and is not updated externally, so could be private
FourthMoment.m4 is only read externally by Kurtosis, so could be private (there is a getter)
The fields m1, m2, m3 are only ever written by the xxxMoment classes, which set them to zero.
Each class could have a protected zero() method, which could be chained in the same way as the clear() method.
Other classes could then use the getters and m1-m4 could be private.
[To be continued]
> Fields which could be private and/or final
> ------------------------------------------
>
> Key: MATH-758
> URL: https://issues.apache.org/jira/browse/MATH-758
> Project: Commons Math
> Issue Type: Bug
> Reporter: Sebb
>
> BaseAbstractUnivariateIntegrator has several fields that are not currently changed after construction and could be final:
> protected double absoluteAccuracy;
> protected double relativeAccuracy;
> protected int minimalIterationCount;
> protected Incrementor iterations;
> protected Incrementor evaluations;
> These all have getters as well, so could also be made private.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira