The Trunk: Collections-cmm.499.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-cmm.499.mcz

commits-2
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!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-cmm.499.mcz

douglas mcpherson
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 , [hidden email] 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!
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-cmm.499.mcz

Chris Muller-3
Yes.

On Tue, Jan 29, 2013 at 10:00 AM, Douglas McPherson <[hidden email]> wrote:

> 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 , [hidden email] 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!
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-cmm.499.mcz

Frank Shearar-3
In reply to this post by commits-2
On 29 January 2013 02:19,  <[hidden email]> 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!

I just noticed that CI says you're wrong:
http://build.squeak.org/job/SqueakTrunk/lastBuild/testReport/junit/CollectionsTests.Sequenceable/FloatCollectionTest/testInternalArray/

Regressions:
FloatCollectionTest>>testInternalArray
FloatCollectionTest(ClassTestCase)>>testUnCategorizedMethods

(Well, I say "you're wrong" but this is just the most recent commit to
FloatCollection. You might be exposing a deficiency in the tests.)

frank