Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0983912D for ; Thu, 8 Mar 2012 09:43:27 +0000 (UTC) Received: (qmail 3786 invoked by uid 500); 8 Mar 2012 09:43:26 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 3123 invoked by uid 500); 8 Mar 2012 09:43:22 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 2958 invoked by uid 99); 8 Mar 2012 09:43:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 09:43:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 09:43:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 974DBF9E8 for ; Thu, 8 Mar 2012 09:42:59 +0000 (UTC) Date: Thu, 8 Mar 2012 09:42:59 +0000 (UTC) From: "Alex Bertram (Updated) (JIRA)" To: issues@commons.apache.org Message-ID: <1061587826.38550.1331199779621.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1157671132.32254.1331111338038.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (MATH-764) New sample() API should accept RandomGenerator as parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Bertram updated MATH-764: ------------------------------ Attachment: sampler-refactor.diff Extraction of the sample functionality from the Distribution interfaces. All tests pass. > New sample() API should accept RandomGenerator as parameter > ----------------------------------------------------------- > > Key: MATH-764 > URL: https://issues.apache.org/jira/browse/MATH-764 > Project: Commons Math > Issue Type: Improvement > Affects Versions: 3.0 > Reporter: Alex Bertram > Attachments: sampler-refactor.diff > > Original Estimate: 48h > Remaining Estimate: 48h > > This may come to late as I know the 3.0 release is nearing completion, but I had some concerns about the new sample() method on the math3 RealDistribution interface. > Specifically, there doesn't seem to be a way to supply a random generator to the sampler. Perhaps it would be better to have a factory method on the RealDistribution interface that accepted a RandomGenerator and returns an instance of some new interface, Sampler, which contains the sample() methods. > That is: > interface RealDistribution { > Sampler createSampler(RandomGenerator generator); > Sample createSampler(); // uses default RandomGenerator > } > interface Sampler { > double sample(); > double[] sample(int sampleSize); > } -- 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