|
SUMO - Simulation of Urban MObility
|
#include <NGRandomNetBuilder.h>
Public Member Functions | |
| void | add (int numNeighbours, SUMOReal ratio) throw () |
| adds a neighbour item to list | |
| int | num () throw () |
| Get random number of neighbours. | |
Private Attributes | |
| std::map< int, SUMOReal > | myNeighbours |
| A map from neighbor number to their probabilities. | |
Definition at line 43 of file NGRandomNetBuilder.h.
| void TNeighbourDistribution::add | ( | int | numNeighbours, |
| SUMOReal | ratio | ||
| ) | throw () |
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 49 of file NGRandomNetBuilder.cpp.
Referenced by buildNetwork().
| int TNeighbourDistribution::num | ( | ) | throw () |
Get random number of neighbours.
Definition at line 55 of file NGRandomNetBuilder.cpp.
References myNeighbours, RandHelper::rand(), and SUMOReal.
Referenced by NGRandomNetBuilder::createNewNode().
std::map<int, SUMOReal> TNeighbourDistribution::myNeighbours [private] |
A map from neighbor number to their probabilities.
Definition at line 66 of file NGRandomNetBuilder.h.
Referenced by num().