 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef NGRandomNetBuilder_h
20 #define NGRandomNetBuilder_h
64 void createNet(
int numNodes,
bool gridMode);
NGNet & myNet
The network to fill.
RandomDistributor< int > myNeighbourDistribution
The distribution of number of neighbours.
std::list< NGNode * > NGNodeList
A list of nodes (node pointers)
double myConnectivity
Probability of connecting to a existing node if possible.
void findPossibleOuterNodes(NGNode *node)
finds possible connections between Node and OuterNodes complying with restrictions
bool canConnect(NGNode *baseNode, NGNode *newNode)
Checks whether connecting the given two nodes complies with the set restrictions.
double myMinLinkAngle
Minimum angle allowed between two links.
double myMinDistance
Minimum distance allowed between two nodes.
A class that builds random network using an algorithm by Markus Hartinger.
bool checkAngles(NGNode *node)
Checks whether the angle of this node's connections are valid.
The class storing the generated network.
void removeOuterNode(NGNode *node)
Removes the given node from the list of outer nodes.
int myNumNodes
Number of nodes to be created.
bool createNewNode(NGNode *baseNode, bool gridMode)
Creates new random node.
double myMaxDistance
Maximum distance allowed between two nodes.
NGEdgeList myOuterLinks
The list of outer links.
std::list< NGEdge * > NGEdgeList
A list of edges (edge pointers)
void createNet(int numNodes, bool gridMode)
Builds a NGNet using the set values.
NGRandomNetBuilder & operator=(const NGRandomNetBuilder &)
Invalidated assignment operator.
int myNumTries
Number of tries to create a new node.
NGNodeList myOuterNodes
The list of outer nodes.
NGRandomNetBuilder(NGNet &net, double minAngle, double minDistance, double maxDistance, double connectivity, int numTries, const RandomDistributor< int > &neighborDist)
Constructor.
A netgen-representation of a node.