Class MatrixIntegrator

java.lang.Object
com.irurueta.numerical.integration.MatrixIntegrator
Direct Known Subclasses:
QuadratureMatrixIntegrator, RombergMatrixIntegrator, SimpsonMatrixIntegrator

public abstract class MatrixIntegrator extends Object
Integrates single dimension matrix (multivariate) functions over a specified interval.
  • Field Details

    • DEFAULT_INTEGRATOR_TYPE

      public static final IntegratorType DEFAULT_INTEGRATOR_TYPE
      Default integrator type. Picks the safest option when no prior knowledge about the integrand is known.
    • DEFAULT_QUADRATURE_TYPE

      public static final QuadratureType 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

      public abstract IntegratorType getIntegratorType()
      Gets type of integrator.
      Returns:
      type of integrator.
    • getQuadratureType

      public abstract QuadratureType getQuadratureType()
      Gets type of quadrature.
      Returns:
      type of quadrature.
    • integrate

      public abstract void integrate(com.irurueta.algebra.Matrix result) throws IntegrationException
      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.