Affine transforms - matrix algebra
Pavel Safrata
pavel.safrata at oracle.com
Mon Jul 16 04:35:14 PDT 2012
Hello,
On 16.7.2012 13:17, Martin Desruisseaux wrote:
> Hello Pavel
>
> Thanks for the update. All the methods sound fine to me :-). There is
> some very minor observations:
>
> Le 16/07/12 13:00, Pavel Safrata a écrit :
>> public double get(int col, int row)
> Should the parameter order follows the convention in matrix indices,
> which is (row, column)?
Yes, just my "typo".
>
>> public double[] toArray(MatrixArrayType type)
>> // Transform.MatrixArrayType is an enum { MAT_2x3, MAT_3x4,
>> MAT_4x4 }
>> // Returns array of length 6, 12, 16, respectively
> Should we provide also a MAT_3x3 enum (array of length 9) for
> consistency with MAT_4x4?
Yes, I've come to that conclusion as well (see my other email) :-)
>
>> public double[] toArray(MatrixArrayType type, double[] array)
>> // Similar to the above, just uses the passed array if it is
>> big enough
> If this method accept null array, maybe we could omit
> toArray(MatrixArrayType type) in order to simplify a little bit the API?
I would keep both methods. It will make user code cleaner when there is
no array to pass in, which I think may happen quite often. Moreover
users are used to have both methods from java collections, so they might
miss it.
Thanks,
Pavel
>
> Martin
>
More information about the openjfx-dev
mailing list