Class PE0007

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int cnt
      The count of found primes.
      private int max
      The maximum number to search to.
      private Sieve sieve
      The storage for the "Sieve of Eratosthenes".
    • Constructor Summary

      Constructors 
      Constructor Description
      PE0007()
      A simple constructor to set number and title.
    • Method Summary

      Modifier and Type Method Description
      void prepare()
      Initializes the sieve with the maximum of max
      java.lang.String solve()
      Runs the algorithm of the "Sieve of Eratosthenes" and count every found prime factor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • max

        private int max
        The maximum number to search to.
      • cnt

        private int cnt
        The count of found primes.
      • sieve

        private Sieve sieve
        The storage for the "Sieve of Eratosthenes".
        See Also:
        Sieve
    • Constructor Detail

      • PE0007

        public PE0007()
        A simple constructor to set number and title.