AtkinPrimeSieve class

Prime sieve of Atkin (linear sieve).

The implementation has a time complexity of O(n) and a space complexity of O(n).

See https://en.wikipedia.org/wiki/Sieve_of_Atkin.

Inheritance

Constructors

AtkinPrimeSieve(int max)
Constructs the prime sieve of Atkin.

Properties

hashCode int
The hash code for this object.
no setterinherited
max int
The maximum number this sieve supports.
finalinherited
primes Iterable<int>
Returns an Iterable of all primes up to and including max.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isPrime(int value) bool
Tests if a value is prime. Throws a RangeError exception if value is larger than max.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited