Input : Maximum dimensions of an area (Xmax, Ymax), Number of nodes N, and distance D.
Program function
1- Each node has id.
2 - Distribute the nodes in the area randomly, such as each node has a position (x , y)
3 – Each node is considered a neighbor to another node, if the distance between them is less than D.
4 - A node degree is the number of its neighbor nodes. Average degree is the total number of neighbors divided by the nodes number N.
Output
1-The average node degree
2-The degree of any node selected by the user.
3-The minimum degree
4-The maximum degree
this is what i understand:
1. use time to generate random point => coordinate = rand() % (x/y + 1)
then i dunno how to start... pls help