
Boost : 
From: Andy Little (andy_at_[hidden])
Date: 20050602 15:56:38
"Deane Yang" <deane_yang_at_[hidden]> wrote in message
news:d7nich$msv$1_at_sea.gmane.org...
> Andy Little wrote:
>>
>> Ideally the two expressions should be equivalent:
>>
>> 2/3 *A +1/3 * B == A + (1/3)*(B  A) = (2 * A + B ) / 3 etc
>>
>> If no multiplication or addition is allowed on points, this is not the case.
>> (Welll.. its possible to work it at compile time, but I believe this is too
>> restrictive) The points implementation is getting in the way of the
>> expression. Expressions will fail for no good reason. OTOH These
>> calculations work correctly if A and B are 'positionvectors'.
>>
>
> What is the difference between a "point" and a "positionvector"?
I'm sure no expert on this but FWIW this is my understandoing:
A positionvector is a workaround because it is not possible to have adequate
C++ control of operations on points (in affine space), as previously explained.
A positionvector is a just a vector, where one makes the assumption that all
vectors are added to the Point (0,0) and any result is added to the Point (0,0)
(I believe addtion of Point(0,0) to another point is valid as well as
multiplication by 1. By suitable equation bending you can arrive to the above
result)
Therefore all vector ops are allowed.
regards
Andy Little
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk