| Package | graphics.numeric |
| Class | public final class Prime |
| Inheritance | Prime Object |
| Method | Defined By | ||
|---|---|---|---|
findPrimeFrom(n:int, from:uint = 0):Array [static]
Defines an array of all primes between 'from' and 'n' inclusive, positive but restricted integer value, ignores decimals. | Prime | ||
generatePrimes(limit:Number):Array [static]
Defines an array of all primes between 2 and 'n' inclusive. | Prime | ||
isPrime(n:int):Boolean [static]
Boolean for 'isPrime' integer condition, ignores decimals. | Prime | ||
primeFactor(n:Number):String [static]
Defines prime factors of 'n', positive but restricted integer value, ignores decimals. | Prime | ||
totient(n:Number):Number [static]
Defines total of relative primes of 'n'. | Prime | ||
| findPrimeFrom | () | method |
public static function findPrimeFrom(n:int, from:uint = 0):ArrayDefines an array of all primes between 'from' and 'n' inclusive, positive but restricted integer value, ignores decimals.
Parameters
n:int | |
from:uint (default = 0) |
Array — a array representation of all primes between from and n inclusive}
|
| generatePrimes | () | method |
public static function generatePrimes(limit:Number):ArrayDefines an array of all primes between 2 and 'n' inclusive.
Parameters
limit:Number |
Array |
| isPrime | () | method |
public static function isPrime(n:int):BooleanBoolean for 'isPrime' integer condition, ignores decimals. Successive division.
Parameters
n:int |
Boolean |
| primeFactor | () | method |
public static function primeFactor(n:Number):StringDefines prime factors of 'n', positive but restricted integer value, ignores decimals.
Parameters
n:Number |
String — a string representation of the multiplication of primes of 'n'.
|
| totient | () | method |
public static function totient(n:Number):NumberDefines total of relative primes of 'n'.
Parameters
n:Number |
Number |