allocate random positions within a disc according to a pair of random variables. More...
#include <position-allocator.h>
Public Member Functions | |
RandomDiscPositionAllocator () | |
virtual | ~RandomDiscPositionAllocator () |
void | SetTheta (RandomVariable theta) |
void | SetRho (RandomVariable rho) |
void | SetX (double x) |
void | SetY (double y) |
virtual Vector | GetNext (void) const |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::RandomDiscPositionAllocator. | |
Private Attributes | |
RandomVariable | m_theta |
RandomVariable | m_rho |
double | m_x |
double | m_y |
allocate random positions within a disc according to a pair of random variables.
Definition at line 187 of file position-allocator.h.
ns3::RandomDiscPositionAllocator::RandomDiscPositionAllocator | ( | ) |
Definition at line 281 of file position-allocator.cc.
ns3::RandomDiscPositionAllocator::~RandomDiscPositionAllocator | ( | ) | [virtual] |
Definition at line 283 of file position-allocator.cc.
Vector ns3::RandomDiscPositionAllocator::GetNext | ( | void | ) | const [virtual] |
This method _must_ be implement in subclasses.
Implements ns3::PositionAllocator.
Definition at line 307 of file position-allocator.cc.
References ns3::RandomVariable::GetValue(), m_rho, m_theta, m_x, m_y, and NS_LOG_DEBUG.
TypeId ns3::RandomDiscPositionAllocator::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::RandomDiscPositionAllocator.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::PositionAllocator.
Definition at line 251 of file position-allocator.cc.
References ns3::TypeId::AddAttribute(), ns3::TypeId::AddConstructor(), m_rho, m_theta, m_x, m_y, and ns3::TypeId::SetParent().
void ns3::RandomDiscPositionAllocator::SetRho | ( | RandomVariable | rho | ) |
Definition at line 292 of file position-allocator.cc.
References m_rho.
void ns3::RandomDiscPositionAllocator::SetTheta | ( | RandomVariable | theta | ) |
Definition at line 287 of file position-allocator.cc.
References m_theta.
void ns3::RandomDiscPositionAllocator::SetX | ( | double | x | ) |
Definition at line 297 of file position-allocator.cc.
References m_x.
void ns3::RandomDiscPositionAllocator::SetY | ( | double | y | ) |
Definition at line 302 of file position-allocator.cc.
References m_y.
Definition at line 202 of file position-allocator.h.
Referenced by GetNext(), GetTypeId(), and SetRho().
Definition at line 201 of file position-allocator.h.
Referenced by GetNext(), GetTypeId(), and SetTheta().
double ns3::RandomDiscPositionAllocator::m_x [private] |
Definition at line 203 of file position-allocator.h.
Referenced by GetNext(), GetTypeId(), and SetX().
double ns3::RandomDiscPositionAllocator::m_y [private] |
Definition at line 204 of file position-allocator.h.
Referenced by GetNext(), GetTypeId(), and SetY().