mymath
Class MyMathOps

java.lang.Object
  extended by mymath.MyMathOps

public class MyMathOps
extends java.lang.Object


Constructor Summary
MyMathOps()
           
 
Method Summary
static double[] arrayAdd(double[] a1, double[] a2)
           
static double[] arrayConcat(double[] a, double[] b)
           
static double arrayNormalize(double[] a)
           
static void arrayNormalizeEuclid(double[] a)
           
static double[] arrayScalMult(double[] a, double l)
           
static double ce(double[] p, double[] q)
           
static double euclDist(double[] a, double[] b)
          Computes the Euclidean distance between a and b (must be of same length)
static int[] indexto01array(int ind, int size)
           
static double innerProduct(double[] a, double[] b)
           
static int[] intarrayadd(int[] a, int[] b)
           
static int intPow(int k, int l)
           
static double roundDouble(double roundthis, int digits)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyMathOps

public MyMathOps()
Method Detail

arrayAdd

public static double[] arrayAdd(double[] a1,
                                double[] a2)

arrayNormalize

public static double arrayNormalize(double[] a)

arrayNormalizeEuclid

public static void arrayNormalizeEuclid(double[] a)

arrayScalMult

public static double[] arrayScalMult(double[] a,
                                     double l)

arrayConcat

public static double[] arrayConcat(double[] a,
                                   double[] b)

ce

public static double ce(double[] p,
                        double[] q)

innerProduct

public static double innerProduct(double[] a,
                                  double[] b)

intPow

public static int intPow(int k,
                         int l)

intarrayadd

public static int[] intarrayadd(int[] a,
                                int[] b)

indexto01array

public static int[] indexto01array(int ind,
                                   int size)

roundDouble

public static double roundDouble(double roundthis,
                                 int digits)

euclDist

public static double euclDist(double[] a,
                              double[] b)
Computes the Euclidean distance between a and b (must be of same length)