Left divide for gallic weights (right divide is not implemented yet)

@param a first
@param b second
@return left divide of first by second
438947
@Override
  public GallicWeight divide(GallicWeight a, GallicWeight b) {
    if (isZero(a)) return zero;
    Preconditions.checkArgument(isNotZero(b), "cant divide by zero");
    IntArrayList newOutputLabels = new IntArrayList();
    for (int i = b.getLabels().size(); i < a.getLabels().size(); i++) {
      newOutputLabels.add(a.getLabels().get(i));
    }
    double newWeight = this.weightSemiring.divide(a.getWeight(), b.getWeight());
    return GallicWeight.create(newOutputLabels, newWeight);
  }
1013359
public static DoubleBinding min(final ObservableDoubleValue a, final ObservableDoubleValue b) {
        return createDoubleBinding(() -> Math.min(a.get(), b.get()), a, b);
    }
370550
private int partition(double[] a, int[] indexes, int left, int right) {
        int i = left - 1;
        int j = right;
        while (true) {
            while (a[indexes[++i]] < a[indexes[right]]); // find item on left to swap, a[right] acts as sentinel
            while (a[indexes[right]] < a[indexes[--j]]) { // find item on right to swap
                if (j == left)
                    break; // don't go out-of-bounds
            }
            if (i >= j)
                break; // check if pointers cross
            swap(a, indexes, i, j); // swap two elements into place
        }
        swap(a, indexes, i, right); // swap with partition element
        return i;
    }
240772
public static INDArray min(INDArray first, INDArray second) {
        return min(first, second, true);
    }
996740
public static double dot(@javax.annotation.Nonnull final List<double[]> a, @javax.annotation.Nonnull final List<double[]> b) {
    return com.simiacryptus.util.ArrayUtil.sum(com.simiacryptus.util.ArrayUtil.multiply(a, b));
  }
241819
public static void symmLowerToFull( DMatrixSparseCSC A , DMatrixSparseCSC B , @Nullable IGrowArray gw )
    {
        if( A.numCols != A.numRows )
            throw new IllegalArgumentException("Must be a lower triangular square matrix");

        int N = A.numCols;
        int w[] = adjust(gw,N,N);
        B.reshape(N,N,A.nz_length*2);
        B.indicesSorted = false;

        //=== determine the row counts of the full matrix
        for (int col = 0; col < N; col++) {
            int idx0 = A.col_idx[col];
            int idx1 = A.col_idx[col+1];

            // We know the length of the lower part of this column already
            w[col] += idx1 - idx0;

            // add elements to the top of the other columns along row with index 'col'
            for (int i = idx0; i < idx1; i++) {
                int row = A.nz_rows[i];
                if( row > col ) {
                    w[row]++;
                }
            }
        }

        // Update the structure of B
        B.histogramToStructure(w);

        // Zero W again. It's being used to keep track of how many elements have been added to a column already
        Arrays.fill(w,0,N,0);
        // Fill in matrix
        for (int col = 0; col < N; col++) {

            int idx0 = A.col_idx[col];
            int idx1 = A.col_idx[col+1];

            int lengthA = idx1 - idx0;
            int lengthB = B.col_idx[col+1] - B.col_idx[col];

            // Copy the non-zero values from A into B along the columns while taking in account the upper
            // elements already copied
            System.arraycopy(A.nz_values,idx0,B.nz_values,B.col_idx[col]+lengthB-lengthA,lengthA);
            System.arraycopy(A.nz_rows,idx0,B.nz_rows,B.col_idx[col]+lengthB-lengthA,lengthA);

            // Copy this column into the upper portion of B
            for (int i = idx0; i < idx1; i++) {
                int row = A.nz_rows[i];
                if( row > col ) {
                    int indexB = B.col_idx[row] + w[row]++;
                    B.nz_rows[indexB] = col;
                    B.nz_values[indexB] = A.nz_values[i];
                }
            }
        }

    }
922306
@Pure
	@Inline(value="($1 <= $2)", constantExpression=true)
	public static boolean operator_lessEqualsThan(long a, double b) {
		return a <= b;
	}
416850
public static int compare(String left, double right) {
	if (Decision.isNumber(left)) {
	    if (left.length() > 9) {
		try {
		    return new BigDecimal(left).compareTo(new BigDecimal(Caster.toString(right)));
		}
		catch (Exception e) {}
	    }
	    return compare(Caster.toDoubleValue(left, Double.NaN), right);
	}
	if (Decision.isBoolean(left)) return compare(Caster.toBooleanValue(left, false), right);

	if (left.length() == 0) return -1;
	char leftFirst = left.charAt(0);
	if (leftFirst >= '0' && leftFirst <= '9') return left.compareToIgnoreCase(Caster.toString(right));
	return leftFirst - '0';
    }
260697
public static IntPoint Divide(IntPoint point1, IntPoint point2) {
        IntPoint result = new IntPoint(point1);
        result.Divide(point2);
        return result;
    }
1130591
public static void divide( DMatrix2x2 a , double alpha ) {
        a.a11 /= alpha; a.a12 /= alpha;
        a.a21 /= alpha; a.a22 /= alpha;
    }
715981
public static <A, B> Pair<A, B> pair(
    final A left,
    final B right)
  {
    return new Pair<A, B>(left, right);
  }
753971
public InclusMultiPos<E, L, R> inclus(Boolean left, Boolean right) {
		this.inclusive[0] = checkNotNull(left);
		this.inclusive[1] = checkNotNull(right);
		return this;
	}
952809
public static Short min(Short a, Short b) {
		return a <= b ? a : b;
	}
652366
def _B(self, x, a, b):
        
        return special.betainc(a, b, x) * special.beta(a, b)
124830
@Pure /* not guaranteed, since compareTo() is invoked */
	@Inline("($1.compareTo($2) >= 0)")
	public static <C> boolean operator_greaterEqualsThan(Comparable<? super C> left, C right) {
		return left.compareTo(right) >= 0;
	}
538557
public static double jensenShannonDivergence(double[] a, double[] b) {
    double[] average = pairwiseAdd(a, b);
    multiplyInPlace(average, .5);
    return .5 * klDivergence(a, average) + .5 * klDivergence(b, average);
  }
597803
def div(a, b):
  
  def divide(a, b):
    """Division"""
    return a / b
  return op_with_scalar_cast(a, b, divide)