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;
Ptr< UniformRandomVariable > m_rand
Provides uniform random variables.
FixedRoomPositionAllocator(uint32_t x, uint32_t y, uint32_t z, Ptr< Building > b)
Ptr< RandomVariableStream > m_z
pointer to z's random variable stream
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
virtual Vector GetNext(void) const
static TypeId GetTypeId(void)
Walks a given NodeContainer sequentially, and for each node allocate a new position randomly in the s...
virtual Vector GetNext(void) const
Ptr< RandomVariableStream > m_y
pointer to y's random variable stream
void SetZ(Ptr< RandomVariableStream > z)
Set the random variable stream object that generates z-positions.
RandomBuildingPositionAllocator()
static TypeId GetTypeId(void)
Generate a random position uniformly distributed in the volume of a chosen room inside a chosen build...
Allocate each position by randomly choosing a building from the list of all buildings, and then randomly choosing a position inside the building.
int64_t AssignStreams(int64_t)
Assign a fixed random variable stream number to the random variables used by this model...
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< UniformRandomVariable > m_rand
Provides uniform random variables.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
Ptr< UniformRandomVariable > m_rand
Provides uniform random variables.
Ptr< RandomVariableStream > m_x
pointer to x's random variable stream
SameRoomPositionAllocator()
void SetY(Ptr< RandomVariableStream > y)
Set the random variable stream object that generates y-positions.
Allocate each position by randomly choosing a room from the list of all buildings, and then randomly choosing a position inside the room.
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...
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Ptr< UniformRandomVariable > m_rand
Provides uniform random variables.
std::vector< Ptr< Building > > m_buildingListWithoutReplacement
OutdoorPositionAllocator()
static TypeId GetTypeId(void)
allocate outdoor positions
virtual Vector GetNext(void) const
static TypeId GetTypeId(void)
static TypeId GetTypeId(void)
virtual Vector GetNext(void) const
NodeContainer::Iterator m_nodeIt
a unique identifier for an interface.
RandomRoomPositionAllocator()
int64_t AssignStreams(int64_t)
Assign a fixed random variable stream number to the random variables used by this model...
Allocate a set of positions.
std::vector< RoomInfo > m_roomListWithoutReplacement