public class PrimeFactors
extends java.lang.Object
Constructor and Description |
---|
PrimeFactors(int[] factors) |
PrimeFactors(int numerator,
int denominator) |
Modifier and Type | Method and Description |
---|---|
static int[] |
add(int[] factorsA,
int[] factorsB) |
PrimeFactors |
add(PrimeFactors pf) |
static int[] |
factor(int n) |
int[] |
getFactors() |
JustRatio |
getJustRatio() |
static int |
getPrime(int n)
Get prime from table.
|
static int |
getPrimeCount() |
static int[] |
subtract(int[] factorsA,
int[] factorsB) |
PrimeFactors |
subtract(PrimeFactors pf) |
java.lang.String |
toString() |
public PrimeFactors(int[] factors)
public PrimeFactors(int numerator, int denominator)
public PrimeFactors subtract(PrimeFactors pf)
public PrimeFactors add(PrimeFactors pf)
public static int[] subtract(int[] factorsA, int[] factorsB)
public static int[] add(int[] factorsA, int[] factorsB)
public static int[] factor(int n)
public static int getPrime(int n)
n
- Warning: Do not exceed getPrimeCount()-1.public static int getPrimeCount()
public JustRatio getJustRatio()
public int[] getFactors()
public java.lang.String toString()
toString
in class java.lang.Object