21 #ifndef BUILDING_POSITION_ALLOCATOR_H
22 #define BUILDING_POSITION_ALLOCATOR_H
25 #include <ns3/position-allocator.h>
26 #include <ns3/node-container.h>
27 #include "ns3/random-variable-stream.h"
32 class UniformRandomVariable;
49 virtual Vector
GetNext (
void)
const;
93 virtual Vector
GetNext (
void)
const;
144 virtual Vector
GetNext (
void)
const;
188 virtual Vector
GetNext (
void)
const;
233 virtual Vector
GetNext (
void)
const;
Generate a random position uniformly distributed in the volume of a chosen room inside a chosen build...
Ptr< UniformRandomVariable > m_rand
Provides uniform random variables.
FixedRoomPositionAllocator(uint32_t x, uint32_t y, uint32_t z, Ptr< Building > b)
int64_t AssignStreams(int64_t)
Assign a fixed random variable stream number to the random variables used by this model.
static TypeId GetTypeId(void)
virtual Vector GetNext(void) const
keep track of a set of node pointers.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
allocate outdoor positions
void SetY(Ptr< RandomVariableStream > y)
Set the random variable stream object that generates y-positions.
uint32_t m_maxAttempts
maximum number of attempts before giving up
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void SetX(Ptr< RandomVariableStream > x)
Set the random variable stream object that generates x-positions.
virtual Vector GetNext(void) const
Ptr< RandomVariableStream > m_x
pointer to x's random variable stream
Ptr< RandomVariableStream > m_z
pointer to z's random variable stream
Ptr< RandomVariableStream > m_y
pointer to y's random variable stream
OutdoorPositionAllocator()
void SetZ(Ptr< RandomVariableStream > z)
Set the random variable stream object that generates z-positions.
static TypeId GetTypeId(void)
Allocate a set of positions.
Allocate each position by randomly choosing a building from the list of all buildings,...
static TypeId GetTypeId(void)
Ptr< UniformRandomVariable > m_rand
Provides uniform random variables.
virtual Vector GetNext(void) const
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
std::vector< Ptr< Building > > m_buildingListWithoutReplacement
RandomBuildingPositionAllocator()
Allocate each position by randomly choosing a room from the list of all buildings,...
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
RandomRoomPositionAllocator()
std::vector< RoomInfo > m_roomListWithoutReplacement
Ptr< UniformRandomVariable > m_rand
Provides uniform random variables.
static TypeId GetTypeId(void)
virtual Vector GetNext(void) const
Walks a given NodeContainer sequentially, and for each node allocate a new position randomly in the s...
int64_t AssignStreams(int64_t)
Assign a fixed random variable stream number to the random variables used by this model.
SameRoomPositionAllocator()
Ptr< UniformRandomVariable > m_rand
Provides uniform random variables.
virtual Vector GetNext(void) const
NodeContainer::Iterator m_nodeIt
static TypeId GetTypeId(void)
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.