20 #ifndef POSITION_ALLOCATOR_H 
   21 #define POSITION_ALLOCATOR_H 
   23 #include "ns3/object.h" 
   24 #include "ns3/random-variable-stream.h" 
   25 #include "ns3/vector.h" 
   50   virtual Vector 
GetNext (
void) 
const = 0;
 
   86   virtual Vector 
GetNext (
void) 
const;
 
   90   mutable std::vector<Vector>::const_iterator 
m_current; 
 
  146   void SetN (uint32_t n);
 
  171   uint32_t 
GetN (
void) 
const;
 
  178   virtual Vector 
GetNext (
void) 
const;
 
  216   virtual Vector 
GetNext (
void) 
const;
 
  254   virtual Vector 
GetNext (
void) 
const;
 
  291   void SetX (
double x);
 
  295   void SetY (
double y);
 
  297   virtual Vector 
GetNext (
void) 
const;
 
  343   void SetX (
double x);
 
  348   void SetY (
double y);
 
  350   virtual Vector 
GetNext (
void) 
const;
 
uint32_t m_current
currently position 
 
LayoutType
Determine whether positions are allocated row first or column first. 
 
Ptr< RandomVariableStream > m_y
pointer to y's random variable stream 
 
Ptr< RandomVariableStream > m_y
pointer to y's random variable stream 
 
double GetMinY(void) const 
 
void SetDeltaX(double deltaX)
 
virtual Vector GetNext(void) const =0
 
static TypeId GetTypeId(void)
Register this type with the TypeId system. 
 
Ptr< RandomVariableStream > m_theta
pointer to theta's random variable stream 
 
void SetMinX(double xMin)
 
virtual ~PositionAllocator()
 
void SetZ(Ptr< RandomVariableStream > z)
Set the random variable stream object that generates z-positions. 
 
double GetDeltaY(void) const 
 
enum LayoutType GetLayoutType(void) const 
 
virtual Vector GetNext(void) const 
 
std::vector< Vector > m_positions
vector of positions 
 
Ptr< RandomVariableStream > m_rho
pointer to rho's random variable stream 
 
void SetMinY(double yMin)
 
static TypeId GetTypeId(void)
Register this type with the TypeId system. 
 
virtual ~RandomBoxPositionAllocator()
 
double GetDeltaX(void) const 
 
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
 
double m_deltaX
x interval between two consecutive x positions 
 
static TypeId GetTypeId(void)
Register this type with the TypeId system. 
 
std::vector< Vector >::const_iterator m_current
vector iterator 
 
void SetRho(Ptr< RandomVariableStream > rho)
Set the random variable that generates position angle. 
 
virtual Vector GetNext(void) const 
 
In row-first mode, positions are allocated on the first row until N positions have been allocated...
 
double m_deltaY
y interval between two consecutive y positions 
 
virtual Vector GetNext(void) const 
 
double m_xMin
minimum boundary on x positions 
 
static TypeId GetTypeId(void)
Register this type with the TypeId system. 
 
void SetDeltaY(double deltaY)
 
double m_x
x coordinate of center of disc 
 
uint32_t m_n
number of positions to allocate on each row or column 
 
Ptr< RandomVariableStream > m_x
pointer to x's random variable stream 
 
void SetY(Ptr< RandomVariableStream > y)
Set the random variable stream object that generates y-positions. 
 
virtual ~RandomRectanglePositionAllocator()
 
Allocate positions on a rectangular 2d grid. 
 
double m_yMin
minimum boundary on y positions 
 
void SetTheta(Ptr< RandomVariableStream > theta)
Set the random variable that generates position radius. 
 
Allocate positions from a deterministic list specified by the user. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
virtual Vector GetNext(void) const 
 
void SetY(Ptr< RandomVariableStream > y)
Set the random variable stream object that generates y-positions. 
 
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
 
RandomDiscPositionAllocator()
 
static TypeId GetTypeId(void)
Register this type with the TypeId system. 
 
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
 
RandomRectanglePositionAllocator()
 
enum LayoutType m_layoutType
currently selected layout type 
 
static TypeId GetTypeId(void)
Register this type with the TypeId system. 
 
double m_y
y coordinate of center of disc 
 
Allocate random positions within a rectangle according to a pair of random variables. 
 
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
 
void Add(Vector v)
Add a position to the list of positions. 
 
void SetLayoutType(enum LayoutType layoutType)
 
virtual Vector GetNext(void) const 
 
uint32_t GetN(void) const 
 
void SetX(Ptr< RandomVariableStream > x)
Set the random variable stream object that generates x-positions. 
 
void SetX(Ptr< RandomVariableStream > x)
Set the random variable stream object that generates x-positions. 
 
Allocate random positions within a 3D box according to a set of three random variables. 
 
RandomBoxPositionAllocator()
 
A base class which provides memory management and object aggregation. 
 
In column-first mode, positions are allocated on the first column until N positions have been allocat...
 
a unique identifier for an interface. 
 
Allocate random positions within a disc according to a given distribution for the polar coordinates o...
 
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
 
virtual ~RandomDiscPositionAllocator()
 
Ptr< RandomVariableStream > m_z
pointer to z's random variable stream 
 
double GetMinX(void) const 
 
Ptr< RandomVariableStream > m_x
pointer to x's random variable stream 
 
Allocate a set of positions. 
 
virtual int64_t AssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model...