Package org.apache.commons.math3.analysis.differentiation

Examples of org.apache.commons.math3.analysis.differentiation.DerivativeStructure.negate()


    @Override
    public DerivativeStructure[] value(DerivativeStructure[] variables) {
        DerivativeStructure x1 = variables[0];
        DerivativeStructure x2 = variables[1];
        return new DerivativeStructure[] {
            x1.subtract(13.0).add(x2.negate().add(5.0).multiply(x2).subtract(2).multiply(x2)),
            x1.subtract(29.0).add(x2.add(1).multiply(x2).subtract(14).multiply(x2))
        };
    }

  }
View Full Code Here


      DerivativeStructure t  = sum.multiply(2.0 / m).add(1);
      DerivativeStructure[] f = new DerivativeStructure[m];
      for (int i = 0; i < n; ++i) {
        f[i] = variables[i].subtract(t);
      }
      Arrays.fill(f, n, m, t.negate());
      return f;
    }

  }
View Full Code Here

      DerivativeStructure t  = sum.multiply(2.0 / m).add(1);
      DerivativeStructure[] f = new DerivativeStructure[m];
      for (int i = 0; i < n; ++i) {
        f[i] = variables[i].subtract(t);
      }
      Arrays.fill(f, n, m, t.negate());
      return f;
    }

  }
View Full Code Here

    @Override
    public DerivativeStructure[] value(DerivativeStructure[] variables) {
        DerivativeStructure x1 = variables[0];
        DerivativeStructure x2 = variables[1];
        return new DerivativeStructure[] {
            x1.subtract(13.0).add(x2.negate().add(5.0).multiply(x2).subtract(2).multiply(x2)),
            x1.subtract(29.0).add(x2.add(1).multiply(x2).subtract(14).multiply(x2))
        };
    }

  }
View Full Code Here

        } else if (token.equals("imag")) {
          stackAnswer.push(complexFormat.format(a.getImaginary()));
        } else if (token.equals("log")) {
          stackAnswer.push(complexFormat.format(a.log()));
        } else if (token.equals("neg")) {
          stackAnswer.push(complexFormat.format(a.negate()));
        } else if (token.equals("real")) {
          stackAnswer.push(complexFormat.format(a.getReal()));
        } else if (token.equals("sin")) {
          stackAnswer.push(complexFormat.format(a.sin()));
        } else if (token.equals("sinh")) {
View Full Code Here

      }

      Dfp y = DfpMath.pow(x, field.getOne().divide(3));

      if (negative) {
          y = y.negate();
      }

      return y;
    }
View Full Code Here

      }

      Dfp y = DfpMath.pow(x, field.getOne().divide(3));

      if (negative) {
          y = y.negate();
      }

      return y;
    }
View Full Code Here

      }

      Dfp y = DfpMath.pow(x, field.getOne().divide(3));

      if (negative) {
          y = y.negate();
      }

      return y;
    }
View Full Code Here

      }

      Dfp y = DfpMath.pow(x, field.getOne().divide(3));

      if (negative) {
          y = y.negate();
      }

      return y;
    }
View Full Code Here

      }

      Dfp y = DfpMath.pow(x, field.getOne().divide(3));

      if (negative) {
          y = y.negate();
      }

      return y;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.