Пример #1
0
  @Override
  public DerivativeStructure value(final DerivativeStructure t) throws DimensionMismatchException {
    int params = 1;
    int order = t.getOrder() + 1;
    DerivativeStructure x = new DerivativeStructure(params, order, 0, t.getReal());
    DerivativeStructure y = f.value(x);

    return y;
  }
Пример #2
0
  @Override
  public double value(final double xRealValue) {
    int params = 1;
    int order = 1;
    DerivativeStructure x = new DerivativeStructure(params, order, 0, xRealValue);
    DerivativeStructure y = f.value(x);

    return y.getPartialDerivative(1);
  }