[
https://issues.apache.org/jira/browse/MATH-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14333313#comment-14333313
]
Gilles commented on MATH-1155:
------------------------------
In {{IndexTable}}, to ensure read-only data, the fields should be "private" and
the data retrieved through accessors, e.g.
{code}
private final int[] iRm1;
// ....
IndexTable(final int k, final int m1, final int m2, final int m3) {
// ....
iRm1 = new int[r];
// ....
}
public int iRm1(int index) {
return iRm1[index];
}
{code}
Hence the class can be made "public" without risk of bad usage.
> Speedup initialization of WellXXX rngs
> --------------------------------------
>
> Key: MATH-1155
> URL: https://issues.apache.org/jira/browse/MATH-1155
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.3
> Reporter: Thomas Neidhart
> Fix For: 4.0
>
> Attachments: MATH-1155.patch
>
>
> As identified in MATH-1154, initialization of the WellXXX rngs is quite
> costly as some internal arrays have to be computed.
> Most of these initializations are specific to the type of rng, e.g.
> Well19937a and will not change afterwards, thus could be initialized in a
> static way.
> Due to implementation details, i.e. the relevant fields are declared
> protected in the base class AbstractWell, such a change would not be
> backwards compatible and will have to be postponed to 4.0
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)