unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: matt <matthewm@ifh.ee.ethz.ch>
Cc: guile-user@gnu.org
Subject: Re: random number vectors
Date: Sun, 19 Jul 2009 19:41:08 +0100	[thread overview]
Message-ID: <8763dobjnf.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <alpine.DEB.2.00.0907170935410.5948@ifhlux05.ee.ethz.ch> (matt's message of "Fri\, 17 Jul 2009 09\:47\:39 +0200 \(CEST\)")

matt <matthewm@ifh.ee.ethz.ch> 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




  reply	other threads:[~2009-07-19 18:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17  7:47 random number vectors matt
2009-07-19 18:41 ` Neil Jerram [this message]
2009-07-19 21:05   ` matt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763dobjnf.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-user@gnu.org \
    --cc=matthewm@ifh.ee.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).