|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uacalc.util.Horner
public final class Horner
This has static methods for the Horner encoding and its inverse.
| Constructor Summary | |
|---|---|
protected |
Horner()
|
| Method Summary | |
|---|---|
static int |
horner(int[] args,
int size)
Returns the Horner encoding of an int array representing an element from a direct product of algebras all with the same size, such as a direct power. |
static int |
horner(int[] args,
int[] sizes)
Returns the Horner encoding of an int array representing an element from a direct product of algebras with various sizes. |
static int |
horner(java.lang.Integer[] args,
int size)
Returns the Horner encoding of an int array representing an element from a direct product of algebras with the same size. |
static int[] |
hornerInv(int k,
int[] sizes)
Returns the int array corresponding to this Horner encoding for a direct product of algebras with various sizes. |
static int[] |
hornerInv(int k,
int[] sizes,
int[] dest)
Returns the int array corresponding to this Horner encoding for a direct product of algebras with various sizes. |
static int[] |
hornerInv(int k,
int size,
int length)
Returns the int array corresponding to this Horner encoding for a direct product of algebras with the same size. |
static int[] |
hornerInv(int k,
int size,
int len,
int[] dest)
Returns the int array corresponding to this Horner encoding for a direct product of algebras with the same size. |
static int[] |
leftRightReverse(int[] values,
int algSize,
int arity)
If values are the values of a function at [0,0, ...,0], [1,0,...,0], this gives the values in the order [0,0, ...,0], [0,0,...,1], ... |
static void |
main(java.lang.String[] args)
|
static int[] |
reverseArray(int[] arr)
A convenience method for generating a new array with the reverse order of the given array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Horner()
| Method Detail |
|---|
public static final int horner(int[] args,
int[] sizes)
args - the element of the direct product.sizes - the sizes of the algebras. It should have the same
length as args.
public static final int[] hornerInv(int k,
int[] sizes)
k - the Horner encoding of the element of the direct product.sizes - the sizes of the algebras.
public static final int[] hornerInv(int k,
int[] sizes,
int[] dest)
k - the Horner encoding of the element of the direct product.sizes - the sizes of the algebras.dest - an array to hold the answer; if null a new array is made.
public static final int horner(int[] args,
int size)
args - the element of the direct product.size - the size of the algebras.
public static final int[] hornerInv(int k,
int size,
int length)
k - the Horner encoding of the element of the direct product.size - the size of each algebra.length - the number of algebras.
public static final int[] hornerInv(int k,
int size,
int len,
int[] dest)
k - the Horner encoding of the element of the direct product.size - the size of each algebra.len - the number of algebras.dest - an array to hold the answer; if null a new array is made.
public static final int horner(java.lang.Integer[] args,
int size)
args - the element of the direct product.size - the size of each algebra.public static int[] reverseArray(int[] arr)
public static int[] leftRightReverse(int[] values,
int algSize,
int arity)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||