Class LinearCombinations.DotK

    • Constructor Detail

      • DotK

        public DotK​(int k)
        Instantiates a new dot K.
        Parameters:
        k - K-fold precision.
    • Method Detail

      • computeValue

        protected double computeValue​(double[] a,
                                      double[] b)
        Compute the sum of the products of two sequences of factors with high accuracy. The input arrays will have a length of at least 2; the lengths will be the same.
        Specified by:
        computeValue in class LinearCombinations.BaseLinearCombination
        Parameters:
        a - Factors.
        b - Factors.
        Returns:
        \( \sum_i a_i b_i \).
      • value

        public double value​(double a1,
                            double b1,
                            double a2,
                            double b2)
        Compute the sum of the products of two sequences of factors.
        Specified by:
        value in interface LinearCombination.TwoD
        Parameters:
        a1 - First factor of the first term.
        b1 - Second factor of the first term.
        a2 - First factor of the second term.
        b2 - Second factor of the second term.
        Returns:
        \( a_1 b_1 + a_2 b_2 \)
      • value

        public double value​(double a1,
                            double b1,
                            double a2,
                            double b2,
                            double a3,
                            double b3)
        Compute the sum of the products of two sequences of factors.
        Specified by:
        value in interface LinearCombination.ThreeD
        Parameters:
        a1 - First factor of the first term.
        b1 - Second factor of the first term.
        a2 - First factor of the second term.
        b2 - Second factor of the second term.
        a3 - First factor of the third term.
        b3 - Second factor of the third term.
        Returns:
        \( a_1 b_1 + a_2 b_2 + a_3 b_3 \)
      • value

        public double value​(double a1,
                            double b1,
                            double a2,
                            double b2,
                            double a3,
                            double b3,
                            double a4,
                            double b4)
        Compute the sum of the products of two sequences of factors.
        Specified by:
        value in interface LinearCombination.FourD
        Parameters:
        a1 - First factor of the first term.
        b1 - Second factor of the first term.
        a2 - First factor of the second term.
        b2 - Second factor of the second term.
        a3 - First factor of the third term.
        b3 - Second factor of the third term.
        a4 - First factor of the fourth term.
        b4 - Second factor of the fourth term.
        Returns:
        \( a_1 b_1 + a_2 b_2 + a_3 b_3 + a_4 b_4 \)