Class BaseRuleFactory<T extends Number>

    • Constructor Detail

      • BaseRuleFactory

        public BaseRuleFactory()
    • Method Detail

      • getRule

        public Pair<double[],​double[]> getRule​(int numberOfPoints)
                                              throws MathIllegalArgumentException
        Gets a copy of the quadrature rule with the given number of integration points.
        Parameters:
        numberOfPoints - Number of integration points.
        Returns:
        a copy of the integration rule.
        Throws:
        MathIllegalArgumentException - if numberOfPoints < 1.
        MathIllegalArgumentException - if the elements of the rule pair do not have the same length.
      • getRuleInternal

        protected Pair<T[],​T[]> getRuleInternal​(int numberOfPoints)
                                               throws MathIllegalArgumentException
        Gets a rule. Synchronization ensures that rules will be computed and added to the cache at most once. The returned rule is a reference into the cache.
        Parameters:
        numberOfPoints - Order of the rule to be retrieved.
        Returns:
        the points and weights corresponding to the given order.
        Throws:
        MathIllegalArgumentException - if the elements of the rule pair do not have the same length.
      • computeRule

        protected abstract Pair<T[],​T[]> computeRule​(int numberOfPoints)
                                                    throws MathIllegalArgumentException
        Computes the rule for the given order.
        Parameters:
        numberOfPoints - Order of the rule to be computed.
        Returns:
        the computed rule.
        Throws:
        MathIllegalArgumentException - if the elements of the pair do not have the same length.