Interface InfiniteSeries<T>

All Known Implementing Classes:
GeometricSeries, HarmonicSeries, PowerSeries

public interface InfiniteSeries<T>
Represents an infinite series.

An infinite series is the sum of an infinite sequence of terms: S = Σ a(k), k=0..∞

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines if this series is convergent.
    Returns the limit of the series if convergent.
    partialSum(int n)
    Computes the partial sum of the first n terms.
    term(int k)
    Returns the k-th term of this series.
  • Method Details

    • partialSum

      T partialSum(int n)
      Computes the partial sum of the first n terms.

      S_n = Σ a(k), k=0..n

      Parameters:
      n - the number of terms to sum (n ≥ 0)
      Returns:
      the partial sum S_n
    • isConvergent

      boolean isConvergent()
      Determines if this series is convergent.

      A series converges if lim(n→∞) S_n exists and is finite.

      Returns:
      true if convergent, false if divergent
    • limit

      T limit()
      Returns the limit of the series if convergent.

      L = lim(n→∞) S_n

      Returns:
      the limit L
      Throws:
      ArithmeticException - if the series is divergent
    • term

      T term(int k)
      Returns the k-th term of this series.
      Parameters:
      k - the term index (k ≥ 0)
      Returns:
      the term a(k)