org.jscience.mathematics.analysis.polynomials
Class ExactRealPolynomialFraction

java.lang.Object
  extended by org.jscience.mathematics.analysis.ExactRealFunction
      extended by org.jscience.mathematics.analysis.polynomials.ExactRealPolynomialFraction
All Implemented Interfaces:
java.io.Serializable, Field.Member, Ring.Member, AbelianGroup.Member, AbstractMapping, C1Function, NumberMapping, Member

public class ExactRealPolynomialFraction
extends ExactRealFunction

This class implements fractions of polynomials with one unknown and real coefficients.

See Also:
Serialized Form

Constructor Summary
ExactRealPolynomialFraction(ExactRealPolynomial p)
          Simple constructor.
ExactRealPolynomialFraction(ExactRealPolynomial numerator, ExactRealPolynomial denominator)
          Simple constructor.
ExactRealPolynomialFraction(ExactRealPolynomialFraction f)
          Copy-constructor.
 
Method Summary
 ExactRealPolynomialFraction add(ExactRealPolynomialFraction f)
          Add a fraction to the instance.
 ExactRealPolynomialFraction differentiate()
          Returns the differential of this function.
 ExactRealPolynomialFraction divide(ExactRealPolynomialFraction f)
          Divide the instance by a fraction.
 ExactRealPolynomial getDenominator()
          Get the denominator.
 ExactRealPolynomial getNumerator()
          Get the numerator.
 ExactRealPolynomialFraction invert()
          Invert the instance.
 ExactReal map(ExactReal x)
          Evaluates this polynomial fraction.
 ExactRealPolynomialFraction multiply(ExactRealPolynomialFraction f)
          Multiply the instance by a fraction.
 ExactRealPolynomialFraction negate()
          Negate a fraction.
 ExactRealPolynomialFraction subtract(ExactRealPolynomialFraction f)
          Subtract a fraction to the instance.
 java.lang.String toString()
          DOCUMENT ME!
 java.lang.String toString(java.lang.String unknown)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.mathematics.analysis.ExactRealFunction
add, add, compose, divide, divide, getIntervalsList, inverse, map, multiply, multiply, setIntervalsList, subtract, subtract, taylorExpand, tensor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExactRealPolynomialFraction

public ExactRealPolynomialFraction(ExactRealPolynomial numerator,
                                   ExactRealPolynomial denominator)
Simple constructor. Build a fraction from a numerator and a denominator.

Parameters:
numerator - numerator of the fraction
denominator - denominator of the fraction
Throws:
java.lang.ArithmeticException - if the denominator is null

ExactRealPolynomialFraction

public ExactRealPolynomialFraction(ExactRealPolynomial p)
Simple constructor. Build a fraction from a single Polynom

Parameters:
p - value of the fraction

ExactRealPolynomialFraction

public ExactRealPolynomialFraction(ExactRealPolynomialFraction f)
Copy-constructor.

Parameters:
f - fraction to copy
Method Detail

map

public ExactReal map(ExactReal x)
Evaluates this polynomial fraction.

Specified by:
map in class ExactRealFunction
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

differentiate

public ExactRealPolynomialFraction differentiate()
Returns the differential of this function.

Specified by:
differentiate in interface C1Function
Specified by:
differentiate in class ExactRealFunction
Returns:
DOCUMENT ME!

negate

public ExactRealPolynomialFraction negate()
Negate a fraction.

Specified by:
negate in interface AbelianGroup.Member
Overrides:
negate in class ExactRealFunction
Returns:
a new fraction which is the opposite of this

add

public ExactRealPolynomialFraction add(ExactRealPolynomialFraction f)
Add a fraction to the instance.

Parameters:
f - fraction to add.
Returns:
DOCUMENT ME!

subtract

public ExactRealPolynomialFraction subtract(ExactRealPolynomialFraction f)
Subtract a fraction to the instance.

Parameters:
f - fraction to subtract.
Returns:
DOCUMENT ME!

multiply

public ExactRealPolynomialFraction multiply(ExactRealPolynomialFraction f)
Multiply the instance by a fraction.

Parameters:
f - fraction to multiply by
Returns:
DOCUMENT ME!

divide

public ExactRealPolynomialFraction divide(ExactRealPolynomialFraction f)
Divide the instance by a fraction.

Parameters:
f - fraction to divide by
Returns:
DOCUMENT ME!
Throws:
java.lang.ArithmeticException - if f is null

invert

public ExactRealPolynomialFraction invert()
Invert the instance. Replace the instance by its inverse.

Returns:
DOCUMENT ME!
Throws:
java.lang.ArithmeticException - if the instance is null

getNumerator

public ExactRealPolynomial getNumerator()
Get the numerator.

Returns:
the numerator

getDenominator

public ExactRealPolynomial getDenominator()
Get the denominator.

Returns:
the denominator (leeding coefficient is always positive)

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!

toString

public java.lang.String toString(java.lang.String unknown)
DOCUMENT ME!

Parameters:
unknown - DOCUMENT ME!
Returns:
DOCUMENT ME!