Examples of Polynomial


Examples of org.rabinfingerprint.polynomial.Polynomial

    Random random = new Random(System.currentTimeMillis());
    int windowSize = 8;
   
    for (int i = 0; i < times; i++) {
      // Generate Random Irreducible Polynomial
      Polynomial p = Polynomial.createIrreducible(53);

      final Fingerprint<Polynomial> rabin0, rabin1;
      if (usePolynomials) {
        rabin0 = new RabinFingerprintPolynomial(p, windowSize);
        rabin1 = new RabinFingerprintPolynomial(p);
View Full Code Here

Examples of umontreal.iro.lecuyer.functions.Polynomial

      double[] params = new double[4];
      double dd;
      params[0] = y[0] - mu * r[0] * q[1] * sigma[0];
      dd = y[1] - mu * ((-r[0] - r[1]) * q[1] + r[1] * q[2]) * sigma[1];
      params[1] = (dd - params[0])/h[0] - q[1] * h[0]/3;
      splineVector[0] = new Polynomial(params);

      // premier polynome
      params[0] = y[0] - mu * r[0] * q[1] * sigma[0];
      dd = y[1] - mu * ((-r[0] - r[1]) * q[1] + r[1] * q[2]) * sigma[1];
      params[3] = q[1]/(3 * h[0]);
      params[2] = 0;
      params[1] = (dd - params[0])/h[0] - q[1] * h[0]/3;
      splineVector[1] = new Polynomial(params);

      // les polynomes suivants
      int j;
      for (j = 1; j < n; j++) {
         params[3] = (q[j + 1] - q[j])/(3 * h[j]);
         params[2] = q[j];
         params[1] = (q[j] + q[j - 1]) * h[j - 1] + splineVector[j].getCoefficient(1);
         params[0] = r[j - 1] * q[j - 1] + (-r[j-1] - r[j]) * q[j] + r[j] * q[j + 1];
         params[0] = y[j] - mu * params[0] * sigma[j];
         splineVector[j+1] = new Polynomial(params);
      }

      // extrapolation a droite
      j = n;
      params[3] = 0;
      params[2] = 0;
      params[1] = splineVector[j].derivative(x[x.length-1]-x[x.length-2]);
      params[0] = splineVector[j].evaluate(x[x.length-1]-x[x.length-2]);
      splineVector[n+1] = new Polynomial(params);
   }
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.