I need to code a test platform to test a specific algorithm. It is assumed that the system will be determined by input and 3-dimensional - like a network on a chip, it has both node and link elements connecting them. Due to the sizes and connections between nodes, I had some difficulties in determining which data structures to use - a three-dimensional array, such as array [x] [y] [z], is difficult to treat as a pointer with flaws when adding links to connect nodes (leaves several holes with zero value in the structure). Binary search trees are difficult to implement since the type of grid. For this reason, I thought about creating a linked list where links are easier to implement. (the final testing platform should look something like below), where each link is also displayed on the map, as they contain communication schedules
01-------02-------03 | \ | \ | \ | 10----|--11----|--12 | | \ | | \ | | \ | | 19-|--|--20-|--|--21 04-------05-------06 | | | \ | | \| | | \| | | 13----|--14----|--15 | | | \| | | \| | | \| | | 22-|--|--23-|--|--24 07-------08-------09 | | \| | \| | \| | 16-------17-------18 | \| \| \| 25-------26-------27
Can any of you offer some help regarding what type of structure in C ++ is suitable for this kind of task. The finished program should be able to generate such a structure, taking into account the size parameters x, y and z.
currently, a rough outline should look like this:
>class Node{ > public: > Link* north; > Link* east; > Link* south; > Link* west; > Link* up; > Link* down; >
EDIT 01/22/2013
and, first of all, as its test platform simulating a three-dimensional network on a multiprocessor system of microcircuits. The task that this system must complete is to enable testing of certain algorithms to help map tasks on these nodes (where each node is connected to the processor core). In light of this, memory consumption may not be a problem, since it is intended only for testing, as I said, therefore it is necessary that the system has both nodes and links, since none of them can be used by two events at the same time (link-by-link blocks all other messages, etc., which is why I wrote that the class type node / link will have a scheduler in it)
source share