Random Class Reference

#include <random.h>


Detailed Description

Definition at line 44 of file random.h.

Static Public Member Functions

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

Static Private Member Functions

static RNGrng ()


Member Function Documentation

static 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:

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

Definition at line 56 of file random.h.

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

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

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

Here is the call graph for this function:

static 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:

static 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:

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

Definition at line 61 of file random.h.

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

Referenced by XCPQueue::setupTimers().

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

Here is the call graph for this function:

static 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:

static 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:

static 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(), Mac802_15_4::Mac802_15_4(), MobileNode::random_direction(), MacSimple::send(), CsmaCA802_15_4::start(), BackoffTimer::start(), and Mac802_11::tx_resume().

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

Here is the call graph for this function:

static 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:

static 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:

static 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().

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

Here is the call graph for this function:

static 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:

static 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:

static 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(), SctpAgent::CalcHeartbeatTime(), TracePagePool::command(), MIPMHAgent::command(), MIPBSAgent::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(), 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(), AnWormApp::probe(), 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(), DnhWormApp::send_probe(), imepAgent::sendAck(), AODV::sendError(), imepAgent::sendHello(), 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 Mar 6 17:26:42 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6