Calculates the least common multiple of the set.  Returns a Number, the lcm.
431494
function() {
			// Create a new stats object to work with
			var nums = this.clone();

			// Go through each element and make the element the lcm of it
			// and the element to its left
			for (var i = 1; i < nums.size(); i++) {
				nums.set(i, lcm(nums.get(i - 1), nums.get(i)));
			}

			// The lcm of all the numbers if now in the final element
			return nums.get(nums.size() - 1);
		}
229190
def items_lower(self):
        '''
        
        '''
        return ((key, val[1]) for key, val in six.iteritems(self._data))
699318
public static int gcd(int m, int n) {
    if (m == 0 && n == 0)
      return 0;
    if (m < n) {
      int t = m;
      m = n;
      n = t;
    }
    int r = m % n;
    if (r == 0) {
      return n;
    } else {
      return gcd(n, r);
    }
  }
1119220
public static <E> Counter<E> intersection(Counter<E> c1, Counter<E> c2) {
    Counter<E> result = c1.getFactory().create();
    for (E key : Sets.union(c1.keySet(), c2.keySet())) {
      double count1 = c1.getCount(key);
      double count2 = c2.getCount(key);
      double minCount = (count1 < count2 ? count1 : count2);
      if (minCount > 0) {
        result.setCount(key, minCount);
      }
    }
    return result;
  }
596646
public double[][] getL() {
    double[][] L = new double[m][n];
    L[0][0] = 1.;
    for(int i = 1; i < m; i++) {
      final double[] Li = L[i];
      System.arraycopy(LU[i], 0, Li, 0, Math.min(i, n));
      if (i < n) {
        Li[i] = 1.;
      }
    }
    return L;
  }
92344
public static function lcm($a, $b)
    {
        return (abs($a * $b) / self::gcd($a, $b));
    }
63714
public static void multLowerTranB( DMatrixRMaj mat ) {
        int m = mat.numCols;
        double[] L = mat.data;
        for( int i = 0; i < m; i++ ) {
            for( int j = m-1; j >= i; j-- ) {
                double val = 0;
                for( int k = 0; k <= i; k++ ) {
                    val += L[ i*m + k] * L[ j*m + k ];
                }
                L[ i*m + j ] = val;
            }
        }
        // copy the results into the lower portion
        for( int i = 0; i < m; i++ ) {
            for (int j = 0; j < i; j++) {
                L[i*m+j] = L[j*m+i];
            }
        }
    }
460403
private final int m() {
		int n = 0;
		int i = k0;
		while (true) {
			if (i > j)
				return n;
			if (!cons(i))
				break;
			i++;
		}
		i++;
		while (true) {
			while (true) {
				if (i > j)
					return n;
				if (cons(i))
					break;
				i++;
			}
			i++;
			n++;
			while (true) {
				if (i > j)
					return n;
				if (!cons(i))
					break;
				i++;
			}
			i++;
		}
	}
1076746
public static long minimum(long... values)
    {
        int len = values.length;
        long current = values[0];

        for (int i=1; i < len; i++)
        {
            current = Math.min(values[i], current);
        }

        return current;
    }
89785
public static int klu_flops(KLU_symbolic Symbolic, KLU_numeric Numeric,
			KLU_common Common)
	{
		double flops = 0 ;
		int[] R, Uip, Llen, Ulen ;
		/*int[]*/double[] Ui ;
		double[][] LUbx ;
		double[] LU ;
		int k, ulen, p, nk, block, nblocks, k1 ;

		/* ---------------------------------------------------------------------- */
		/* check inputs */
		/* ---------------------------------------------------------------------- */

		if (Common == null)
		{
			return (FALSE) ;
		}
		Common.flops = EMPTY ;
		if (Numeric == null || Symbolic == null)
		{
			Common.status = KLU_INVALID ;
			return (FALSE) ;
		}
		Common.status = KLU_OK ;

		/* ---------------------------------------------------------------------- */
		/* get the contents of the Symbolic object */
		/* ---------------------------------------------------------------------- */

		R = Symbolic.R ;
		nblocks = Symbolic.nblocks ;

		/* ---------------------------------------------------------------------- */
		/* get the contents of the Numeric object */
		/* ---------------------------------------------------------------------- */

		LUbx = (double[][]) Numeric.LUbx ;

		/* ---------------------------------------------------------------------- */
		/* compute the flop count */
		/* ---------------------------------------------------------------------- */

		for (block = 0 ; block < nblocks ; block++)
		{
			k1 = R [block] ;
			nk = R [block+1] - k1 ;
			if (nk > 1)
			{
				Llen = Numeric.Llen ;
				int Llen_offset = k1 ;
				Uip  = Numeric.Uip ;
				int Uip_offset = k1 ;
				Ulen = Numeric.Ulen ;
				int Ulen_offset = k1 ;
				LU = LUbx [block] ;
				int[] Ui_offset = new int[1] ;
				for (k = 0 ; k < nk ; k++)
				{
					/* compute kth column of U, and update kth column of A */
					Ui = GET_I_POINTER (LU, Uip, Uip_offset, Ui_offset, k) ;
					ulen = Ulen [Ulen_offset + k] ;
					for (p = 0 ; p < ulen ; p++)
					{
						flops += 2 * Llen [Llen_offset + (int) Ui [Ui_offset[0] + p]] ;
					}
					/* gather and divide by pivot to get kth column of L */
					flops += Llen [Llen_offset + k] ;
				}
			}
		}
		Common.flops = flops ;
		return (TRUE) ;
	}
956677
public int size() {
        // Since the sets are disjoint, we can simple sum their sizes
        int size = 0;
        for (Set<T> s : sets)
            size += s.size();
        return size;
    }
510727
def _round_to_next_multiple(n, m):
    
    return n if n % m == 0 else n + m - n % m
739743
public static int median(final Object[] a, int start, int end, Comparator<Object> cmp)
    {
        final int m = start + ((end - start) / 2);
        int smallest = start;

        if (cmp.compare(a[smallest], a[m]) > 0) {
            smallest = m;
        }
        if (cmp.compare(a[smallest], a[end]) > 0) {
            smallest = end;
        }

        if (smallest == start) {
            return (cmp.compare(a[m], a[end]) < 0) ? m : end;
        }
        if (smallest == m) {
            return (cmp.compare(a[start], a[end]) < 0) ? start : end;
        }
        return (cmp.compare(a[start], a[m]) < 0) ? start : m;
    }
1159675
def lcm(num1, num2):
    

    if num1 > num2:
        bigger = num1
    else:
        bigger = num2
    while True:
        if bigger % num1 == 0 and bigger % num2 == 0:
            return bigger
        bigger += 1
1111640
def gcd(a, b)
            if b == 0
                return [a, 1, 0]
            else
                n = (a*1.0/b).floor
                c = a % b
                r = gcd(b, c)
                return [r[0], r[2], r[1]-r[2]*n]
            end
        end
662603
function() {
    var M = this.dup(), els;
    var n = this.elements.length, k = n, i, np, kp = this.elements[0].length, p;
    do { i = k - n;
      if (M.elements[i][i] == 0) {
        for (j = i + 1; j < k; j++) {
          if (M.elements[j][i] != 0) {
            els = []; np = kp;
            do { p = kp - np;
              els.push(M.elements[i][p] + M.elements[j][p]);
            } while (--np);
            M.elements[i] = els;
            break;
          }
        }
      }
      if (M.elements[i][i] != 0) {
        for (j = i + 1; j < k; j++) {
          var multiplier = M.elements[j][i] / M.elements[i][i];
          els = []; np = kp;
          do { p = kp - np;
            // Elements with column numbers up to an including the number
            // of the row that we're subtracting can safely be set straight to
            // zero, since that's the point of this routine and it avoids having
            // to loop over and correct rounding errors later
            els.push(p <= i ? 0 : M.elements[j][p] - M.elements[i][p] * multiplier);
          } while (--np);
          M.elements[j] = els;
        }
      }
    } while (--n);
    return M;
  }
690272
public T getMinimum() {
        Lock lock = this.lock.readLock();
        lock.lock();
        try {
            return this.minimum != null ? this.minimum : (T)this.math.createZeroValue();
        } finally {
            lock.unlock();
        }
    }