当前位置: 首页>>代码示例>>Java>>正文


Java Max类代码示例

本文整理汇总了Java中org.apache.commons.math.stat.descriptive.rank.Max的典型用法代码示例。如果您正苦于以下问题:Java Max类的具体用法?Java Max怎么用?Java Max使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Max类属于org.apache.commons.math.stat.descriptive.rank包,在下文中一共展示了Max类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MultivariateSummaryStatistics

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
/**
 * Construct a MultivariateSummaryStatistics instance
 * @param k dimension of the data
 * @param isCovarianceBiasCorrected if true, the unbiased sample
 * covariance is computed, otherwise the biased population covariance
 * is computed
 */
public MultivariateSummaryStatistics(int k, boolean isCovarianceBiasCorrected) {
    this.k = k;

    sumImpl     = new StorelessUnivariateStatistic[k];
    sumSqImpl   = new StorelessUnivariateStatistic[k];
    minImpl     = new StorelessUnivariateStatistic[k];
    maxImpl     = new StorelessUnivariateStatistic[k];
    sumLogImpl  = new StorelessUnivariateStatistic[k];
    geoMeanImpl = new StorelessUnivariateStatistic[k];
    meanImpl    = new StorelessUnivariateStatistic[k];

    for (int i = 0; i < k; ++i) {
        sumImpl[i]     = new Sum();
        sumSqImpl[i]   = new SumOfSquares();
        minImpl[i]     = new Min();
        maxImpl[i]     = new Max();
        sumLogImpl[i]  = new SumOfLogs();
        geoMeanImpl[i] = new GeometricMean();
        meanImpl[i]    = new Mean();
    }

    covarianceImpl =
        new VectorialCovariance(k, isCovarianceBiasCorrected);

}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:33,代码来源:MultivariateSummaryStatistics.java

示例2: export

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
@Override
public void export(RandomAccessMDLReader reader, EncodingFingerprint fingerprinter, String label, File outputFile, boolean useAromaticFlag) {
	DecimalFormat df = new DecimalFormat();
	double[] features = new double[reader.getSize()];
	
	Long start = System.currentTimeMillis();
	for (int indexMol = 0; indexMol < reader.getSize(); indexMol++) {
		if ((indexMol != 0) && (indexMol % 1000 == 0))
			System.out.println("encodings/s = " 
					+ df.format(((double) indexMol) / ((double) ((System.currentTimeMillis() - start) / 1000))) 
					+ "\t(mappings so far = " + indexMol + ", @" 
					+ df.format(((double) indexMol / (double) reader.getSize()) * 100) + "%)");

		IAtomContainer mol = reader.getMol(indexMol);
		FeatureMap featureMap = new FeatureMap(fingerprinter.getFingerprint(mol));
		features[indexMol] = featureMap.getKeySet().size();
	}
	Long end = System.currentTimeMillis();
	
	Mean mean = new Mean();
	StandardDeviation stdv = new StandardDeviation();
	Max max = new Max();
	Median median = new Median();

	System.out.println("Time elapsed: " + (end - start) + " ms");
	System.out.println("mol/s = " + df.format(reader.getSize() / ((double) (end - start) / 1000)));
	System.out.println("no. features = " + df.format(mean.evaluate(features)) + "\t" + df.format(stdv.evaluate(features)));
	System.out.println("Max = " + df.format(max.evaluate(features)));
	System.out.println("Median = " + df.format(median.evaluate(features)));
}
 
开发者ID:fortiema,项目名称:jCompoundMapper,代码行数:31,代码来源:ExporterBenchmark.java

示例3: Histogram

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
public Histogram(FrequencyDistribution frequencyDistribution) {
    this.frequencyDistribution = frequencyDistribution;
    frequencies = frequencyDistribution.frequencies();
    minFrequency = new Min().evaluate(frequencies);
    maxFrequency = new Max().evaluate(frequencies);
    medianBin = frequencyDistribution.medianBin();
    quartileBins = frequencyDistribution.quartileBins();
    quintileBins = frequencyDistribution.quintileBins();
    decileBins = frequencyDistribution.decileBins();
    overlay = new Polygon();
    build();
}
 
开发者ID:objektwerks,项目名称:swing,代码行数:13,代码来源:Histogram.java

示例4: SummaryStatisticsImpl

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
/**
 * Construct a SummaryStatistics
 */
public SummaryStatisticsImpl() {
    sum = new Sum();
    sumsq = new SumOfSquares();
    min = new Min();
    max = new Max();
    sumLog = new SumOfLogs();
    geoMean = new GeometricMean();
    secondMoment = new SecondMoment();
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:13,代码来源:SummaryStatisticsImpl.java

示例5: performCalculation

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
private void performCalculation(double[] values, int type) {

        Mean meanCalculator = new Mean();
        double mean = meanCalculator.evaluate(values);

        Max maxCalculator = new Max();
        double max = maxCalculator.evaluate(values);

        Min minCalculator = new Min();
        double min = minCalculator.evaluate(values);

        StandardDeviation standardDeviationCalculator = new StandardDeviation();
        double stdDeviation = standardDeviationCalculator.evaluate(values);

        if (type == MotifStats.WORKFLOW) {
            MotifStats.setMinWorkflowAppearance(min);
            MotifStats.setMaxWorkflowAppearance(max);
            MotifStats.setMeanWorkflowAppearance(mean);
            MotifStats.setStdDeviationWorkflowUsage(stdDeviation);
        } else if (type == MotifStats.USAGE) {
            MotifStats.setMinUsage(min);
            MotifStats.setMaxUsage(max);
            MotifStats.setMeanUsage(mean);
            MotifStats.setStdDeviationUsage(stdDeviation);
        } else if (type == MotifStats.MSP) {
            MotifStats.setMinMSP(min);
            MotifStats.setMaxMSP(max);
            MotifStats.setMeanMSP(mean);
            MotifStats.setStdDeviationMSP(stdDeviation);
        }
    }
 
开发者ID:ISA-tools,项目名称:Automacron,代码行数:32,代码来源:MotifStatCalculator.java

示例6: copy

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
/**
 * Copies source to dest.
 * <p>Neither source nor dest can be null.</p>
 *
 * @param source SummaryStatistics to copy
 * @param dest SummaryStatistics to copy to
 * @throws NullPointerException if either source or dest is null
 */
public static void copy(SummaryStatistics source, SummaryStatistics dest) {
    dest.maxImpl = source.maxImpl.copy();
    dest.meanImpl = source.meanImpl.copy();
    dest.minImpl = source.minImpl.copy();
    dest.sumImpl = source.sumImpl.copy();
    dest.varianceImpl = source.varianceImpl.copy();
    dest.sumLogImpl = source.sumLogImpl.copy();
    dest.sumsqImpl = source.sumsqImpl.copy();
    if (source.getGeoMeanImpl() instanceof GeometricMean) {
        // Keep geoMeanImpl, sumLogImpl in synch
        dest.geoMeanImpl = new GeometricMean((SumOfLogs) dest.sumLogImpl);
    } else {
        dest.geoMeanImpl = source.geoMeanImpl.copy();
    }
    SecondMoment.copy(source.secondMoment, dest.secondMoment);
    dest.n = source.n;

    // Make sure that if stat == statImpl in source, same
    // holds in dest; otherwise copy stat
    if (source.geoMean == source.geoMeanImpl) {
        dest.geoMean = (GeometricMean) dest.geoMeanImpl;
    } else {
        GeometricMean.copy(source.geoMean, dest.geoMean);
    }
    if (source.max == source.maxImpl) {
        dest.max = (Max) dest.maxImpl;
    } else {
        Max.copy(source.max, dest.max);
    }
    if (source.mean == source.meanImpl) {
        dest.mean = (Mean) dest.meanImpl;
    } else {
        Mean.copy(source.mean, dest.mean);
    }
    if (source.min == source.minImpl) {
        dest.min = (Min) dest.minImpl;
    } else {
        Min.copy(source.min, dest.min);
    }
    if (source.sum == source.sumImpl) {
        dest.sum = (Sum) dest.sumImpl;
    } else {
        Sum.copy(source.sum, dest.sum);
    }
    if (source.variance == source.varianceImpl) {
        dest.variance = (Variance) dest.varianceImpl;
    } else {
        Variance.copy(source.variance, dest.variance);
    }
    if (source.sumLog == source.sumLogImpl) {
        dest.sumLog = (SumOfLogs) dest.sumLogImpl;
    } else {
        SumOfLogs.copy(source.sumLog, dest.sumLog);
    }
    if (source.sumsq == source.sumsqImpl) {
        dest.sumsq = (SumOfSquares) dest.sumsqImpl;
    } else {
        SumOfSquares.copy(source.sumsq, dest.sumsq);
    }
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:69,代码来源:SummaryStatistics.java

示例7: copy

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
/**
 * Copies source to dest.
 * <p>Neither source nor dest can be null.</p>
 *
 * @param source SummaryStatistics to copy
 * @param dest SummaryStatistics to copy to
 * @throws NullArgumentException if either source or dest is null
 */
public static void copy(SummaryStatistics source, SummaryStatistics dest)
    throws NullArgumentException {
    MathUtils.checkNotNull(source);
    MathUtils.checkNotNull(dest);
    dest.maxImpl = source.maxImpl.copy();
    dest.meanImpl = source.meanImpl.copy();
    dest.minImpl = source.minImpl.copy();
    dest.sumImpl = source.sumImpl.copy();
    dest.varianceImpl = source.varianceImpl.copy();
    dest.sumLogImpl = source.sumLogImpl.copy();
    dest.sumsqImpl = source.sumsqImpl.copy();
    if (source.getGeoMeanImpl() instanceof GeometricMean) {
        // Keep geoMeanImpl, sumLogImpl in synch
        dest.geoMeanImpl = new GeometricMean((SumOfLogs) dest.sumLogImpl);
    } else {
        dest.geoMeanImpl = source.geoMeanImpl.copy();
    }
    SecondMoment.copy(source.secondMoment, dest.secondMoment);
    dest.n = source.n;

    // Make sure that if stat == statImpl in source, same
    // holds in dest; otherwise copy stat
    if (source.geoMean == source.geoMeanImpl) {
        dest.geoMean = (GeometricMean) dest.geoMeanImpl;
    } else {
        GeometricMean.copy(source.geoMean, dest.geoMean);
    }
    if (source.max == source.maxImpl) {
        dest.max = (Max) dest.maxImpl;
    } else {
        Max.copy(source.max, dest.max);
    }
    if (source.mean == source.meanImpl) {
        dest.mean = (Mean) dest.meanImpl;
    } else {
        Mean.copy(source.mean, dest.mean);
    }
    if (source.min == source.minImpl) {
        dest.min = (Min) dest.minImpl;
    } else {
        Min.copy(source.min, dest.min);
    }
    if (source.sum == source.sumImpl) {
        dest.sum = (Sum) dest.sumImpl;
    } else {
        Sum.copy(source.sum, dest.sum);
    }
    if (source.variance == source.varianceImpl) {
        dest.variance = (Variance) dest.varianceImpl;
    } else {
        Variance.copy(source.variance, dest.variance);
    }
    if (source.sumLog == source.sumLogImpl) {
        dest.sumLog = (SumOfLogs) dest.sumLogImpl;
    } else {
        SumOfLogs.copy(source.sumLog, dest.sumLog);
    }
    if (source.sumsq == source.sumsqImpl) {
        dest.sumsq = (SumOfSquares) dest.sumsqImpl;
    } else {
        SumOfSquares.copy(source.sumsq, dest.sumsq);
    }
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:72,代码来源:SummaryStatistics.java

示例8: copy

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
/**
 * Copies source to dest.
 * <p>Neither source nor dest can be null.</p>
 * 
 * @param source SummaryStatistics to copy
 * @param dest SummaryStatistics to copy to
 * @throws NullPointerException if either source or dest is null
 */
public static void copy(SummaryStatistics source, SummaryStatistics dest) {
    dest.maxImpl = source.maxImpl.copy();
    dest.meanImpl = source.meanImpl.copy();
    dest.minImpl = source.minImpl.copy();
    dest.sumImpl = source.sumImpl.copy();
    dest.varianceImpl = source.varianceImpl.copy();
    dest.sumLogImpl = source.sumLogImpl.copy();
    dest.sumsqImpl = source.sumsqImpl.copy();
    if (source.getGeoMeanImpl() instanceof GeometricMean) {
        // Keep geoMeanImpl, sumLogImpl in synch
        dest.geoMeanImpl = new GeometricMean((SumOfLogs) dest.sumLogImpl);
    } else {
        dest.geoMeanImpl = source.geoMeanImpl.copy();
    }
    SecondMoment.copy(source.secondMoment, dest.secondMoment);
    dest.n = source.n;
    
    // Make sure that if stat == statImpl in source, same
    // holds in dest; otherwise copy stat
    if (source.geoMean == source.geoMeanImpl) {
        dest.geoMean = (GeometricMean) dest.geoMeanImpl;
    } else {
        GeometricMean.copy(source.geoMean, dest.geoMean);
    } 
    if (source.max == source.maxImpl) {
        dest.max = (Max) dest.maxImpl;
    } else {
        Max.copy(source.max, dest.max);
    } 
    if (source.mean == source.meanImpl) {
        dest.mean = (Mean) dest.meanImpl;
    } else {
        Mean.copy(source.mean, dest.mean);
    } 
    if (source.min == source.minImpl) {
        dest.min = (Min) dest.minImpl;
    } else {
        Min.copy(source.min, dest.min);
    } 
    if (source.sum == source.sumImpl) {
        dest.sum = (Sum) dest.sumImpl;
    } else {
        Sum.copy(source.sum, dest.sum);
    } 
    if (source.variance == source.varianceImpl) {
        dest.variance = (Variance) dest.varianceImpl;
    } else {
        Variance.copy(source.variance, dest.variance);
    } 
    if (source.sumLog == source.sumLogImpl) {
        dest.sumLog = (SumOfLogs) dest.sumLogImpl;
    } else {
        SumOfLogs.copy(source.sumLog, dest.sumLog);
    } 
    if (source.sumsq == source.sumsqImpl) {
        dest.sumsq = (SumOfSquares) dest.sumsqImpl;
    } else {
        SumOfSquares.copy(source.sumsq, dest.sumsq);
    } 
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:69,代码来源:SummaryStatistics.java

示例9: getMax

import org.apache.commons.math.stat.descriptive.rank.Max; //导入依赖的package包/类
/** 
 * Returns the maximum of the available values
 * @return The max or Double.NaN if no values have been added.
 */
public double getMax() {
    return apply(new Max());
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:8,代码来源:DescriptiveStatistics.java


注:本文中的org.apache.commons.math.stat.descriptive.rank.Max类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。