public class FieldPFactoryMap extends java.util.TreeMap<java.lang.Object,FieldPAbstractFactory<?>>
TreeMap.get(Object)
with an
instance of Long
as argument.Modifier and Type | Field and Description |
---|---|
static FieldPFactoryMap |
FACTORY_MAP
this is a singleton class
|
private static long |
inversesLookupTableBoundary
for all Fp with p <= inversesLookupTableBoundary inverses are stored
in a lookup table of size p , for bigger fields inverses are stored with
the element.
|
private static int |
PRIME_CERTANITY |
(package private) static long |
PRIME_SEPARATION_BOUNDARY
for all primes p less than PRIME_SEPARATION_BOUNDARY long variables are
sufficient for computation whereas above BigInteger must be used.
|
static java.math.BigInteger |
PRIME_SEPARATION_BOUNDARY_BIGINT
The same valuse as
PRIME_SEPARATION_BOUNDARY |
private static long |
serialVersionUID |
Modifier | Constructor and Description |
---|---|
private |
FieldPFactoryMap()
No second instance of this class should be created
|
Modifier and Type | Method and Description |
---|---|
static FieldPAbstractFactory<?> |
getFactory(java.lang.Long p)
Give access to a factory of elements of type Fp (see
FieldP ). |
static FieldPAbstractFactory<?> |
getFactory(java.lang.String p)
Give access to a factory of elements of type Fp (see
FieldP ). |
static long |
getInversesLookupTableBoundary()
Returns the number n which decides whether to store inverses in a lookup
table (for fields with less or equal than n elements) or with the
elements (otherwise)
|
(package private) static boolean |
isPrime(long p)
Checks for primality of p.
|
static void |
setInversesLookupTableBoundary(long boundary)
This methods sets the boundary on the elements of Fp above which all
inverses are stored with the elements and therefore may be computed
several times instead of storing them in a lookup table.
|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
private static final long serialVersionUID
public static final FieldPFactoryMap FACTORY_MAP
static final long PRIME_SEPARATION_BOUNDARY
public static final java.math.BigInteger PRIME_SEPARATION_BOUNDARY_BIGINT
PRIME_SEPARATION_BOUNDARY
private static final int PRIME_CERTANITY
private static long inversesLookupTableBoundary
private FieldPFactoryMap()
static boolean isPrime(long p)
p
- The number to check for primalitypublic static FieldPAbstractFactory<?> getFactory(java.lang.Long p)
FieldP
). For
a given value of p, only one factory is created (and then cached in
FACTORY_MAP
).p
- the size of the fieldpublic static FieldPAbstractFactory<?> getFactory(java.lang.String p)
FieldP
). For
a given value of p, only one factory is created (and then cached in
FACTORY_MAP
). p
is tested with the certainty
PRIME_CERTANITY
p
- the size of the fieldBigInteger.isProbablePrime(int).
public static long getInversesLookupTableBoundary()
public static void setInversesLookupTableBoundary(long boundary)
boundary
- The number n of elements in Fp above which no lookup table
should be used.