10-25-2009 09:20 PM - edited 10-25-2009 09:21 PM
Darin
That is a nice piece of code. Thanks for providing some coding ideas. I implemented this in the spherical tessellation code, but I found that it got pretty bogged down. It may well be my coding rather that the name attribute search which is causing the problem though.
So I wrote the attached code, which is similar to the Yale sparse matrix. (http://en.wikipedia.org/wiki/Sparse_matrix). This is not the cleanest code I've ever written and to allow for say double precision values one might want to use a 2D pointer array and a 1-D value matrix.
This runs Sphere Tessellations relatively rapidly, but not with the efficiency reflected in the code described here. (http://student.ulb.ac.be/~claugero/sphere/index.html) For instance, my code takes 41 sec to run 6 iterations, the C code takes 0.5 sec. I am sure this has more with the way that I wrote the rest of the code than the sparse matrix code.
Original implementation of tessellation algorithm (posted above) is faster than than posted below, but I cannot run more than 4 iterations because the full matrix is too large to run.
Perhaps it's not too much to hope that the good folks at NI will include sparse matrix VIs in subsequent LabVIEW versions.
Jeremy