![]() |
SUMO - Simulation of Urban MObility
|
#include <NGRandomNetBuilder.h>
Public Member Functions | |
void | add (int numNeighbours, SUMOReal ratio) |
adds a neighbour item to list More... | |
int | num () |
Get random number of neighbours. More... | |
Private Attributes | |
std::map< int, SUMOReal > | myNeighbours |
A map from neighbor number to their probabilities. More... | |
Definition at line 46 of file NGRandomNetBuilder.h.
void TNeighbourDistribution::add | ( | int | numNeighbours, |
SUMOReal | ratio | ||
) |
adds a neighbour item to list
If NumNeighbours is already existing, the old ratio is overwritten
[in] | numNeighbours | The number of neighbors this item shall describe |
[in] | ratio | The probability of this number of neighbors |
Definition at line 52 of file NGRandomNetBuilder.cpp.
References myNeighbours.
Referenced by buildNetwork().
int TNeighbourDistribution::num | ( | ) |
Get random number of neighbours.
Definition at line 58 of file NGRandomNetBuilder.cpp.
References myNeighbours, RandHelper::rand(), and SUMOReal.
Referenced by NGRandomNetBuilder::createNewNode().
|
private |
A map from neighbor number to their probabilities.
Definition at line 69 of file NGRandomNetBuilder.h.