![]() |
Smalltalk/X WebserverDocumentation of class 'GeometricSeries': |
|
|
Class: GeometricSeriesInheritance:Object | +--Collection | +--SequenceableCollection | +--ReadOnlySequenceableCollection | +--GeometricSeries
Description:Much like intervals (which have a constant difference between elements), these have a constant factor between them. GeometricSeries represent a collection (or range) of values specified by a startValue, an endValue and a *factor*. Like with intervals, the elements are computed, not stored. For example, the GeometricSeries (1 to:100 byFactor:2) contains the elements (1 2 4 8 16 32 64). and GeometricSeries (1 to:(1/100) byFactor:(1/2)) contains the elements (1 1/2 1/4 1/8 1/16 1/32 1/64). examples: (1 to:100 byFactor:2) do:[:i | Transcript showCR:i] (1 to:100 byFactor:1.1) do:[:i | Transcript showCR:i] (1 to:100 byFactor:2) asArray (1 to:128 byFactor:2) asArray (128 to:2 byFactor:(1/2)) asArray (1 to:128 byFactor:2) sum (1 to:128 byFactor:2) asArray sum Class protocol:instance creation
Instance protocol:enumerating
|
|
|
ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 04 Aug 2025 16:47:14 GMT
|