Boost logo

Boost Users :

From: Kamil Renczewski (hand7_at_[hidden])
Date: 2006-03-23 10:37:04


 Hello
I have a problem.
I need to write program, whitch interprets arguments given at
runtime and create generators from this arguments. Then i have to
use this generators (by calling operator() method) to generate
numbers. Problem is that i dont know type of generators at compile
time and i dont know how to store them in struct or class or even
pass to a function.
Here is en example of my thinking:
i run program like this: generators N 10 2 E 2.3
and i would like to get some ramdom numbers from a
normal_distribution<>(10, 2) and exponential_distribution<>(2.3)
another run of a program might be: generators U -10 30 G 0.3 whitch
should give me an uniform_int<>(-10, 30) and
geometric_distribution<>(0.3) .

Any ideas how to do this?

thanks


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net