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
Abstract class for generating functions for coefficients of power series. Was
an interface, now this class handles the caching itself.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionCache for already computed coefficients. -
Constructor Summary
ConstructorsConstructorDescriptionPublic no arguments constructor.Coefficients
(HashMap<Integer, C> cache) Public constructor with pre-filled cache. -
Method Summary
-
Field Details
-
coeffCache
Cache for already computed coefficients.
-
-
Constructor Details
-
Coefficients
public Coefficients()Public no arguments constructor. -
Coefficients
Public constructor with pre-filled cache.- Parameters:
cache
- pre-filled coefficient cache.
-
-
Method Details
-
get
Get cached coefficient or generate coefficient.- Parameters:
index
- of requested coefficient.- Returns:
- coefficient at index.
-
generate
Generate coefficient.- Parameters:
index
- of requested coefficient.- Returns:
- coefficient at index.
-