Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Random Class Reference

#include <random.h>

List of all members.

Static Public Member Functions

void seed (int s)
int seed_heuristically ()
int random ()
double uniform ()
double uniform (double r)
double uniform (double a, double b)
double exponential ()
int integer (int k)
double exponential (double r)
double pareto (double scale, double shape)
double paretoII (double scale, double shape)
double normal (double avg, double std)
double lognormal (double avg, double std)

Static Private Member Functions

RNGrng ()


Member Function Documentation

double Random::exponential double  r  )  [inline, static]
 

Definition at line 58 of file random.h.

References RNG::exponential(), and rng().

00058 { return rng()->exponential(r); }

Here is the call graph for this function:

double Random::exponential  )  [inline, static]
 

Definition at line 56 of file random.h.

References RNG::exponential(), and rng().

Referenced by UnslottedAlohaMac::backoff(), TelnetApp::next(), and HyperExponentialRandomVariable::value().

00056 { return rng()->exponential(); }

Here is the call graph for this function:

int Random::integer int  k  )  [inline, static]
 

Definition at line 57 of file random.h.

References rng(), and RNG::uniform().

Referenced by MacCsma::backoff(), BackoffHandler::handle(), TcpAgent::output(), QSNewRenoTcpAgent::output(), SemanticPacketQueue::pickPacketForECN(), SemanticPacketQueue::pickPacketToDrop(), REDQueue::pickPacketToDrop(), and MacHandlerRetx::schedule().

00057 { return rng()->uniform(k); }

Here is the call graph for this function:

double Random::lognormal double  avg,
double  std
[inline, static]
 

Definition at line 62 of file random.h.

References RNG::lognormal(), and rng().

00062 { return rng()->lognormal(avg, std); }

Here is the call graph for this function:

double Random::normal double  avg,
double  std
[inline, static]
 

Definition at line 61 of file random.h.

References RNG::normal(), and rng().

00061 { return rng()->normal(avg, std); }

Here is the call graph for this function:

double Random::pareto double  scale,
double  shape
[inline, static]
 

Definition at line 59 of file random.h.

References RNG::pareto(), and rng().

Referenced by POO_Traffic::next_interval().

00059 { return rng()->pareto(scale, shape); }

Here is the call graph for this function:

double Random::paretoII double  scale,
double  shape
[inline, static]
 

Definition at line 60 of file random.h.

References RNG::paretoII(), and rng().

00060 { return rng()->paretoII(scale, shape);}

Here is the call graph for this function:

int Random::random  )  [inline, static]
 

Definition at line 52 of file random.h.

References rng(), and RNG::uniform_positive_int().

Referenced by SMAC::checkToSend(), RandomCommand::command(), GetRand(), SMAC::handleCounterTimer(), MobileNode::random_direction(), Mac802_11::send(), BackoffTimer::start(), and Mac802_11::tx_resume().

00052 { return rng()->uniform_positive_int(); }

Here is the call graph for this function:

RNG* Random::rng  )  [inline, static, private]
 

Definition at line 46 of file random.h.

References RNG::defaultrng().

Referenced by exponential(), integer(), lognormal(), normal(), pareto(), paretoII(), random(), seed(), seed_heuristically(), and uniform().

00046 { return RNG::defaultrng(); }

Here is the call graph for this function:

void Random::seed int  s  )  [inline, static]
 

Definition at line 49 of file random.h.

References RNG::RAW_SEED_SOURCE, rng(), and RNG::set_seed().

Referenced by RandomCommand::command(), and Marker::command().

00049 { rng()->set_seed(RNG::RAW_SEED_SOURCE, s); }

Here is the call graph for this function:

int Random::seed_heuristically  )  [inline, static]
 

Definition at line 50 of file random.h.

References RNG::HEURISTIC_SEED_SOURCE, rng(), RNG::seed(), and RNG::set_seed().

Referenced by RandomCommand::command(), TcpAgent::output(), and QSNewRenoTcpAgent::output().

00050 { rng()->set_seed(RNG::HEURISTIC_SEED_SOURCE); return rng()->seed(); };

Here is the call graph for this function:

double Random::uniform double  a,
double  b
[inline, static]
 

Definition at line 55 of file random.h.

References rng(), and RNG::uniform().

00055 { return rng()->uniform(a,b); }

Here is the call graph for this function:

double Random::uniform double  r  )  [inline, static]
 

Definition at line 54 of file random.h.

References rng(), and RNG::uniform().

00054 { return rng()->uniform(r); }

Here is the call graph for this function:

double Random::uniform  )  [inline, static]
 

Definition at line 53 of file random.h.

References rng(), and RNG::uniform_double().

Referenced by AdaptiveFidelityEntity::adapt_it(), LandmarkAgent::AddMobileTag(), SFDPolicy::applyPolicer(), TSW3CMPolicy::applyPolicer(), TSW2CMPolicy::applyPolicer(), Star::backoff(), BTree::backoff(), Line::backoff(), BPSK::BitError(), TracePagePool::command(), MIPMHAgent::command(), MIPBSAgent::command(), LandmarkAgent::command(), EmpWebTrafPool::command(), EmpFtpTrafPool::command(), DSRAgent::command(), DiffusionProb::consider_new(), FloodingAgent::ConsiderNew(), ErrorModel::CorruptBit(), ErrorModel::CorruptByte(), ErrorModel::CorruptPkt(), REMQueue::deque(), REDQueue::drop_early(), PIQueue::drop_early(), RIOQueue::drop_in_early(), RIOQueue::drop_out_early(), REMQueue::enque(), RedPDQueue::enque(), redQueue::enque(), SendBufferTimer::expire(), RateLimitSessionList::filter(), AODV::forward(), DiffusionRate::FwdOriginal(), DiffusionRate::FwdSubsample(), gafjitter(), HelloTimer::handle(), DiffusionRate::InterestHandle(), RapAgent::IpgTimeout(), LandmarkAgent::jitter(), jitter(), HBTimer::next_interval(), CBR_Traffic::next_interval(), CBR_PP_Traffic::next_interval(), TfrcAgent::nextpkt(), WebTrafPool::pickdst(), WebTrafPool::picksrc(), MobileNode::random_destination(), MobileNode::random_direction(), MobileNode::random_position(), MobileNode::random_speed(), ErrorModel::recv(), imepAgent::recv_outgoing(), TcpAgent::reset(), DSRAgent::returnSrcRouteToRequestor(), GAFAgent::schedule_wakeup(), TcpAgent::send_much(), Sack1TcpAgent::send_much(), SackRHTcpAgent::send_much(), IntTcpAgent::send_much(), FullTcpAgent::send_much(), BayFullTcpAgent::send_much(), FackTcpAgent::send_much(), imepAgent::sendAck(), AODV::sendError(), imepAgent::sendHello(), DSRAgent::sendOutPacketWithRoute(), TraceFile::setup(), OmniMcastAgent::Start(), AdaptiveFidelityEntity::start(), DiffusionAgent::Start(), DiffusionProb::Start(), TaggerTSWFlow::tagging(), tcplib_telnet_interarrival(), RTPAgent::timeout(), RTCPAgent::timeout(), GAFAgent::timeout(), SinkAgent::timeout(), HyperExponentialRandomVariable::value(), Out_List::WhereToGo(), and TcpSessionAgent::who_to_snd().

00053 { return rng()->uniform_double();}

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Tue Apr 20 13:11:33 2004 for NS2.26SourcesOriginal by doxygen 1.3.3