I'm having a hard time to understand how I could use binomial and normal ( gaussian ) distributions in boost. I need to get a single values from these functions. I'm sure I'm probably trying to use these functions wrongly at the moment but here is what I have so far:
#include <boost/math/distributions.hpp>
#include <boost/math/tools/roots.hpp>
#include <boost/random/variate_generator.hpp>
#include <boost/random.hpp>
//valueH is assigned before
int value;
/* Should this assign value to "value" ?*/
value = boost::math::binomial_distribution<> value(1,valueH);
and normal distribution as
normal norm;
double someValue = boost::math::pdf(norm, (value1*value2+value3)/(value1*sqrt(value2)));
or should I use boost::math::normal_distribution<> here or how this works ? I've read boost documentation and still I don't get how I could assign values from distributions. I've also read C++ TR1: how to use the normal_distribution? so do I need to use some random number generator and generate numbers as the link shows and does that allow me to assign single values to variables ?
I'm sorry if this a bit messy message but anyway thanks !
Okay so far I have understood binomial and got it working, now I need to get normal distribution to work... Referring to link above, my situation differs from that I just need a one value but I would like to call normal distribution with a value. Like "give me N(0.1) with number 2 or so.
Well I thought this was getting easier but seems it isn't I would like to use boost bisection function Bisection but the problems is that sometimes I have only function, min and max, and the bisection function needs at least 4 arguments 4th argument is Tol tol.. which is some kind of tolerance but could I just assign it to 0 if I want to find an absolute value or do I need to write my own bisection with 3 arguments ?