commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <>
Subject Re: [math] Suggestion to use List<Type> instead of Type array
Date Tue, 22 Jul 2014 11:48:41 GMT

On Mon, 21 Jul 2014 06:30:07 +0800, Fuxiang Chen wrote:
> Dear Developers,
> We are a team of researchers from the Hong Kong University of Science 
> and
> Technology (HKUST). Currently, we are studying how crowdsourcing can 
> help
> developers to build a higher quality software.
> One of the subjects that we used is Apache Commons Math. From our
> experiment, we identified a few areas in a particular file 
> ""
> that can be converted to a List<Type>. Using List<Type> is more 
> preferred
> as it is much more flexible and easier to maintain.

Could you be more explicit about the issue you have with that class?

> The following 2 identified methods are able to convert to a 
> List<Type>:
> 1) public static void assertChiSquareAccept(int[] values, double[]
> expected, long[] observed, double alpha)
> 2) public static void assertChiSquareAccept(double[] expected, long[]
> observed, double alpha)
> Both of the above methods have used String arrays, and can be 
> converted to
> a List<String> instead.
> Our references from the Stack Overflow community pointed out that
> List<Type> is preferred over a Type array.
> The Stack Overflow references to this are at "
>" and "
> By converting the Type array to a List<Type>, this will make the code 
> more
> flexible and easier to maintain.

It depends on usage.
Those methods are intended for internal purpose (they are defined in 
"test" sub-directory area of the code repository, whereas the public
functionality is in the "main" sub-directory.
What is your usage?


> [...]

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

View raw message