QuadraticSequencepublic class QuadraticSequence extends AbstractList An immutable List representing the sequence ax^2 + bx + c |
Fields Summary |
---|
final int | size | final double | a | final double | b | final double | c |
Constructors Summary |
---|
QuadraticSequence(double a, double b, double c, int size)
this.a = a; this.b = b; this.c = c; this.size = size;
|
Methods Summary |
---|
public java.lang.Double | get(int index)
if (index<0 || index>=size) throw new ArrayIndexOutOfBoundsException();
return a*index*index + b*index + c;
| public int | size() return size;
|
|