Class RightHandPlot

    • Constructor Detail

      • RightHandPlot

        public RightHandPlot​(org.dalton.polyfun.Polynomial polynomial,
                             double xLower,
                             double xUpper,
                             int subintervals)
        Constructor. Calls the constructor for AbstractRiemann and also sets the plot frame title.
        Parameters:
        polynomial - The poly to get the area under
        xLower - The left border of the interval
        xUpper - The right border of the interval
        subintervals - The number of slices in the interval
    • Method Detail

      • getSubintervalArea

        public double getSubintervalArea​(double leftBorder,
                                         double rightBorder)
        Estimate the area under the given poly between the interval.
        Specified by:
        getSubintervalArea in class AbstractRiemann
        Parameters:
        leftBorder - The x-coordinate of the left border of the getSubintervalArea
        rightBorder - The x-coordinate of the right border of the getSubintervalArea
        Returns:
        The area under the poly for this getSubintervalArea.
      • drawSlice

        public void drawSlice​(double leftBorder,
                              double rightBorder)
        Plot the slice under the given poly.
        Specified by:
        drawSlice in class AbstractRiemann
        Parameters:
        leftBorder - The left x-coordinate of the getSubintervalArea
        rightBorder - The right x-coordinate of the getSubintervalArea