random_var Class Reference

#include <random-var.h>

List of all members.

Public Member Functions

 random_var (int c)
 random_var (int s, int e, weight_func w_=NULL)
 random_var (int s, int e, std::vector< int > ws)
const random_varoperator= (const random_var &other)
int weight (int val) const
int roll () const
 operator int () const
double expected () const
int min () const
int max () const

Protected Member Functions

void init_weights (weight_func w)
void init ()
int roll2val (int r) const


Constructor & Destructor Documentation

random_var::random_var ( int  c  ) 

Here is the call graph for this function:

random_var::random_var ( int  s,
int  e,
weight_func  w_ = NULL 
)

Here is the call graph for this function:

random_var::random_var ( int  s,
int  e,
std::vector< int >  ws 
)

Here is the call graph for this function:


Member Function Documentation

const random_var & random_var::operator= ( const random_var other  ) 

int random_var::weight ( int  val  )  const

int random_var::roll (  )  const

Here is the call graph for this function:

random_var::operator int (  )  const [inline]

Here is the call graph for this function:

double random_var::expected (  )  const

Here is the call graph for this function:

int random_var::min (  )  const

int random_var::max (  )  const

void random_var::init_weights ( weight_func  w  )  [protected]

void random_var::init (  )  [protected]

Here is the call graph for this function:

int random_var::roll2val ( int  r  )  const [protected]

Here is the call graph for this function:


The documentation for this class was generated from the following files:

Generated on Thu Jan 13 13:41:24 2011 by  doxygen 1.5.6