edu.jas.ps
Class MultiVarCoefficients<C extends RingElem<C>>

java.lang.Object
  extended by edu.jas.ps.MultiVarCoefficients<C>
Type Parameters:
C - ring element type

public abstract class MultiVarCoefficients<C extends RingElem<C>>
extends java.lang.Object

Abstract class for generating functions for coefficients of multivariate power series. This class handles the caching itself.

Author:
Heinz Kredel

Field Summary
 java.util.HashMap<java.lang.Long,GenPolynomial<C>> coeffCache
          Cache for already computed coefficients.
 java.util.BitSet homCheck
          Indicator if all coefficients of a homogeneous degree have been constructed.
 GenPolynomialRing<C> pfac
          Ring factory for polynomials.
 java.util.HashSet<ExpVector> zeroCache
          Cache for known zero coefficients.
 
Constructor Summary
MultiVarCoefficients(GenPolynomialRing<C> pf)
          Public constructor.
MultiVarCoefficients(GenPolynomialRing<C> pf, java.util.BitSet hc)
          Public constructor with pre-filled caches.
MultiVarCoefficients(GenPolynomialRing<C> pf, java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache)
          Public with pre-filled coefficient cache.
MultiVarCoefficients(GenPolynomialRing<C> pf, java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache, java.util.BitSet hc)
          Public constructor with pre-filled caches.
MultiVarCoefficients(GenPolynomialRing<C> pf, java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache, java.util.HashSet<ExpVector> zeros)
          Public constructor with pre-filled caches.
MultiVarCoefficients(GenPolynomialRing<C> pf, java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache, java.util.HashSet<ExpVector> zeros, java.util.BitSet hc)
          Public constructor with pre-filled caches.
MultiVarCoefficients(MultiVarPowerSeriesRing<C> pf)
          Public constructor.
MultiVarCoefficients(MultiVarPowerSeriesRing<C> pf, java.util.BitSet hc)
          Public constructor with some pre-filled caches.
 
Method Summary
protected abstract  C generate(ExpVector index)
          Generate coefficient.
 C get(ExpVector index)
          Get cached coefficient or generate coefficient.
 GenPolynomial<C> getHomPart(long tdeg)
          Homogeneous part.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pfac

public final GenPolynomialRing<C extends RingElem<C>> pfac
Ring factory for polynomials.


coeffCache

public final java.util.HashMap<java.lang.Long,GenPolynomial<C extends RingElem<C>>> coeffCache
Cache for already computed coefficients.


homCheck

public final java.util.BitSet homCheck
Indicator if all coefficients of a homogeneous degree have been constructed.


zeroCache

public final java.util.HashSet<ExpVector> zeroCache
Cache for known zero coefficients. Required because zero coefficients are not stored in the polynomials.

Constructor Detail

MultiVarCoefficients

public MultiVarCoefficients(MultiVarPowerSeriesRing<C> pf)
Public constructor.

Parameters:
pf - multivariate power series ring factory.

MultiVarCoefficients

public MultiVarCoefficients(MultiVarPowerSeriesRing<C> pf,
                            java.util.BitSet hc)
Public constructor with some pre-filled caches.

Parameters:
pf - multivariate power series ring factory.
hc - pre-filled homogeneous check bit-set.

MultiVarCoefficients

public MultiVarCoefficients(GenPolynomialRing<C> pf)
Public constructor.

Parameters:
pf - polynomial ring factory.

MultiVarCoefficients

public MultiVarCoefficients(GenPolynomialRing<C> pf,
                            java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache)
Public with pre-filled coefficient cache.

Parameters:
pf - polynomial ring factory.
cache - pre-filled coefficient cache.

MultiVarCoefficients

public MultiVarCoefficients(GenPolynomialRing<C> pf,
                            java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache,
                            java.util.HashSet<ExpVector> zeros)
Public constructor with pre-filled caches.

Parameters:
pf - polynomial ring factory.
cache - pre-filled coefficient cache.
zeros - pre-filled zero coefficient cache.

MultiVarCoefficients

public MultiVarCoefficients(GenPolynomialRing<C> pf,
                            java.util.BitSet hc)
Public constructor with pre-filled caches.

Parameters:
pf - polynomial ring factory.
hc - pre-filled homogeneous check bit-set.

MultiVarCoefficients

public MultiVarCoefficients(GenPolynomialRing<C> pf,
                            java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache,
                            java.util.BitSet hc)
Public constructor with pre-filled caches.

Parameters:
pf - polynomial ring factory.
cache - pre-filled coefficient cache.
hc - pre-filled homogeneous check bit-set.

MultiVarCoefficients

public MultiVarCoefficients(GenPolynomialRing<C> pf,
                            java.util.HashMap<java.lang.Long,GenPolynomial<C>> cache,
                            java.util.HashSet<ExpVector> zeros,
                            java.util.BitSet hc)
Public constructor with pre-filled caches.

Parameters:
pf - polynomial ring factory.
cache - pre-filled coefficient cache.
zeros - pre-filled zero coefficient cache.
hc - pre-filled homogeneous check bit-set.
Method Detail

get

public C get(ExpVector index)
Get cached coefficient or generate coefficient.

Parameters:
index - of requested coefficient.
Returns:
coefficient at index.

getHomPart

public GenPolynomial<C> getHomPart(long tdeg)
Homogeneous part.

Parameters:
tdeg - requested degree.
Returns:
polynomial part of given degree.

generate

protected abstract C generate(ExpVector index)
Generate coefficient.

Parameters:
index - of requested coefficient.
Returns:
coefficient at index.