Package org.rabinfingerprint.fingerprint

Examples of org.rabinfingerprint.fingerprint.RabinFingerprintPolynomial


    Random random = new Random(System.currentTimeMillis());
    random.nextBytes(data);

    // generate random irreducible polynomial
    Polynomial p = Polynomial.createIrreducible(53);
    final Fingerprint<Polynomial> rabin0 = new RabinFingerprintPolynomial(p);
    final Fingerprint<Polynomial> rabin1 = new RabinFingerprintLong(p);
    rabin0.pushBytes(data);
    rabin1.pushBytes(data);
    assertEquals(0, rabin0.getFingerprint().compareTo(rabin1.getFingerprint()));
  }
View Full Code Here


      // 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);
      } else {
        rabin0 = new RabinFingerprintLongWindowed(p, windowSize);
        rabin1 = new RabinFingerprintLong(p);
      }
View Full Code Here

TOP

Related Classes of org.rabinfingerprint.fingerprint.RabinFingerprintPolynomial

Copyright © 2018 www.massapicom. 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.