GeometricSeries.st
changeset 4453 e3e421183576
parent 3739 89ee5376197c
child 5058 6f3b933cae66
equal deleted inserted replaced
4452:9b6b7249be74 4453:e3e421183576
    41     Much like intervals (which have a constant difference between elements), 
    41     Much like intervals (which have a constant difference between elements), 
    42     these have a constant factor between them.
    42     these have a constant factor between them.
    43     GeometricSeries represent a collection (or range) of values specified by
    43     GeometricSeries represent a collection (or range) of values specified by
    44     a startValue, an endValue and a *factor*. 
    44     a startValue, an endValue and a *factor*. 
    45     Like with intervals, the elements are computed, not stored.
    45     Like with intervals, the elements are computed, not stored.
    46     For example, the GeometricSeries (1 to:100 byFactor:2) contains the elements 
    46     For example, 
    47     (1 2 4 8 16 32 64).
    47         the GeometricSeries (1 to:100 byFactor:2) contains the elements (1 2 4 8 16 32 64).
       
    48         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).
    48 
    49 
    49     examples:
    50     examples:
    50 
    51 
    51         (1 to:100 byFactor:2) do:[:i | Transcript showCR:i]
    52         (1 to:100 byFactor:2) do:[:i | Transcript showCR:i]
    52         (1 to:100 byFactor:1.1) do:[:i | Transcript showCR:i]
    53         (1 to:100 byFactor:1.1) do:[:i | Transcript showCR:i]