• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EquationsMapper类的典型用法和代码示例

java 1次浏览

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

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

示例1: GraggBulirschStoerStepInterpolator

点赞 3

import org.apache.commons.math3.ode.EquationsMapper; //导入依赖的package包/类
/** Simple constructor.
 * @param y reference to the integrator array holding the current state
 * @param y0Dot reference to the integrator array holding the slope
 * at the beginning of the step
 * @param y1 reference to the integrator array holding the state at
 * the end of the step
 * @param y1Dot reference to the integrator array holding the slope
 * at the end of the step
 * @param yMidDots reference to the integrator array holding the
 * derivatives at the middle point of the step
 * @param forward integration direction indicator
 * @param primaryMapper equations mapper for the primary equations set
 * @param secondaryMappers equations mappers for the secondary equations sets
 */
GraggBulirschStoerStepInterpolator(final double[] y, final double[] y0Dot,
                                   final double[] y1, final double[] y1Dot,
                                   final double[][] yMidDots,
                                   final boolean forward,
                                   final EquationsMapper primaryMapper,
                                   final EquationsMapper[] secondaryMappers) {

  super(y, forward, primaryMapper, secondaryMappers);
  this.y0Dot    = y0Dot;
  this.y1       = y1;
  this.y1Dot    = y1Dot;
  this.yMidDots = yMidDots;

  resetTables(yMidDots.length + 4);

}
 

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

示例2: reinitialize

点赞 3

import org.apache.commons.math3.ode.EquationsMapper; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void reinitialize(final AbstractIntegrator integrator,
                         final double[] y, final double[][] yDotK, final boolean forward,
                         final EquationsMapper primaryMapper,
                         final EquationsMapper[] secondaryMappers) {

  super.reinitialize(integrator, y, yDotK, forward, primaryMapper, secondaryMappers);

  final int dimension = currentState.length;

  yDotKLast = new double[3][];
  for (int k = 0; k < yDotKLast.length; ++k) {
    yDotKLast[k] = new double[dimension];
  }

  v = new double[7][];
  for (int k = 0; k < v.length; ++k) {
    v[k]  = new double[dimension];
  }

  vectorsInitialized = false;

}
 

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

示例3: AbstractStepInterpolator

点赞 3

import org.apache.commons.math3.ode.EquationsMapper; //导入依赖的package包/类
/** Simple constructor.
 * @param y reference to the integrator array holding the state at
 * the end of the step
 * @param forward integration direction indicator
 * @param primaryMapper equations mapper for the primary equations set
 * @param secondaryMappers equations mappers for the secondary equations sets
 */
protected AbstractStepInterpolator(final double[] y, final boolean forward,
                                   final EquationsMapper primaryMapper,
                                   final EquationsMapper[] secondaryMappers) {

  globalPreviousTime    = Double.NaN;
  globalCurrentTime     = Double.NaN;
  softPreviousTime      = Double.NaN;
  softCurrentTime       = Double.NaN;
  h                     = Double.NaN;
  interpolatedTime      = Double.NaN;
  currentState          = y;
  finalized             = false;
  this.forward          = forward;
  this.dirtyState       = true;
  this.primaryMapper    = primaryMapper;
  this.secondaryMappers = (secondaryMappers == null) ? null : secondaryMappers.clone();
  allocateInterpolatedArrays(y.length);

}
 

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

示例4: reinitialize

点赞 3

import org.apache.commons.math3.ode.EquationsMapper; //导入依赖的package包/类
/** Reinitialize the instance
 * @param y reference to the integrator array holding the state at the end of the step
 * @param isForward integration direction indicator
 * @param primary equations mapper for the primary equations set
 * @param secondary equations mappers for the secondary equations sets
 */
protected void reinitialize(final double[] y, final boolean isForward,
                            final EquationsMapper primary,
                            final EquationsMapper[] secondary) {

  globalPreviousTime    = Double.NaN;
  globalCurrentTime     = Double.NaN;
  softPreviousTime      = Double.NaN;
  softCurrentTime       = Double.NaN;
  h                     = Double.NaN;
  interpolatedTime      = Double.NaN;
  currentState          = y;
  finalized             = false;
  this.forward          = isForward;
  this.dirtyState       = true;
  this.primaryMapper    = primary;
  this.secondaryMappers = secondary.clone();
  allocateInterpolatedArrays(y.length);

}
 

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

示例5: getCompleteState

点赞 3

import org.apache.commons.math3.ode.EquationsMapper; //导入依赖的package包/类
/** Get the complete state (primary and secondary).
 * @param interpolator interpolator to use
 * @return complete state
 */
private double[] getCompleteState(final StepInterpolator interpolator) {

    final double[] complete = new double[expandable.getTotalDimension()];

    expandable.getPrimaryMapper().insertEquationData(interpolator.getInterpolatedState(),
                                                     complete);
    int index = 0;
    for (EquationsMapper secondary : expandable.getSecondaryMappers()) {
        secondary.insertEquationData(interpolator.getInterpolatedSecondaryState(index++),
                                     complete);
    }

    return complete;

}
 

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

示例6: GraggBulirschStoerStepInterpolator

点赞 3

import org.apache.commons.math3.ode.EquationsMapper; //导入依赖的package包/类
/** Simple constructor.
 * @param y reference to the integrator array holding the current state
 * @param y0Dot reference to the integrator array holding the slope
 * at the beginning of the step
 * @param y1 reference to the integrator array holding the state at
 * the end of the step
 * @param y1Dot reference to the integrator array holding the slope
 * at the end of the step
 * @param yMidDots reference to the integrator array holding the
 * derivatives at the middle point of the step
 * @param forward integration direction indicator
 * @param primaryMapper equations mapper for the primary equations set
 * @param secondaryMappers equations mappers for the secondary equations sets
 */
public GraggBulirschStoerStepInterpolator(final double[] y, final double[] y0Dot,
                                          final double[] y1, final double[] y1Dot,
                                          final double[][] yMidDots,
                                          final boolean forward,
                                          final EquationsMapper primaryMapper,
                                          final EquationsMapper[] secondaryMappers) {

  super(y, forward, primaryMapper, secondaryMappers);
  this.y0Dot    = y0Dot;
  this.y1       = y1;
  this.y1Dot    = y1Dot;
  this.yMidDots = yMidDots;

  resetTables(yMidDots.length + 4);

}
 

开发者ID:Quanticol,
项目名称:CARMA,
代码行数:31,
代码来源:GraggBulirschStoerStepInterpolator.java

示例7: noReset

点赞 3

import org.apache.commons.math3.ode.EquationsMapper; //导入依赖的package包/类
@Test
public void noReset() throws MaxCountExceededException {

  double[]   y    =   { 0.0, 1.0, -2.0 };
  double[][] yDot = { { 1.0, 2.0, -2.0 } };
  EulerStepInterpolator interpolator = new EulerStepInterpolator();
  interpolator.reinitialize(new DummyIntegrator(interpolator), y, yDot, true,
                            new EquationsMapper(0, y.length),
                            new EquationsMapper[0]);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  double[] result = interpolator.getInterpolatedState();
  for (int i = 0; i < result.length; ++i) {
    Assert.assertTrue(FastMath.abs(result[i] - y[i]) < 1.0e-10);
  }

}
 

开发者ID:Quanticol,
项目名称:CARMA,
代码行数:20,
代码来源:EulerStepInterpolatorTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)