• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Min类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: netBasisAllBonds

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的package包/类
@Test
/**
 * Tests the net basis of all bonds computed from the curves.
 */
public void netBasisAllBonds() {
  //final double priceFuture = 1.0320;
  final double priceFuture = METHOD_FUT_SEC_DSC.price(BOND_FUTURE, ISSUER_MULTICURVES);
  final double[] netBasisComputed = METHOD_FUT_SEC_DSC.netBasisAllBonds(BOND_FUTURE, ISSUER_MULTICURVES, priceFuture);
  final double[] netBasisExpected = new double[NB_BOND];
  for (int loopbasket = 0; loopbasket < NB_BOND; loopbasket++) {
    final double bondDirtyPriceForward = METHOD_BOND_SEC.dirtyPriceFromCurves(BOND_FUTURE.getDeliveryBasketAtDeliveryDate()[loopbasket], ISSUER_MULTICURVES);
    netBasisExpected[loopbasket] = bondDirtyPriceForward - (priceFuture * CONVERSION_FACTOR[loopbasket] + BOND_FUTURE.getDeliveryBasketAtDeliveryDate()[loopbasket].getAccruedInterest());
    assertEquals("Bond future security Discounting Method: netBasis", netBasisExpected[loopbasket], netBasisComputed[loopbasket], 1.0E-10);
  }
  final Min minFunction = new Min();
  final double netBasisMin = minFunction.evaluate(netBasisComputed);
  final double priceFutureFromNetBasis = METHOD_FUT_SEC_DSC.priceFromNetBasis(BOND_FUTURE, ISSUER_MULTICURVES, netBasisMin);
  assertEquals("Bond future security Discounting Method: netBasis", priceFuture, priceFutureFromNetBasis, 1.0E-10);
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:20,代码来源:BondFuturesSecurityDiscountingMethodTest.java


示例2: netBasisAllBonds

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的package包/类
/**
 * Tests the net basis of all bonds computed from the curves.
 */
@Test
public void netBasisAllBonds() {
  //final double priceFuture = 1.0320;
  final double priceFuture = METHOD_FUT_DSC.price(BOND_FUTURE, ISSUER_MULTICURVES);
  final double[] netBasisComputed = METHOD_FUT_DSC.netBasisAllBonds(BOND_FUTURE, ISSUER_MULTICURVES, priceFuture);
  final double[] netBasisExpected = new double[NB_BOND];
  for (int loopbasket = 0; loopbasket < NB_BOND; loopbasket++) {
    final double bondPriceForward = METHOD_BOND.dirtyPriceFromCurves(BOND_FUTURE.getDeliveryBasket()[loopbasket], ISSUER_MULTICURVES);
    netBasisExpected[loopbasket] = bondPriceForward - (priceFuture * CONVERSION_FACTOR[loopbasket] + BOND_FUTURE.getDeliveryBasket()[loopbasket].getAccruedInterest());
    assertEquals("Bond future security Discounting Method: netBasis", netBasisExpected[loopbasket], netBasisComputed[loopbasket], 1.0E-10);
  }
  final Min minFunction = new Min();
  final double netBasisMin = minFunction.evaluate(netBasisComputed);
  final double priceFutureFromNetBasis = METHOD_FUT_DSC.priceFromNetBasis(BOND_FUTURE, ISSUER_MULTICURVES, netBasisMin);
  assertEquals("Bond future security Discounting Method: netBasis", priceFuture, priceFutureFromNetBasis, 1.0E-10);
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:20,代码来源:BondFutureDiscountingMethodTest.java


示例3: MultivariateSummaryStatistics

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的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


示例4: Histogram

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的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


示例5: SummaryStatisticsImpl

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的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


示例6: performCalculation

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的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


示例7: copy

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的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


示例8: copy

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的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


示例9: copy

import org.apache.commons.math.stat.descriptive.rank.Min; //导入依赖的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


示例10: getMin

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MovieDbException类代码示例发布时间:2022-05-22
下一篇:
Java Hallmark类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap