Class GeometricSeries

java.lang.Object
org.episteme.core.mathematics.sequences.GeometricSeries
All Implemented Interfaces:
InfiniteSequence<Real>, Sequence<Real>

public class GeometricSeries extends Object implements InfiniteSequence<Real>
Represents a Geometric series: a + ar + ar^2 + ar^3 + ...
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • GeometricSeries

      public GeometricSeries(Real a, Real r)
  • Method Details

    • get

      public Real get(int index)
      Description copied from interface: Sequence
      Returns the element at the specified index (0-based).
      Specified by:
      get in interface Sequence<Real>
      Parameters:
      index - the index of the element to retrieve
      Returns:
      the element at the specified index
    • isConvergent

      public boolean isConvergent()
      Description copied from interface: InfiniteSequence
      Checks if the sequence converges to a limit.
      Specified by:
      isConvergent in interface InfiniteSequence<Real>
      Returns:
      true if the sequence converges, false otherwise
    • limit

      public Real limit()
      Description copied from interface: InfiniteSequence
      Returns the limit of the sequence if it converges.
      Specified by:
      limit in interface InfiniteSequence<Real>
      Returns:
      the limit of the sequence