public class CosCalculator extends SeriesCalculator
No argument checking or optimizations are done. This implementation is not intended to be called directly.
Modifier and Type | Field and Description |
---|---|
static CosCalculator |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateNextFactor()
Calculates the factor of the next term.
|
protected PowerIterator |
createPowerIterator(java.math.BigDecimal x,
java.math.MathContext mathContext)
Creates the
PowerIterator used for this series. |
protected BigRational |
getCurrentFactor()
Returns the factor of the highest term already calculated.
|
calculate, getFactor
public static final CosCalculator INSTANCE
protected BigRational getCurrentFactor()
SeriesCalculator
When called for the first time will return the factor of the first term (index 0).
After this call the method SeriesCalculator.calculateNextFactor()
will be called to prepare for the next term.
getCurrentFactor
in class SeriesCalculator
protected void calculateNextFactor()
SeriesCalculator
calculateNextFactor
in class SeriesCalculator
protected PowerIterator createPowerIterator(java.math.BigDecimal x, java.math.MathContext mathContext)
SeriesCalculator
PowerIterator
used for this series.createPowerIterator
in class SeriesCalculator
x
- the value xmathContext
- the MathContext
PowerIterator