commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (MATH-1124) Instances of AbstractRealDistribution require a random generator.
Date Tue, 20 May 2014 21:29:39 GMT


Gilles commented on MATH-1124:

Quoting Phil's answer on the ML:

The subclasses will still need to either provide RandomGenerator
instances to constructors or use the default.  Passing null should
work to avoid the overhead you are referring to but will of course
cause NPE if you try to sample.  Lazy initialization or static
default instances are not likely to be supported.

Unless you provide a use-case demonstrating an unbearable slowliness, this issue will be closed.

> Instances of AbstractRealDistribution require a random generator.
> -----------------------------------------------------------------
>                 Key: MATH-1124
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Ajo Fod
> A couple of observations:
> ... The default random generator takes a while to instantiate. 
> ... Many functions of these distributions don't require a random generator. Generally
speaking only sampling requires it.
> So, why force the default constructor to initialize with a new random generator ... why
not use a global generic or simple generator? 
> Or do away with random generator except for sampling?
> This issue was observed with the TDistribution class , but it is probably applicable
to many classes as well. 

This message was sent by Atlassian JIRA

View raw message