From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: matt Newsgroups: gmane.lisp.guile.user Subject: Re: random number vectors Date: Sun, 19 Jul 2009 23:05:57 +0200 (CEST) Message-ID: References: <8763dobjnf.fsf@arudy.ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1248037578 9312 80.91.229.12 (19 Jul 2009 21:06:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jul 2009 21:06:18 +0000 (UTC) Cc: guile-user@gnu.org To: Neil Jerram Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jul 19 23:06:11 2009 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MSdaF-0004IG-A6 for guile-user@m.gmane.org; Sun, 19 Jul 2009 23:06:11 +0200 Original-Received: from localhost ([127.0.0.1]:35562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSdaE-0005fx-Rq for guile-user@m.gmane.org; Sun, 19 Jul 2009 17:06:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSdaA-0005fW-N9 for guile-user@gnu.org; Sun, 19 Jul 2009 17:06:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSda6-0005eP-2k for guile-user@gnu.org; Sun, 19 Jul 2009 17:06:06 -0400 Original-Received: from [199.232.76.173] (port=50688 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSda5-0005eL-SH for guile-user@gnu.org; Sun, 19 Jul 2009 17:06:01 -0400 Original-Received: from smtp.ee.ethz.ch ([129.132.2.219]:64880) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MSda5-00048Y-Bs for guile-user@gnu.org; Sun, 19 Jul 2009 17:06:01 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by smtp.ee.ethz.ch (Postfix) with ESMTP id A00E3D9385; Sun, 19 Jul 2009 23:05:58 +0200 (MEST) X-Virus-Scanned: by amavisd-new on smtp.ee.ethz.ch Original-Received: from smtp.ee.ethz.ch ([127.0.0.1]) by localhost (.ee.ethz.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lLJt9-W4nlpV; Sun, 19 Jul 2009 23:05:58 +0200 (MEST) Original-Received: from ifhlux05.ee.ethz.ch (ifhlux05.ee.ethz.ch [129.132.67.184]) by smtp.ee.ethz.ch (Postfix) with ESMTP id 32AD7D9379; Sun, 19 Jul 2009 23:05:58 +0200 (MEST) Original-Received: by ifhlux05.ee.ethz.ch (Postfix, from userid 3556) id B5C89A699B; Sun, 19 Jul 2009 23:05:57 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ifhlux05.ee.ethz.ch (Postfix) with ESMTP id 97CA8A6950; Sun, 19 Jul 2009 23:05:57 +0200 (CEST) In-Reply-To: <8763dobjnf.fsf@arudy.ossau.uklinux.net> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7365 Archived-At: Yes, that sounds exactly right. normal01 --> uniform01. Best, Matt On Sun, 19 Jul 2009, Neil Jerram wrote: > matt writes: > >> Hello, >> >> Guile lets me make a single random:uniform or a single >> random:normal. It also lets me make a random:normal-vector! but >> doesn't let me make a random:uniform-vector! >> >> http://www.gnu.org/software/guile/manual/html_node/Random.html >> >> Is the reason for this? > > Probably just a matter of what was needed at the time these functions > were implemented. > >> Where is the source for random:normal-vector! in 1.8, so that I can >> copy it to make a random:uniform-vector!? The only reference I found >> /usr/include/libguile/random.h > > In libguile/random.c, look for "SCM_DEFINE (scm_random_normal_vector_x". > > Unless you already have a copyright assignment on file for Guile, > though, it's simpler if we add the necessary function and you review > it. I'm not an expert on this code, but it looks as though all we > need is a copy of scm_random_normal_vector_x with scm_c_normal01 > replaced by scm_c_uniform01. Does that sound right to you? > > Regards, > Neil >