Boost logo

Boost :

From: Geoffrey Irving (irving_at_[hidden])
Date: 2006-06-14 15:49:56

On Wed, Jun 14, 2006 at 07:58:28PM +0100, Andy Little wrote:
> "Janek Kozicki" wrote
> > Geoffrey Irving said: (by the date of Tue, 13 Jun 2006 09:30:39 -0700)
> >
> >> I would suggest that instead of trying to make an extremely general vector
> >> class, it'd be better to make an extremely specific vector class, together
> >> with an extremely general way to other vector classes.
> >>
> >> Specifically, you can make vector3 (or vector<3>, perhaps) a
> >> straightforward single unit Euclidean vector. It can have L2 norms and
> >> L^inf norms and cross products and all the operations that are undefined
> >> for vectors with components of different units. Then we could define a
> >> vector space variant of boost::operators to convert any tuple-like type
> >> into a vector space type.
> > PS: I like vector<3> , I think that Andy can't argue with this name :>
> I like it. and I agree that it would be vector<3,T>. It conflicts with (later
> in the discussion) suggestions of tuple like behaviour though, however I like
> vector<3,T> primarily because mathematically challenged souls such as myself
> find it easier to understand. IMO Simplicity is an important and sometimes
> underrated design feature. The 3 there gives a good indication of what to
> expect. IOW the vector<3,T> is "a straightforward single unit Euclidean vector"
> as described by Geoffrey Irving.
> BTW (O.T.) Geoffrey... I find this awesome. I could watch it all day!:


And not quite off-topic: making that would have been rather nastier without
being able to templatize over dimension. Debugging in 2d is a lifesaver.
Anything that makes that easier is good (vector<3,T> vs. vector3<T>).


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