Package edu.jas.ps

Class Coefficients<C extends RingElem<C>>

java.lang.Object
edu.jas.ps.Coefficients<C>
Type Parameters:
C - ring element type
All Implemented Interfaces:
Serializable

public abstract class Coefficients<C extends RingElem<C>> extends Object implements Serializable
Abstract class for generating functions for coefficients of power series. Was an interface, now this class handles the caching itself.
See Also:
  • Field Details

  • Constructor Details

    • Coefficients

      public Coefficients()
      Public no arguments constructor.
    • Coefficients

      public Coefficients(HashMap<Integer,C> cache)
      Public constructor with pre-filled cache.
      Parameters:
      cache - pre-filled coefficient cache.
  • Method Details

    • get

      public C get(int index)
      Get cached coefficient or generate coefficient.
      Parameters:
      index - of requested coefficient.
      Returns:
      coefficient at index.
    • generate

      protected abstract C generate(int index)
      Generate coefficient.
      Parameters:
      index - of requested coefficient.
      Returns:
      coefficient at index.