Class MatrixIntegrator
java.lang.Object
com.irurueta.numerical.integration.MatrixIntegrator
- Direct Known Subclasses:
QuadratureMatrixIntegrator
,RombergMatrixIntegrator
,SimpsonMatrixIntegrator
Integrates single dimension matrix (multivariate) functions over a specified interval.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegratorType
Default integrator type.static final QuadratureType
Default quadrature type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MatrixIntegrator
create
(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener) Creates an integrator using default integrator and quadrature types with default accuracy.static MatrixIntegrator
create
(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, double eps) Creates an integrator using default integrator and quadrature types.static MatrixIntegrator
create
(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, double eps, IntegratorType integratorType) Creates an integrator using provided integrator type and using default quadrature type.static MatrixIntegrator
create
(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, double eps, IntegratorType integratorType, QuadratureType quadratureType) Creates an integrator using provided integrator and quadrature types.static MatrixIntegrator
create
(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, IntegratorType integratorType) Creates an integrator using provided integrator type with default accuracy and using default quadrature type.static MatrixIntegrator
create
(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, IntegratorType integratorType, QuadratureType quadratureType) Creates an integrator using provided integrator and quadrature types with default accuracy.abstract IntegratorType
Gets type of integrator.abstract QuadratureType
Gets type of quadrature.abstract void
integrate
(com.irurueta.algebra.Matrix result) Integrates function between provided lower and upper limits.
-
Field Details
-
DEFAULT_INTEGRATOR_TYPE
Default integrator type. Picks the safest option when no prior knowledge about the integrand is known. -
DEFAULT_QUADRATURE_TYPE
Default quadrature type. Picks the safest option when no prior knowledge about the integrand is known.
-
-
Constructor Details
-
MatrixIntegrator
public MatrixIntegrator()
-
-
Method Details
-
getIntegratorType
Gets type of integrator.- Returns:
- type of integrator.
-
getQuadratureType
Gets type of quadrature.- Returns:
- type of quadrature.
-
integrate
Integrates function between provided lower and upper limits.- Parameters:
result
- instance where result of integration will be stored.- Throws:
IntegrationException
- if integration fails for numerical reasons.
-
create
public static MatrixIntegrator create(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, double eps, IntegratorType integratorType, QuadratureType quadratureType) throws com.irurueta.algebra.WrongSizeException Creates an integrator using provided integrator and quadrature types. It must be noticed that upper limit of integration is ignored when using exponential mid-point quadrature type for Romberg's integration method.- Parameters:
a
- Lower limit of integration.b
- Upper limit of integration.listener
- listener to evaluate a single dimension function at required points.eps
- required accuracy.integratorType
- integrator type.quadratureType
- quadrature type.- Returns:
- created integrator.
- Throws:
IllegalArgumentException
- if provided quadrature type is not supported for required integrator type.com.irurueta.algebra.WrongSizeException
- if size notified by provided listener is invalid.
-
create
public static MatrixIntegrator create(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, IntegratorType integratorType, QuadratureType quadratureType) throws com.irurueta.algebra.WrongSizeException Creates an integrator using provided integrator and quadrature types with default accuracy. It must be noticed that upper limit of integration is ignored when using exponential mid-point quadrature type for Romberg's integration method.- Parameters:
a
- Lower limit of integration.b
- Upper limit of integration.listener
- listener to evaluate a single dimension function at required points.integratorType
- integrator type.quadratureType
- quadrature type.- Returns:
- created integrator.
- Throws:
IllegalArgumentException
- if provided quadrature type is not supported for required integrator type.com.irurueta.algebra.WrongSizeException
- if size notified by provided listener is invalid.
-
create
public static MatrixIntegrator create(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, double eps, IntegratorType integratorType) throws com.irurueta.algebra.WrongSizeException Creates an integrator using provided integrator type and using default quadrature type. It must be noticed that upper limit of integration is ignored when using exponential mid-point quadrature type for Romberg's integration method.- Parameters:
a
- Lower limit of integration.b
- Upper limit of integration.listener
- listener to evaluate a single dimension function at required points.eps
- required accuracy.integratorType
- integrator type.- Returns:
- created integrator.
- Throws:
com.irurueta.algebra.WrongSizeException
- if size notified by provided listener is invalid.
-
create
public static MatrixIntegrator create(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, IntegratorType integratorType) throws com.irurueta.algebra.WrongSizeException Creates an integrator using provided integrator type with default accuracy and using default quadrature type. It must be noticed that upper limit of integration is ignored when using exponential mid-point quadrature type for Romberg's integration method.- Parameters:
a
- Lower limit of integration.b
- Upper limit of integration.listener
- listener to evaluate a single dimension function at required points.integratorType
- integrator type.- Returns:
- created integrator.
- Throws:
com.irurueta.algebra.WrongSizeException
- if size notified by provided listener is invalid.
-
create
public static MatrixIntegrator create(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener, double eps) throws com.irurueta.algebra.WrongSizeException Creates an integrator using default integrator and quadrature types. It must be noticed that upper limit of integration is ignored when using exponential mid-point quadrature type for Romberg's integration method.- Parameters:
a
- Lower limit of integration.b
- Upper limit of integration.listener
- listener to evaluate a single dimension function at required points.eps
- required accuracy.- Returns:
- created integrator.
- Throws:
com.irurueta.algebra.WrongSizeException
- if size notified by provided listener is invalid.
-
create
public static MatrixIntegrator create(double a, double b, MatrixSingleDimensionFunctionEvaluatorListener listener) throws com.irurueta.algebra.WrongSizeException Creates an integrator using default integrator and quadrature types with default accuracy. It must be noticed that upper limit of integration is ignored when using exponential mid-point quadrature type for Romberg's integration method.- Parameters:
a
- Lower limit of integration.b
- Upper limit of integration.listener
- listener to evaluate a single dimension function at required points.- Returns:
- created integrator.
- Throws:
com.irurueta.algebra.WrongSizeException
- if size notified by provided listener is invalid.
-