[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Random vectors
From: |
Éric Germaneau |
Subject: |
Re: [Help-gsl] Random vectors |
Date: |
Thu, 01 May 2014 09:30:19 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
Dear Klaus,
Thank you for your reply.
I use the Mersenne Twister type.
Actually, I started to use MKL but I use GSL for years and like to use
it better.
I'll take a look at your example.
Thanks again,
Éric.
On 04/30/2014 03:10 PM, Klaus Huthmacher wrote:
Dear Éric,
interesting question.
At first I thought: What random number genererator are you using? It seems
that the Mersenne Twister is standard but there are several others.
Second, have you tried out the random engine of C++11:
http://www.cplusplus.com/reference/random/
I appended a minimal example.
Best wishes and keep us informed. :)
-- Klaus.
Dear all,
I wonder how to generate random vectors with GSL.
I'm aware of the *gsl_ran_dir_nd *routine but the numbers are normalized.
I need to generate random velocities for a given temperature of N
particles.
I currently call *gsl_ran_gaussian* 3N times.
That's too expensive.
I'd like to generate a 3N vector at once.
Is there anyway to do this with GSL?
Thanks,
Éric.
--
Éric Germaneau (???), Specialist
Center for High Performance Computing
Shanghai Jiao Tong University
Room 205 Network Center, 800 Dongchuan Road, Shanghai 200240 China
M:address@hidden P:+86-136-4161-6480 W:http://hpc.sjtu.edu.cn
--
Éric Germaneau (???), Specialist
Center for High Performance Computing
Shanghai Jiao Tong University
Room 205 Network Center, 800 Dongchuan Road, Shanghai 200240 China
Email:address@hidden Mobi:+86-136-4161-6480 http://hpc.sjtu.edu.cn