Package pulse.problem.schemes.rte.exact
Class NewtonCotesQuadrature
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.math.AbstractIntegrator
-
- pulse.problem.schemes.rte.exact.CompositionProduct
-
- pulse.problem.schemes.rte.exact.NewtonCotesQuadrature
-
- All Implemented Interfaces:
Serializable,Descriptive,Reflexive
public class NewtonCotesQuadrature extends CompositionProduct
A class for evaluating the composition product using a simple Newton-Cotes quadrature with a cutoff.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NewtonCotesQuadrature()Constructs a defaultNewtonCotesQuadraturewith integration bounds spanning from 0 to 1.NewtonCotesQuadrature(Segment bounds)Constructs a defaultNewtonCotesQuadraturewhose integration bounds are specified by the argument.NewtonCotesQuadrature(Segment bounds, NumericProperty segments)Constructs a customNewtonCotesQuadraturewith specified integration bounds and number of integration segments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumericPropertygetCutoff()FixedIntervalIntegratorgetIntegrator()This will retrieve the Newton-Cotes integrator, which by default is the Simpson integrator.booleanignoreSiblings()ShouldAccessibles that belong to thisPropertyHolderbe ignored when thisPropertyHolderis displayed in a table?doubleintegrate()Uses the Newton-Cotes integrator (by default, the Simpson's rule) to evaluate the composition product.Set<NumericPropertyKeyword>listedKeywords()By default, this will search the children of thisPropertyHolderto collect the types of their listed numeric parameters recursively.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.voidsetCutoff(NumericProperty cutoff)StringtoString()-
Methods inherited from class pulse.problem.schemes.rte.exact.CompositionProduct
getAlpha, getBeta, getEmissionFunction, getOrder, getPrefix, integrand, setCoefficients, setEmissionFunction, setOrder
-
Methods inherited from class pulse.math.AbstractIntegrator
getBounds, setBounds
-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, 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
-
NewtonCotesQuadrature
public NewtonCotesQuadrature()
Constructs a defaultNewtonCotesQuadraturewith integration bounds spanning from 0 to 1.
-
NewtonCotesQuadrature
public NewtonCotesQuadrature(Segment bounds)
Constructs a defaultNewtonCotesQuadraturewhose integration bounds are specified by the argument.- Parameters:
bounds- the integration bounds
-
NewtonCotesQuadrature
public NewtonCotesQuadrature(Segment bounds, NumericProperty segments)
Constructs a customNewtonCotesQuadraturewith specified integration bounds and number of integration segments. The underlying integration scheme by default is aSimpsonIntegrator.- Parameters:
bounds- the integration boundssegments- the number of integration segments. The higher this number, the higher is the accuracy.- See Also:
SimpsonIntegrator
-
-
Method Detail
-
integrate
public double integrate()
Uses the Newton-Cotes integrator (by default, the Simpson's rule) to evaluate the composition product.- Specified by:
integratein classAbstractIntegrator- Returns:
- the value of the integral
-
getIntegrator
public FixedIntervalIntegrator getIntegrator()
This will retrieve the Newton-Cotes integrator, which by default is the Simpson integrator.- Returns:
- the integrator
-
getCutoff
public NumericProperty getCutoff()
-
setCutoff
public void setCutoff(NumericProperty cutoff)
-
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()
Description copied from class:PropertyHolderBy default, this will search the children of this
PropertyHolderto collect the types of their listed numeric parameters recursively.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
ignoreSiblings
public boolean ignoreSiblings()
Description copied from class:PropertyHolderShouldAccessibles that belong to thisPropertyHolderbe ignored when thisPropertyHolderis displayed in a table?- Overrides:
ignoreSiblingsin classPropertyHolder- Returns:
falseby default- See Also:
PropertyHolderTable
-
-