org.spaceroots.mantissa.algebra
Class CoefficientsGenerator

java.lang.Object
  extended byorg.spaceroots.mantissa.algebra.CoefficientsGenerator

public abstract class CoefficientsGenerator
extends Object


Constructor Summary
protected CoefficientsGenerator(RationalNumber a00, RationalNumber a01, RationalNumber a11)
          Build a generator with coefficients for two polynomials.
 
Method Summary
 RationalNumber[] getCoefficients(int degree)
          Get the coefficients array for a given degree.
protected abstract  void setRecurrenceCoefficients(int k)
          Set the recurrence coefficients.
protected  void setRecurrenceCoefficients(RationalNumber b2k, RationalNumber b3k, RationalNumber b4k)
          Set the recurrence coefficients.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoefficientsGenerator

protected CoefficientsGenerator(RationalNumber a00,
                                RationalNumber a01,
                                RationalNumber a11)
Build a generator with coefficients for two polynomials.

The first polynomial must be a degree 0 polynomial P0(X)=a0,0 and the second polynomial must be a degree 1 polynomial P1(X)=a0,1 +a1,1X

Parameters:
a00 - constant term for the degree 0 polynomial
a01 - constant term for the degree 1 polynomial
a11 - X term for the degree 1 polynomial
Method Detail

setRecurrenceCoefficients

protected void setRecurrenceCoefficients(RationalNumber b2k,
                                         RationalNumber b3k,
                                         RationalNumber b4k)
Set the recurrence coefficients.

Parameters:
b2k - b2,k coefficient (b2,k = a2,k / a1,k)
b3k - b3,k coefficient (b3,k = a3,k / a1,k)
b4k - b4,k coefficient (b4,k = a4,k / a1,k)

setRecurrenceCoefficients

protected abstract void setRecurrenceCoefficients(int k)
Set the recurrence coefficients. The recurrence relation is
a1,k Ok+1(X) =(a2,k + a3,k X) Ok(X) - a4,k Ok-1(X)
the method must call setRecurrenceCoefficients(RationalNumber, RationalNumber, RationalNumber) to provide the coefficients

Parameters:
k - index of the current step

getCoefficients

public RationalNumber[] getCoefficients(int degree)
Get the coefficients array for a given degree.

Parameters:
degree - degree of the polynomial
Returns:
coefficients array


Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.