Class Polynom


  • public class Polynom
    extends Object
    class used to represent a zernike moment polynomial.
    Author:
    Andreas Graumann (University of Konstanz)
    • Constructor Detail

      • Polynom

        public Polynom​(int degree)
        default constructor.
        Parameters:
        degree - the degree of the polynom
    • Method Detail

      • setCoefficient

        public void setCoefficient​(int pos,
                                   int coef)
        set the coefficient at a position.
        Parameters:
        pos - the position (the power of the monom)
        coef - the coefficient
      • getCoefficient

        public int getCoefficient​(int pos)
        return the coefficient at a given position.
        Parameters:
        pos - the position
        Returns:
        the coefficient
      • evaluate

        public double evaluate​(double x)
        return the value of the polynom in a given point.
        Parameters:
        x - the point
        Returns:
        the value of the polynom
      • toString

        public String toString()
        provide a String representation of this polynom. mostly for debugging purposes and for the JUnit test case
        Overrides:
        toString in class Object
        Returns:
        the String representation