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, getFactorpublic static final CosCalculator INSTANCE
protected BigRational getCurrentFactor()
SeriesCalculatorWhen 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 SeriesCalculatorprotected void calculateNextFactor()
SeriesCalculatorcalculateNextFactor in class SeriesCalculatorprotected PowerIterator createPowerIterator(java.math.BigDecimal x, java.math.MathContext mathContext)
SeriesCalculatorPowerIterator used for this series.createPowerIterator in class SeriesCalculatorx - the value xmathContext - the MathContextPowerIterator