Sparse Multi-Dimensional Data Representation
I'm working on a cardiac simulation tool that uses 4-dimensional data, i.e. several (3-30) variables at locations in 3D space.

I'm now adding some tissue geometry which will leave over 2/3 of the points in the containing 3D box outside of the tissue to be simulated, so I need a way to efficiently store the active points and not the others.

Crucially, I need to be able to:

 - Iterate over all of the active points within a constrained 3D box (iterator, perhaps?)
 - Having accessed one point, find its orthogonal neighbours (x,y,z) +/- 1.

That's probably more than one question! My main concern is how to efficiently represent the sparse data. 

I'm using C.

Thanks in advance for your help.

Ross
Sparse Multi-Dimensional Data Representation
===

I'm working on a cardiac simulation tool that uses 4-dimensional data, i.e. several (3-30) variables at locations in 3D space.

I'm now adding some tissue geometry which will leave over 2/3 of the points in the containing 3D box outside of the tissue to be simulated, so I need a way to efficiently store the active points and not the others.

Crucially, I need to be able to:

 - Iterate over all of the active points within a constrained 3D box (iterator, perhaps?)
 - Having accessed one point, find its orthogonal neighbours (x,y,z) +/- 1.

That's probably more than one question! My main concern is how to efficiently represent the sparse data. 

I'm using C.

Thanks in advance for your help.

Ross