* random number vectors
@ 2009-07-17 7:47 matt
2009-07-19 18:41 ` Neil Jerram
0 siblings, 1 reply; 3+ messages in thread
From: matt @ 2009-07-17 7:47 UTC (permalink / raw)
To: guile-user
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? There may also be some confusion because the
term "uniform vector" already means something in guile - a vector
with uniform numeric type.
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
Kind Regards,
Matt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: random number vectors
2009-07-17 7:47 random number vectors matt
@ 2009-07-19 18:41 ` Neil Jerram
2009-07-19 21:05 ` matt
0 siblings, 1 reply; 3+ messages in thread
From: Neil Jerram @ 2009-07-19 18:41 UTC (permalink / raw)
To: matt; +Cc: guile-user
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: random number vectors
2009-07-19 18:41 ` Neil Jerram
@ 2009-07-19 21:05 ` matt
0 siblings, 0 replies; 3+ messages in thread
From: matt @ 2009-07-19 21:05 UTC (permalink / raw)
To: Neil Jerram; +Cc: guile-user
Yes, that sounds exactly right. normal01 --> uniform01.
Best,
Matt
On Sun, 19 Jul 2009, Neil Jerram wrote:
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-19 21:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-17 7:47 random number vectors matt
2009-07-19 18:41 ` Neil Jerram
2009-07-19 21:05 ` matt
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).