Class LeftHandPlot

    • Constructor Detail

      • LeftHandPlot

        public LeftHandPlot​(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)
        Calculate area of a single slice with Left Hand Rule.
        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 as a double
      • drawSlice

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