jyngem
August 21st, 2004, 05:51 AM
Hola!
Lets say we have a circle which is to be filled with (point-)nodes of some kind. The distances between them will be calculated so that each node knows it's placement in relation to any other node. These nodes is going to connect to each other in a certain way: the probability for connection between two nodes increases the nearer they are, and the amount of connections per node has a random set maximum (varying for each node). It is also of importance that the field (circle) has a direction which indicate which way the data flow. If sorted along the x axis, node1.x < node2.x implies that node1 will output to node2 which in turn calculates something and submits the result as output rightward. Each node must have at least one input and ditto output (two exceptions, but it is not essential). This has a strong resemblance to function trees, in fact it is one.
Now, there isn't really a maximum number of connections per node, it's rather a probability of connection. A node picks a second with prob decreasing with distance, asks itself "permission" to connect with a prob decreasing with the amount of already connected nodes (the prob defines the "maximum" in a way), and finally it must also ask the other node for permission to connect in the same manner.
There will be hundreds of thousands of these cells, so it's crucial to keep a good design, i guess.
Do you have any suggestions? I mean, anything at all is appreceated!
Due to the probabilistic nature; should i implement a recursive algorithm, or would it be best to have a controlclass connect the nodes? or mayby something else..
Thanx ;)
Lets say we have a circle which is to be filled with (point-)nodes of some kind. The distances between them will be calculated so that each node knows it's placement in relation to any other node. These nodes is going to connect to each other in a certain way: the probability for connection between two nodes increases the nearer they are, and the amount of connections per node has a random set maximum (varying for each node). It is also of importance that the field (circle) has a direction which indicate which way the data flow. If sorted along the x axis, node1.x < node2.x implies that node1 will output to node2 which in turn calculates something and submits the result as output rightward. Each node must have at least one input and ditto output (two exceptions, but it is not essential). This has a strong resemblance to function trees, in fact it is one.
Now, there isn't really a maximum number of connections per node, it's rather a probability of connection. A node picks a second with prob decreasing with distance, asks itself "permission" to connect with a prob decreasing with the amount of already connected nodes (the prob defines the "maximum" in a way), and finally it must also ask the other node for permission to connect in the same manner.
There will be hundreds of thousands of these cells, so it's crucial to keep a good design, i guess.
Do you have any suggestions? I mean, anything at all is appreceated!
Due to the probabilistic nature; should i implement a recursive algorithm, or would it be best to have a controlclass connect the nodes? or mayby something else..
Thanx ;)