Documentation of 'bayesnet.jayes.util.MathUtils' Java class
MathUtils
bayesnet.jayes.util

Class MathUtils



  • public final class MathUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void exp(double[] vector) 
      static void exp(IArrayWrapper array) 
      static void log(double[] vector) 
      static void log(IArrayWrapper vector) 
      static double[] normalize(double[] vector) 
      static double[] normalizeLog(double[] vector) 
      static int product(int[] vector) 
      static int productOfRange(int[] vector, int start, int end)
      product of the values in the array, from index start (inclusive) to end (exclusive)
      static int scalarProduct(int[] v1, int[] v2) 
      static void secureDivide(double[] a, double[] b, double[] c)
      computes c := a / b , but avoids division by zero.
      static void secureSubtract(double[] a, double[] b, double[] c) 
      static double sum(double[] vector) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • exp

        public static void exp(double[] vector)
      • log

        public static void log(double[] vector)
      • normalize

        public static double[] normalize(double[] vector)
      • sum

        public static double sum(double[] vector)
      • secureDivide

        public static void secureDivide(double[] a,
                                        double[] b,
                                        double[] c)
        computes c := a / b , but avoids division by zero. In the context of the JTA, this is valid because it holds that b == 0 -> a == 0
        Parameters:
        a -
        b -
        c -
      • secureSubtract

        public static void secureSubtract(double[] a,
                                          double[] b,
                                          double[] c)
      • normalizeLog

        public static double[] normalizeLog(double[] vector)
      • product

        public static int product(int[] vector)
      • productOfRange

        public static int productOfRange(int[] vector,
                                         int start,
                                         int end)
        product of the values in the array, from index start (inclusive) to end (exclusive)
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if end >= vector.length
      • scalarProduct

        public static int scalarProduct(int[] v1,
                                        int[] v2)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.