Gilles created MATH-1346:
----------------------------

             Summary: "ValueServer" has various shortcomings
                 Key: MATH-1346
                 URL: https://issues.apache.org/jira/browse/MATH-1346
             Project: Commons Math
          Issue Type: Improvement
            Reporter: Gilles
            Priority: Minor
             Fix For: 4.0


* It is inefficient as it recreates a distribution instance for each sample 
(through calls to "RandomDataGenerator").
* It seems to be an aggregation of "EmpiricalDistribution, 
"ExponentialDistribution", "NormalDistribution" and "UniformDistribution".
* Main purpose seems to allow sampling from those distributions where the 
parameters ("mu" and "sigma") are mutable (but are set to identical values for 
all distributions).
* Then, there is a basic problem in that those instance variables are not 
always meaningful (for the different modes): field "sigma" only applies to the 
"Gaussian mode" and "mu" does not apply to the "digest mode".
* The only non-trivial addition (wrt using the distribution classes directly) 
is the file IO but  usability is reduced because the class imposes a specific 
format and encoding.
* The name is deceiving as one could easily assume that the server can be 
accessed from multiple "client" threads.

IMO, a math library should not be concerned with how data is loaded from 
external sources (such as files), hence this class should perhaps be moved to 
the "examples" part of the repository.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to