Module GrowthFunctionLibrary
Class GrowthFunctionBase
java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.growthfunctionlibrary.functions.GrowthFunctionBase
- All Implemented Interfaces:
Icon,IconSource,Manageable,Shareable,RenderedIcon,FloatToFloat
- Direct Known Subclasses:
AliSchaeffer,AliSchaefferDerivative,BetaFunction,BetaFunctionDerivative,Boltzmann,BoltzmannDerivative,Bridges,BridgesDerivative,ChapmanRichardsI,ChapmanRichardsIDerivative,ChapmanRichardsII,ChapmanRichardsIIDerivative,ChapmanRichardsIII,ChapmanRichardsIIIDerivative,Cubic,CubicDerivative,Exponential,ExponentialDerivative,Gaussian,GaussianDerivative,GompertzI,GompertzIDerivative,GompertzII,GompertzIIDerivative,GompertzIII,GompertzIIIDerivative,GompertzIV,GompertzIVDerivative,Janoschek,JanoschekDerivative,LogisticI,LogisticIDerivative,LogisticII,LogisticIIDerivative,LogisticIII,LogisticIIIDerivative,LogisticV,LogisticVDerivative,Lorentzian,LorentzianDerivative,Meloun,MelounDerivative,Mitscherlich,MitscherlichDerivative,Pearl,PearlDerivative,Power,PowerDerivative,Quadratic,QuadraticDerivative,RichardsI,RichardsIDerivative,RichardsII,RichardsIIDerivative,Schumacher,SchumacherDerivative,Sinusoidal,SinusoidalDerivative,VonBertalanffyI,VonBertalanffyIDerivative,VonBertalanffyII,VonBertalanffyIIDerivative,VonBertalanffyIII,VonBertalanffyIIIDerivative,Weibull,WeibullDerivative
public abstract class GrowthFunctionBase
extends ShareableBase
implements FloatToFloat, RenderedIcon, IconSource, Icon
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawChart(Graphics2D g2d, int fullWidth, int fullHeight, float yMargin, boolean showLabels, float X_MIN, float X_MAX) voiddrawChart(BufferedImage image) Convenience overload with no margin and labels enabled.voiddrawChart(BufferedImage image, float yMargin) Convenience overload with a custom margin and labels enabled.voiddrawChart(BufferedImage image, float yMargin, boolean showLabels) Draws the graph of the evaluateFloat(x) function into the given BufferedImage.voiddrawChart(BufferedImage image, float yMargin, boolean showLabels, float X_MIN, float X_MAX) getImage()getImage(int w, int h) getPreferredIconSize(boolean small) floatabstract floatabstract floatbooleanvoidpaintIcon(Component c, Graphics2D g, int x, int y, int w, int h, int state) voidintrenderImage(JobManager jm, BufferedImage image, int y) voidMethods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.grogra.xl.lang.FloatToFloat
evaluateFloatMethods inherited from interface de.grogra.persistence.Manageable
getManageableTypeMethods inherited from interface de.grogra.pf.ui.RenderedIcon
getStamp
-
Field Details
-
$TYPE
-
-
Constructor Details
-
GrowthFunctionBase
public GrowthFunctionBase()
-
-
Method Details
-
getSuggestedXMin
public abstract float getSuggestedXMin() -
getSuggestedXMax
public abstract float getSuggestedXMax() -
dublicate
public GrowthFunctionBase dublicate() throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException -
setValues
- Throws:
IllegalAccessException
-
renderImage
- Specified by:
renderImagein interfaceRenderedIcon
-
drawChart
Draws the graph of the evaluateFloat(x) function into the given BufferedImage. X-range is fixed (0-75). Y-range is automatically scaled based on the actual min/max values returned by evaluateFloat, plus an additional margin.- Parameters:
image- The image to draw into.yMargin- Additional margin applied to both yMin and yMax (in domain units), so the graph doesn't touch the top/bottom edge of the image.showLabels- If true, numeric step values are drawn along the axes, and extra space is reserved for them. If false, the chart uses the full image and no labels are drawn.
-
drawChart
public void drawChart(BufferedImage image, float yMargin, boolean showLabels, float X_MIN, float X_MAX) -
drawChart
public void drawChart(Graphics2D g2d, int fullWidth, int fullHeight, float yMargin, boolean showLabels, float X_MIN, float X_MAX) -
drawChart
Convenience overload with no margin and labels enabled. -
drawChart
Convenience overload with a custom margin and labels enabled. -
getSizeRatio
public float getSizeRatio()- Specified by:
getSizeRatioin interfaceRenderedIcon
-
paintIcon
-
prepareIcon
public void prepareIcon()- Specified by:
prepareIconin interfaceIcon
-
getIconSource
- Specified by:
getIconSourcein interfaceIcon
-
getImage
-
getImage
-
getImageSource
- Specified by:
getImageSourcein interfaceIcon
-
getIconBounds
- Specified by:
getIconBoundsin interfaceIcon
-
isMutable
public boolean isMutable() -
getIcon
- Specified by:
getIconin interfaceIconSource
-
getPreferredIconSize
- Specified by:
getPreferredIconSizein interfaceIconSource
-