Affine transforms - matrix algebra

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Wed Jul 11 08:39:51 PDT 2012

```Le 11/07/12 16:57, Pavel Safrata a écrit :
> If we are going this way, shouldn't we do also this?
> * Rename 'concatenate' as 'prepend'
> * Rename 'preConcatenate' as 'append'
Yes, I think it would bring more uniformity in the method naming.

> * Rename 'getConcatenation' as .. well .. 'getPrependage' :-)
I missed that method... What would its function? Or are we are talking
about something like a 'getTransformCoefficients()' method?

> As a black-box transformation composing this makes sense. As a matrix
> algebra, it may be also confusing: tA.append(tB) means matrix
> multiplication 'B x A', does it sound good? Maybe yes, I'm not sure.
> Anyway, so far the best proposal I think.
Yes, I realize that a risk of confusion may exist. We may need to stress
out in the javadoc that "append" is not "multiply". Indeed, if the
"append" method was defined in the parent Transform class and if that
parent was the base class of generic transformations (not just linear
transformations), then the "append" method would actually not be
implemented as a matrix multiplication except in the special case of
linear transformations.

>> I don't have experience in this area. But naively, it seems to we
>> that it would be better to be notified only after the full matrix has
>> been updated...
> Yes, I would also pick this option. It's just that it would mean
> writing much more complicated (and a bit less effective) code so the
> question is whether or not you think it is important.
I don't have a use case where I would like to listen to individual
coefficient changes. It seems to me that I would rather listen to
whatever property contains the Transform object as a whole.
Consequently, I don't think that the atomicity of Affine operations
would have much incidence (assuming that there is some way - other than
listening to individual coefficients - to be informed that the matrix as
a whole has changed).

Martin

```