Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2651017AD2 for ; Sat, 11 Jul 2015 22:12:41 +0000 (UTC) Received: (qmail 58437 invoked by uid 500); 11 Jul 2015 22:12:40 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 58301 invoked by uid 500); 11 Jul 2015 22:12:40 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 58289 invoked by uid 99); 11 Jul 2015 22:12:40 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jul 2015 22:12:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E56B1D3D0E for ; Sat, 11 Jul 2015 22:12:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id YEX1dz0ig5Ba for ; Sat, 11 Jul 2015 22:12:39 +0000 (UTC) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 3663120F46 for ; Sat, 11 Jul 2015 22:12:39 +0000 (UTC) Received: by pachj5 with SMTP id hj5so10748856pac.3 for ; Sat, 11 Jul 2015 15:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=MJSdYBA3emtGWp9HZgXUwGfZmpCBeQdkCO1GDgZtsws=; b=KzLumP+CKINiOP0i8eLDnFGcMY7NPzl9XWwFiQ8qbXqeavxhUf7GTwkOFM8/yOW3Nz dd2n3LT6Gbi/r7QD/z7tCu4cssN2jgRh4yIWPnyLZY3PK5dbiHHpOPpiKo6NKmIer4U/ GgBkDCuRagnRr5X4YI2CGfDIB9/4uryrBPh117RdaJDWaKZ145e+tZxjMn9SRSAB82h/ 5wayk3KRoVopM+PUyYI3S0dYI4rQPzJ4zBoEOB1QMYrGpthxiM7FA4h64Htnjk0ealG/ zmQXpBSrtn2b1Tl1p0s+HN9Bmgfl+md/RKVu1EaJIltpsxt7or6ClHvw732q8k/Hm9M4 B2eA== X-Received: by 10.68.69.7 with SMTP id a7mr55271382pbu.93.1436652753430; Sat, 11 Jul 2015 15:12:33 -0700 (PDT) Received: from psteitz-mbp.local (ip70-171-216-182.tc.ph.cox.net. [70.171.216.182]) by smtp.googlemail.com with ESMTPSA id dp1sm13539343pbb.53.2015.07.11.15.12.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Jul 2015 15:12:31 -0700 (PDT) Message-ID: <55A194CD.7020300@gmail.com> Date: Sat, 11 Jul 2015 15:12:29 -0700 From: Phil Steitz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [math] random boolean arrays References: <55A169A0.6040601@gmail.com> <03e583c0b2070204ac5cf2c3ea95bcfe@scarlet.be> In-Reply-To: <03e583c0b2070204ac5cf2c3ea95bcfe@scarlet.be> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 7/11/15 3:06 PM, Gilles wrote: > On Sat, 11 Jul 2015 12:08:16 -0700, Phil Steitz wrote: >> The code implemented in MATH-1242 to improve performance of KS >> monteCarloP in-lines efficient generation of random boolean arrays. >> Unfortunately, I think the implementation is not quite random (see >> comments on the ticket). To verify it, we need to be able to test >> the random boolean array generation directly. To do that, we have >> to either expose the method (at least as protected) in the KS class >> or add it somewhere else. I propose the latter but am not sure >> where to put it. For speed, we need to avoid array copies, so the >> API will have to be something like randomize(boolean[], nTrue). > > Are you sure that copying is an issue for speed? > I mean, the randomization will anyways copy new values into the > array... The algorithm is used in a tight loop that would be slowed down considerably by allocating and copying arrays to / from the stack. > >> It >> could go in the swelling MathArrays class, or RandomDataGenerator. >> The latter probably makes more sense, but the API does not fit too >> well. Any ideas? > > Isn't there some relationship with > https://issues.apache.org/jira/browse/MATH-1158 > ? No. Phil > > > Gilles > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org