Class TrapezoidPlot

    • Constructor Detail

      • TrapezoidPlot

        public TrapezoidPlot​(org.dalton.polyfun.Polynomial polynomial,
                             double leftX,
                             double rightX,
                             int subintervals)
    • Method Detail

      • getSubintervalArea

        public double getSubintervalArea​(double leftBorder,
                                         double rightBorder)
        Estimate the area under a poly for a given 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 curve from the left border to the right border.
      • 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