Package pulse.math
Class FixedIntervalIntegrator
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.math.AbstractIntegrator
-
- pulse.math.FixedIntervalIntegrator
-
- All Implemented Interfaces:
Serializable,Descriptive,Reflexive
- Direct Known Subclasses:
MidpointIntegrator,SimpsonIntegrator
public abstract class FixedIntervalIntegrator extends AbstractIntegrator
A fixed-interval integrator implements a numerical scheme in which the domain within the integration bounds is divided into equal intervals of a sufficiently small (and fixed) length. The integral is then approximately equal to the sum of the integrand function values at the nodes resulting from such partitioning times the integration weights.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FixedIntervalIntegrator(Segment bounds)Creates aFixedIntervalIntegratorwith the specified integration bounds and a default number of integration segments.FixedIntervalIntegrator(Segment bounds, NumericProperty segments)Creates aFixedIntervalIntegratorwith the specified integration bounds number of integration segments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumericPropertygetIntegrationSegments()Retrieves the number of integration segments.StringgetPrefix()Set<NumericPropertyKeyword>listedKeywords()The listed property isINTEGRATION_SEGMENTS.voidset(NumericPropertyKeyword type, NumericProperty property)An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)NumericProperties in subclasses ofAccessible.voidsetBounds(Segment bounds)Sets the bounds to the argument and re-evaluates the integration step size.voidsetIntegrationSegments(NumericProperty integrationSegments)Sets the number of integration segments and re-evaluates the integration step size.doublestepSize()Retrieves the step size equal to the integration range length divided by the number of integration segments.StringtoString()-
Methods inherited from class pulse.math.AbstractIntegrator
getBounds, integrand, integrate
-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
FixedIntervalIntegrator
public FixedIntervalIntegrator(Segment bounds)
Creates aFixedIntervalIntegratorwith the specified integration bounds and a default number of integration segments.- Parameters:
bounds- the integration bounds
-
FixedIntervalIntegrator
public FixedIntervalIntegrator(Segment bounds, NumericProperty segments)
Creates aFixedIntervalIntegratorwith the specified integration bounds number of integration segments.- Parameters:
bounds- the integration boundssegments- number of integration segments
-
-
Method Detail
-
getIntegrationSegments
public NumericProperty getIntegrationSegments()
Retrieves the number of integration segments.- Returns:
- the number of integration segments.
-
setIntegrationSegments
public final void setIntegrationSegments(NumericProperty integrationSegments)
Sets the number of integration segments and re-evaluates the integration step size.- Parameters:
integrationSegments- a property of theINTEGRATION_SEGMENTStype
-
setBounds
public final void setBounds(Segment bounds)
Sets the bounds to the argument and re-evaluates the integration step size.- Overrides:
setBoundsin classAbstractIntegrator- Parameters:
bounds- the integration bounds
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
Description copied from class:AccessibleAn abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)
NumericProperties in subclasses ofAccessible. Typically this involves aswitchstatement that goes through the different options for thetypeand invokes differentset(...)methods to update the matchingNumericPropertywithproperty.- Specified by:
setin classAccessible- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
The listed property isINTEGRATION_SEGMENTS.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
stepSize
public final double stepSize()
Retrieves the step size equal to the integration range length divided by the number of integration segments.- Returns:
- the integration step size.
-
getPrefix
public String getPrefix()
- Overrides:
getPrefixin classAbstractIntegrator
-
-