Boost logo

Boost :

Subject: Re: [boost] Geometry and spatial indexes, my opinion
From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2008-10-08 17:53:14

On Wed, Oct 8, 2008 at 5:33 PM, Patrick Mihelich
<patrick.mihelich_at_[hidden]> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at