Interface InfiniteSequence<T>
- All Superinterfaces:
Sequence<T>
- All Known Implementing Classes:
FibonacciSequence, GeometricSeries, HarmonicSeries, PowerSeries
Represents an infinite mathematical sequence.
Infinite sequences may or may not converge to a limit.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the sequence converges to a limit.limit()Returns the limit of the sequence if it converges.
-
Method Details
-
isConvergent
boolean isConvergent()Checks if the sequence converges to a limit.- Returns:
- true if the sequence converges, false otherwise
-
limit
T limit()Returns the limit of the sequence if it converges.- Returns:
- the limit of the sequence
- Throws:
ArithmeticException- if the sequence does not converge
-