igeo

## Class IPolynomialFunction

- java.lang.Object
- - igeo.IPolynomialFunction

- All Implemented Interfaces:
    IFunction

      public class IPolynomialFunction
      extends java.lang.Object
      implements IFunction

  Implementation of IFunction with polynomial.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `double[]` | `coeff`
    `int` | `degree`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IPolynomialFunction()`
    `IPolynomialFunction(double[] coef)`
    `IPolynomialFunction(int deg)`
    `IPolynomialFunction(int deg, double[] coef)`
    `IPolynomialFunction(IPolynomialFunction pf)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(IPolynomialFunction p)`
    `void` | `differentiate()`
    `IPolynomialFunction` | `dup()`
    `double` | `eval(double x)`
    `void` | `mul(double a)`
    `void` | `mul(IPolynomialFunction p)`
    `IPolynomialFunction` | `power(int p)`
    `void` | `set(int index, double v)`
    `void` | `setDegree(int d)`
    `IPolynomialFunction` | `substitute(IPolynomialFunction f)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### degree

          public int degree

    - #### coeff

          public double[] coeff

  - ### Constructor Detail

    - #### IPolynomialFunction

          public IPolynomialFunction(int deg)

    - #### IPolynomialFunction

          public IPolynomialFunction(int deg,
                                     double[] coef)

    - #### IPolynomialFunction

          public IPolynomialFunction(IPolynomialFunction pf)

    - #### IPolynomialFunction

          public IPolynomialFunction()

    - #### IPolynomialFunction

          public IPolynomialFunction(double[] coef)

  - ### Method Detail

    - #### dup

          public IPolynomialFunction dup()

      Specified by:
        `dup` in interface `IFunction`

    - #### set

          public void set(int index,
                          double v)

    - #### eval

          public double eval(double x)

      Specified by:
        `eval` in interface `IFunction`

    - #### setDegree

          public void setDegree(int d)

    - #### mul

          public void mul(double a)

    - #### mul

          public void mul(IPolynomialFunction p)

    - #### add

          public void add(IPolynomialFunction p)

    - #### differentiate

          public void differentiate()

    - #### power

          public IPolynomialFunction power(int p)

    - #### substitute

          public IPolynomialFunction substitute(IPolynomialFunction f)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`