ns-allinone-2.35/packmime/packmime_ranvar.cc
int PackMimeHTTPFileSizeRandomVariable::rfsize0(int state)
{
	double yt, p;
  
	p = rng_->uniform();
	if (state==1) 
		p = log(1-p)/LOG2; 
	yt = fsize_invcdf[0][state].LinearInterpolate(p);
	if (state==1) 
		yt = exp(LOG2*yt); 

	return((int) yt);
}
/** random generate the marginal distribution of fsize0 depending
 *  on whether it is a cache validation (0) or downloaded file (1).
 */
random generate the marginal distribution of fsize0 depending
on whether it is a cache validation (0) or downloaded file (1).
random generate the marginal distribution of fsize0 depending on whether it is a cache validation ( 0 ) or downloaded file ( 1 ) .
int PackMimeHTTPFileSizeRandomVariable::rfsize0(int state)
{
	double yt, p;
	p = rng_->uniform();
	if (state==1) 
		p = log(1-p)/LOG2; 
	yt = fsize_invcdf[0][state].LinearInterpolate(p);
	if (state==1) 
		yt = exp(LOG2*yt); 
	return((int) yt);
}
int PackMimeHTTPFileSizeRandomVariable :: rfsize0 ( int state ) { double yt , p ; p = rng_ -> uniform ( ) ; if ( state == 1 ) p = log ( 1 - p ) / LOG2 ; yt = fsize_invcdf [ 0 ] [ state ] . LinearInterpolate ( p ) ; if ( state == 1 ) yt = exp ( LOG2 * yt ) ; return ( ( int ) yt ) ; }
random generate the marginal distribution of fsize0 depending
  on whether it is a cache validation (0) or downloaded file (1).
random generate the marginal distribution of fsize0 depending on whether it is a cache validation ( 0 ) or downloaded file ( 1 ) .