Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage 2d array in Smalltalk?

I have a list of point and have to do erosion/dilation operations. I need a kind of 2d-array but can't find how to do in VisualWorks (I know there is a Array2d class in Squeak, but I must use VW).

like image 543
Serty Oan Avatar asked Dec 23 '22 02:12

Serty Oan


1 Answers

Many Smalltalk implementation will have some kind of Matrix class, sometimes optimized, that will have methods such as #rowAt:columnAt: (or for brevity #at:at:).

In GNU Smalltalk this is in package DhbNumericalMethods. Right now it is not optimized though.

like image 64
Paolo Bonzini Avatar answered Jan 25 '23 19:01

Paolo Bonzini