[squeak-dev] The Trunk: Collections-cmm.499.mcz

Douglas McPherson djm1329 at san.rr.com
Tue Jan 29 16:00:59 UTC 2013


If I understand correctly, another difference between a FloatCollection and an OrderedCollection of Floats, besides the noted efficiency due to the use of FloatArray, is that a FloatCollection will store IEEE 32-bit single precision floats, while an OrderedCollection of Floats will store double precision floats. Is this correct? This is analogous to the current difference between an Array of Floats and a FloatArray. 


On Jan 29, 2013, at 02:19 , commits at source.squeak.org wrote:

> Chris Muller uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-cmm.499.mcz
> 
> ==================== Summary ====================
> 
> Name: Collections-cmm.499
> Author: cmm
> Time: 28 January 2013, 8:19:08.858 pm
> UUID: 9af9bd27-3342-4203-88e5-22c85c57d5ae
> Ancestors: Collections-bf.498
> 
> FloatCollection inherits the convenient add:/remove: API of OrderedCollection, but using an internal FloatArray for better efficiency.
> 
> =============== Diff against Collections-bf.498 ===============
> 
> Item was added:
> + OrderedCollection subclass: #FloatCollection
> + 	instanceVariableNames: ''
> + 	classVariableNames: ''
> + 	poolDictionaries: ''
> + 	category: 'Collections-Sequenceable'!
> + 
> + !FloatCollection commentStamp: 'cmm 1/28/2013 19:49' prior: 0!
> + FloatCollctions store 32bit IEEE floating point numbers.!
> 
> Item was added:
> + ----- Method: FloatCollection class>>arrayType (in category 'overriding') -----
> + arrayType
> + 	^ FloatArray!
> 
> Item was added:
> + ----- Method: FloatCollection>>addLast: (in category 'as yet unclassified') -----
> + addLast: aFloat
> + 	aFloat isNumber ifFalse: [ self error: 'This collection can only store Floats.' ].
> + 	^ super addLast: aFloat!
> 
> 



More information about the Squeak-dev mailing list