Estimate parameters from minimum and maximum observed.

@param mm Minimum and Maximum
@return Estimation
339593
public UniformDistribution estimate(DoubleMinMax mm) {
    return new UniformDistribution(Math.max(mm.getMin(), -Double.MAX_VALUE), Math.min(mm.getMax(), Double.MAX_VALUE));
  }
606618
public int getMin() {
        List<Integer> value = new ArrayList<Integer>();
        for (AnalysisType at : analysisType) {
            value.add(at.getValue());
        }
        return Collections.min(value);
    }
28801
public static float min(float[] x) {
        float m = Float.POSITIVE_INFINITY;

        for (float n : x) {
            if (n < m) {
                m = n;
            }
        }

        return m;
    }
95616
@SuppressWarnings("unchecked")
	public static <T extends Comparable<? super T>> T min(T... numberArray) {
		return ArrayUtil.min(numberArray);
	}
430153
public double getDouble(final double min, final double max) {
		return min(min, max) + getDouble(abs(max - min));
	}
1338314
public static double getRandomDouble(double min, double max) {
		Random r = new Random();
		return min + (max - min) * r.nextDouble();
	}
1137366
def Fgamma(m,x):
    
    SMALL=1e-12
    x = max(x,SMALL)
    return 0.5*pow(x,-m-0.5)*gamm_inc(m+0.5,x)
160981
public static <A> double[] samLMR(A sorted, NumberArrayAdapter<?, A> adapter, int nmom) {
    final int n = adapter.size(sorted);
    final double[] sum = new double[nmom];
    nmom = n < nmom ? n : nmom;
    // Estimate probability weighted moments (unbiased)
    for(int i = 0; i < n; i++) {
      double term = adapter.getDouble(sorted, i);
      // Robustness: skip bad values
      if(Double.isInfinite(term) || Double.isNaN(term)) {
        continue;
      }
      sum[0] += term;
      for(int j = 1, z = i; j < nmom; j++, z--) {
        term *= z;
        sum[j] += term;
      }
    }
    // Normalize by "n choose (j + 1)"
    sum[0] /= n;
    double z = n;
    for(int j = 1; j < nmom; j++) {
      z *= n - j;
      sum[j] /= z;
    }
    normalizeLMR(sum, nmom);
    // Handle case when lambda2 == 0, by setting tau3...tauN = 0:
    if(sum[1] == 0) {
      for(int i = 2; i < nmom; i++) {
        sum[i] = 0.; // tau3...tauN = 0.
      }
      return sum;
    }
    // Map lambda3...lambdaN to tau3...tauN
    for(int i = 2; i < nmom; i++) {
      sum[i] /= sum[1];
    }
    return sum;
  }
385991
public static int minimumSampleSizeForGivenDandMaximumRisk(double d, double aLevel, double populationStd, int populationN) {
        if(populationN<=0 || aLevel<=0 || d<=0) {
            throw new IllegalArgumentException("All the parameters must be positive.");
        }
        
        double a = 1.0 - aLevel/2.0;
        
        double Za = ContinuousDistributions.gaussInverseCdf(a);
        
        double V = Math.pow(d/Za,2);
        double Ssquare = populationStd*populationStd;
        double minimumSampleN = (Ssquare/V) * (1.0 / (1.0 + Ssquare/(populationN*V)) );
        /*
        double minimumSampleN=populationN/(
            1.0+populationN*pow(d/(Za*populationStd),2)
        );
        */
        return (int)Math.ceil(minimumSampleN);
    }
76983
public com.google.api.ads.adwords.axis.v201809.cm.ComparableValue getMin() {
        return min;
    }
638393
public static int min(int[] x) {
        int m = x[0];

        for (int n : x) {
            if (n < m) {
                m = n;
            }
        }

        return m;
    }
155400
def getModelPosterior(self,min):
        
        Sigma = self.getLaplaceCovar(min)
        n_params = self.vd.getNumberScales()
        ModCompl = 0.5*n_params*SP.log(2*SP.pi)+0.5*SP.log(SP.linalg.det(Sigma))
        RV = min['LML']+ModCompl
        return RV
61662
def _dM(self, k, t, param, M, tips=None, gaps=None):
        """"""
        if self._distributionmodel:
            return self.model.dM(k, t, param, M, tips, gaps)
        else:
            return self.model.dM(t, param, M, tips, gaps)
1035253
public static void minMax(Integer min, Integer max) {
		if(!validation) return;
		Validate.notNull(min);
		Validate.notNull(max);
		if(min > max)
			throw new ParameterException(ErrorCode.RANGEVIOLATION, "Minumum is bigger than maximum.");
	}
400497
private boolean MMM(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) {
        return originX >= minX && originY >= minY && originZ >= minZ
            && s_xy * minX - maxY + c_xy <= 0.0f
            && s_yx * minY - maxX + c_yx <= 0.0f
            && s_zy * minZ - maxY + c_zy <= 0.0f
            && s_yz * minY - maxZ + c_yz <= 0.0f
            && s_xz * minX - maxZ + c_xz <= 0.0f
            && s_zx * minZ - maxX + c_zx <= 0.0f;
    }
828117
function getMinimum() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        return Math.min.apply(Math, args);
    }
691514
public static int argmax(double[] v) {
    assert (v.length > 0);
    int maxIndex = 0;
    double currentMax = v[0];
    for(int i = 1; i < v.length; i++) {
      final double x = v[i];
      if(x > currentMax) {
        maxIndex = i;
        currentMax = x;
      }
    }
    return maxIndex;
  }