From: Andy Little (andy_at_[hidden])
Date: 2006-06-14 14:58:28
"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!:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk