8 Oct 23:53
Re: Geometry and spatial indexes, my opinion
Michael Fawcett <michael.fawcett <at> gmail.com>
2008-10-08 21:53:14 GMT
2008-10-08 21:53:14 GMT
On Wed, Oct 8, 2008 at 5:33 PM, Patrick Mihelich <patrick.mihelich <at> gmail.com> wrote: > > Cool, compile time indexing is very useful. But, I'm not sure I see the need > for using tuples. I can't offhand think of a use case where the dimensions > are of heterogeneous type, so wouldn't a simple array work? Sure a simple array should work. The point of a generic library is that a simple array would work, so would a tuple, and so would your custom point class. As for the heterogeneous types, think of huge (GBs worth) digital elevation models in meter units where altitude is in a range from 0 - 20,000m. In that case, my point type would be something like vector3<int, short, int> instead of a vector3<int>. With a 1024x1024 file, that would result in a savings of only 2MB of memory, but extrapolate that out to a 16384x16384 file, and the savings is 500MB. --Michael Fawcett _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed