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


Java LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS属性代码示例

本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS属性的具体用法?Java LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS怎么用?Java LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.commons.math3.exception.util.LocalizedFormats的用法示例。


在下文中一共展示了LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MultistepFieldIntegrator

/**
 * Build a multistep integrator with the given stepsize bounds.
 * <p>The default starter integrator is set to the {@link
 * DormandPrince853FieldIntegrator Dormand-Prince 8(5,3)} integrator with
 * some defaults settings.</p>
 * <p>
 * The default max growth factor is set to a quite low value: 2<sup>1/order</sup>.
 * </p>
 * @param field field to which the time and state vector elements belong
 * @param name name of the method
 * @param nSteps number of steps of the multistep method
 * (excluding the one being computed)
 * @param order order of the method
 * @param minStep minimal step (must be positive even for backward
 * integration), the last step can be smaller than this
 * @param maxStep maximal step (must be positive even for backward
 * integration)
 * @param scalAbsoluteTolerance allowed absolute error
 * @param scalRelativeTolerance allowed relative error
 * @exception NumberIsTooSmallException if number of steps is smaller than 2
 */
protected MultistepFieldIntegrator(final Field<T> field, final String name,
                                   final int nSteps, final int order,
                                   final double minStep, final double maxStep,
                                   final double scalAbsoluteTolerance,
                                   final double scalRelativeTolerance)
    throws NumberIsTooSmallException {

    super(field, name, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);

    if (nSteps < 2) {
        throw new NumberIsTooSmallException(
              LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS,
              nSteps, 2, true);
    }

    starter = new DormandPrince853FieldIntegrator<T>(field, minStep, maxStep,
                                                     scalAbsoluteTolerance,
                                                     scalRelativeTolerance);
    this.nSteps = nSteps;

    exp = -1.0 / order;

    // set the default values of the algorithm control parameters
    setSafety(0.9);
    setMinReduction(0.2);
    setMaxGrowth(FastMath.pow(2.0, -exp));

}
 
开发者ID:biocompibens,项目名称:SME,代码行数:49,代码来源:MultistepFieldIntegrator.java

示例2: MultistepIntegrator

/**
 * Build a multistep integrator with the given stepsize bounds.
 * <p>The default starter integrator is set to the {@link
 * DormandPrince853Integrator Dormand-Prince 8(5,3)} integrator with
 * some defaults settings.</p>
 * <p>
 * The default max growth factor is set to a quite low value: 2<sup>1/order</sup>.
 * </p>
 * @param name name of the method
 * @param nSteps number of steps of the multistep method
 * (excluding the one being computed)
 * @param order order of the method
 * @param minStep minimal step (must be positive even for backward
 * integration), the last step can be smaller than this
 * @param maxStep maximal step (must be positive even for backward
 * integration)
 * @param scalAbsoluteTolerance allowed absolute error
 * @param scalRelativeTolerance allowed relative error
 * @exception NumberIsTooSmallException if number of steps is smaller than 2
 */
protected MultistepIntegrator(final String name, final int nSteps,
                              final int order,
                              final double minStep, final double maxStep,
                              final double scalAbsoluteTolerance,
                              final double scalRelativeTolerance)
    throws NumberIsTooSmallException {

    super(name, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance);

    if (nSteps < 2) {
        throw new NumberIsTooSmallException(
              LocalizedFormats.INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS,
              nSteps, 2, true);
    }

    starter = new DormandPrince853Integrator(minStep, maxStep,
                                             scalAbsoluteTolerance,
                                             scalRelativeTolerance);
    this.nSteps = nSteps;

    exp = -1.0 / order;

    // set the default values of the algorithm control parameters
    setSafety(0.9);
    setMinReduction(0.2);
    setMaxGrowth(FastMath.pow(2.0, -exp));

}
 
开发者ID:biocompibens,项目名称:SME,代码行数:48,代码来源:MultistepIntegrator.java


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