Boost logo

Boost :

From: Andreas Harnack (ah.boost.04_at_[hidden])
Date: 2007-03-15 07:25:37

Ben FrantzDale schrieb:
> Anyone interested in this should read up on affine spaces. Absolute
> temperature is an affine point; difference between affine points are
> vectors.The same goes for positions in space or time.

Hi Ben, interesting stuff, it just leaves one question to me:
How can you represent an affine point in a computer program? My
guess is: you can't. But you can implement vector spaces and you
can map an affine space to a vector space by choosing a basis,
i.e. an origin and a set of orthogonal unit vectors.

So, the basis is not a property of the affine space, but a
necessary vehicle to get an image of it you can deal with. The
choice you made will restrict you in one way, but also introduce
new concepts (like multiplying with a scalar), that might not
have a meaning in the original space.

On the other hand, each vector space is an affine space itself,
so one special representative of a more general affine space.
I'm not sure if the following is correct, but may be we can
define affinity as the whole of all possible representations. So
if you want to deal with it, you need to make your choice
explicit, be it by an additional type tag or by a variable.

Affine spaces and vector spaces are two different things that
live without each other, but affine spaces can not be
represented in programming without vector spaces or a similar
vehicle. Consequently, IMHO, vector space implementations should
be considered isolated from affinity and affinity should be
implemented in terms of and as extension to vector spaces. Note,
that numbers (including complex numbers), Cartesian coordinates,
physical units, etc. all form vector spaces and consequently
affine spaces, so however an implementation of affinity might
look like, it probably should consider all of them.


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