Package com.katiejergens.riemannSum
Class TrapezoidPlot
- java.lang.Object
-
- com.katiejergens.riemannSum.AbstractRiemann
-
- com.katiejergens.riemannSum.TrapezoidPlot
-
public class TrapezoidPlot extends AbstractRiemann
-
-
Field Summary
-
Fields inherited from class com.katiejergens.riemannSum.AbstractRiemann
plotFrame, poly, subintervals, xLower, xUpper
-
-
Constructor Summary
Constructors Constructor Description TrapezoidPlot(org.dalton.polyfun.Polynomial polynomial, double leftX, double rightX, int subintervals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
drawSlice(double leftBorder, double rightBorder)
Plot the slice under the given poly.double
getSubintervalArea(double leftBorder, double rightBorder)
Estimate the area under a poly for a given interval.-
Methods inherited from class com.katiejergens.riemannSum.AbstractRiemann
calculateDeltaX, configPlotFrame, drawRiemannSlices, getIntervalArea, plotAccFnc, plotPolynomial
-
-
-
-
Method Detail
-
getSubintervalArea
public double getSubintervalArea(double leftBorder, double rightBorder)
Estimate the area under a poly for a given interval.- Specified by:
getSubintervalArea
in classAbstractRiemann
- Parameters:
leftBorder
- The x-coordinate of the left border of the getSubintervalArearightBorder
- 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 classAbstractRiemann
- Parameters:
leftBorder
- The left x-coordinate of the getSubintervalArearightBorder
- The right x-coordinate of the getSubintervalArea
-
-