@@ -0,0 +1,1586 @@
+package com.digiburo.backprop1b.network;%0A%0A/**%0A * Math support, all static methods%0A */%0Aimport java.util.Random;%0A%0A/**%0A * Math support, all static methods%0A * %0A */%0Apublic class Mathz %7B%0A    %0A    /**%0A     * Return a random number within the specified range%0A     * %0A     * @param lower range%0A     * @param upper range%0A     * @return a random number within the specified range%0A     */%0A    public static synchronized double getBoundedRandom(double lower, double upper) %7B%0A    %09double range = upper - lower;%0A    %09double result = _random.nextDouble() * range + lower;%0A    %09return(result);%0A    %7D%0A    %0A    /**%0A     * Return a random double%0A     * %0A     * @return random double%0A     */%0A    public static synchronized double getRandomDouble() %7B%0A    %09return(_random.nextDouble());%0A    %7D%0A    %0A    /**%0A     * Convert a double array to a thresholded array%0A     * %0A     * @param threshold value%0A     * @param candidatez raw values to threshold%0A     * @return 0, 1 or -1 (if failed threshold)%0A     */%0A    public static synchronized int%5B%5D thresholdArray(double threshold, double%5B%5D candidatez) %7B%0A    %09double upper_threshold = 1.0 - threshold;%0A    %09double lower_threshold = threshold;%0A%09%0A    %09int%5B%5D result = new int%5Bcandidatez.length%5D;%0A%09%0A    %09for (int ii = 0; ii %3C candidatez.length; ii++) %7B%0A    %09%09if (candidatez%5Bii%5D %3E upper_threshold) %7B%0A    %09%09%09result%5Bii%5D = 1;%0A    %09%09%7D else if (candidatez%5Bii%5D %3C lower_threshold) %7B%0A    %09%09%09result%5Bii%5D = 0;%0A    %09%09%7D else %7B%0A    %09%09%09result%5Bii%5D = -1;%0A    %09%09%7D%0A    %09%7D%0A%09%0A    %09return(result);%0A    %7D%0A    %0A    /**%0A     * Duh.%0A     */%0A    private final static Random _random = new Random();%0A%7D%0A%0A

Create Mathz.java