[Cuis] Array2D newSize:

Phil (list) pbpublist at gmail.com
Wed Jul 15 19:49:57 CDT 2015


On Wed, 2015-07-15 at 15:23 -0700, Dan Norton wrote:
> Maybe it's my dyslexia, but isn't this backward?
> 
> "Array2D newSize: 2 at 3" produces an array with 3 rows and 2 columns:
> | nil nil |
> | nil nil |
> | nil nil |
> 
> IMO it should be:
> | nil nil nil |
> | nil nil nil |
> 
> For example, in Squeak, "MatrixTransform2x3 identity" produces:
> MatrixTransform2x3(
> 1.0	0.0	0.0
> 0.0	1.0	0.0
> )
> 
> Please correct me if I'm wrong.
> 
> OK, you're wrong - as long as there is a subclass called Matrix in
> 
> LinearAlgebra.pck.st
> 
> Use Matrix instead of Array2d.
> 

Glad that solved your problem but, ouch... that class is uncomfortably
close in name and function to the 3DTransform package I'm using for
OpenGL.  Juan: would you be open to using an extended version of my
classes so that we don't run into namespace conflicts?

One advantage that the Matrix* and Vector* classes I'm using have is
that they are mapped to native types which makes for transparent and
easy use on a GPU (which aren't just for graphics anymore BTW.  Just add
compute shaders and you have the fastest matrix math you've ever seen,
assuming you've got medium or larger sets of data)

> (whew)
> 
> 
> 
> 
> --
> View this message in context: http://forum.world.st/Array2D-newSize-tp4837696p4837720.html
> Sent from the Cuis Smalltalk mailing list archive at Nabble.com.
> 
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org






More information about the Cuis mailing list