|
WebCab Bonds v2.01 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--webcab.lib.finance.interest.Developer
Offers methods for the evaluation of arithmetic and geometric progressions.
| Constructor Summary | |
Developer()
Creates a new instance. |
|
| Method Summary | |
double |
sumArithmeticSeries(double firstTerm,
double commonDifference,
int numberOfTerms)
Returns the sum of a finite arithmetic series. |
double |
sumFiniteGeometricSeries(double firstTerm,
double commonRatio,
int numberOfTerms)
Returns the sum of a finite geometric series. |
double |
sumInfiniteGeometricSeries(double firstTerm,
double commonRatio)
Returns the sum of an infinite geometric series. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Developer()
| Method Detail |
public double sumArithmeticSeries(double firstTerm,
double commonDifference,
int numberOfTerms)
firstTerm - the first term of the seriescommonDifference - the common difference between the terms of the arithmetic progressionnumberOfTerms - the number of terms in the series
public double sumFiniteGeometricSeries(double firstTerm,
double commonRatio,
int numberOfTerms)
firstTerm - the first term of the geometric seriescommonRatio - the common ratio of the terms within the seriesnumberOfTerms - the number of terms which the series contains
sumInfiniteGeometricSeries - In order to find the value of the sum of
a infinite geometric series.
public double sumInfiniteGeometricSeries(double firstTerm,
double commonRatio)
An infinite geometric series is an indefinite sum of terms, namely:
S = a + a * R2 + a * R3 + ...
where '...' denotes that the sum extends in a similar fashion indefinitely.
If the modulus (i.e. absolute value) of the common ratio (i.e. R above)
is greater or equal to one then the series will diverge. The series can diverge in one
of two ways:
a = 1, and R = -1;
then the generated series will not converge but will oscillate between 1 and 0. Note, that
this type of divergence can only take place when the modulus of R is 1.
firstTerm - the first term of the geometric seriescommonRatio - the common ratio of the terms within the series
sumFiniteGeometricSeries - In order to find the value of the sum of
a finite number of terms of a geometric series.
|
WebCab Bonds v2.01 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||