Mesh Data Structure

Do you know of any data structures out there that resemble a mesh? I kind of imagine a node that can have a dynamic/unlimited amount of child nodes.
I have a visual follow the link.

http://sing.stanford.edu/gnawali/ctp/vinelab/topolog/topo.gif
This small source is where my brain is taking me. Basically two singly linked lists. It's not logically how I would imagine a mesh structure. I was hoping that the node struct would be more than a singly linked list, "node *nxt" could be replaced with something that logically does what the connection SLL will do.

1
2
3
4
5
6
7
8
9
10
11
12
		struct node
		{ 
			string logicalName;
			node *nxt;
		}*startPtr;

		struct connection
		{
			node *node1;
			node *node2;
			connection *nxt;
		}*connStartPtr;
Last edited on
lol is my idea too off the wall?
I just finished a shortest path assignment and used structures which sounds similar to what your looking for. Create your node struct but rather than a pointer to an adjacent node have each node contain a list of adjacent nodes.
yes this is what I am looking for! not just adjacent though, it can be unlimited! how did you accomplish this?
Topic archived. No new replies allowed.