Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F8C1911E for ; Sun, 23 Oct 2011 03:30:22 +0000 (UTC) Received: (qmail 62690 invoked by uid 500); 23 Oct 2011 03:30:20 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 62436 invoked by uid 500); 23 Oct 2011 03:30:20 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 62411 invoked by uid 99); 23 Oct 2011 03:30:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Oct 2011 03:30:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of phil.steitz@gmail.com designates 209.85.160.171 as permitted sender) Received: from [209.85.160.171] (HELO mail-gy0-f171.google.com) (209.85.160.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Oct 2011 03:30:07 +0000 Received: by gyg13 with SMTP id 13so7191567gyg.30 for ; Sat, 22 Oct 2011 20:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=q/gzuuN3Ndi7SP5wPy9O+S7N3HfMwK3+TkKpBSMnDBk=; b=Nu+aw4AAy/4cR/2G825QkY+WgbJg20+XmiKbQ+l9MIdUkGPXSAHy9AMTx/sb3JP7rg M24AINs0nIONiZ/MVCsJGEB1quInDYGgUffBa0QOUKMDt0HKtoRjwmB+cbNuR0XEqACx GQyTjgyz3vre8kTWWAyQKv4iB4NW6Hn2BBeZc= Received: by 10.68.14.35 with SMTP id m3mr15001586pbc.27.1319340586548; Sat, 22 Oct 2011 20:29:46 -0700 (PDT) Received: from [192.168.0.2] (71-223-64-240.phnx.qwest.net. [71.223.64.240]) by mx.google.com with ESMTPS id g1sm37370108pbv.2.2011.10.22.20.29.44 (version=SSLv3 cipher=OTHER); Sat, 22 Oct 2011 20:29:45 -0700 (PDT) Message-ID: <4EA38A25.7000506@gmail.com> Date: Sat, 22 Oct 2011 20:29:41 -0700 From: Phil Steitz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Commons Users List Subject: [math] Re: binomial random generator References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 10/22/11 8:15 PM, Ahmed Abdeen Hamed wrote: > Hello friends, > > I am using the following code in a program I am writing: > private static JDKRandomGenerator rg = new JDKRandomGenerator(); > private static RandomDataImpl randBinomial = new RandomDataImpl(rg); > > However, it is slowing down things very much. When I replace generator with > a java.util.Random object it works fine without the performance issues. Is > that expected with this library? Is there any work around? My programs are > very time consuming and I have been repeatedly running them. I really need > some tips if there is anything I can do to enhance the performance. That depends on how you are using randBinomial above. Can you share the code that uses randBinomial and what you mean by "replace generator with a java.util.Random object?" It will also help to describe what exactly you are trying to accomplish with the code. Phil > > Thanks very much! > Ahmed > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org