public class GeometricProgression extends Progression
| Modifier and Type | Field and Description |
|---|---|
protected long |
base |
current| Constructor and Description |
|---|
GeometricProgression()
Constructs progression 1, 2, 4, 8, 16, ...
|
GeometricProgression(long b)
Constructs progression 1, b, b^2, b^3, b^4, ...
|
GeometricProgression(long b,
long start)
Constructs geometric progression with arbitrary base and start.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
advance()
Multiplies the current value by the geometric base.
|
nextValue, printProgressionpublic GeometricProgression()
public GeometricProgression(long b)
public GeometricProgression(long b,
long start)
protected void advance()
advance in class Progression