|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.poly.ExpVector
public final class ExpVector
ExpVector implements exponent vectors for polynomials. Exponent vectors are implemented as arrays of longs with the familiar MAS static method names. The implementation is only tested for nonnegative exponents but should work also for negative exponents. Objects of this class are intended to be immutable, but exponents can be set (during construction). Will be made generic in the future, e.g. ExpVector<long>.
Constructor Summary | |
---|---|
|
ExpVector(int n)
Constructor for ExpVector. |
|
ExpVector(int n,
int i,
long e)
Constructor for ExpVector. |
protected |
ExpVector(long[] v)
Constructor for ExpVector. |
|
ExpVector(java.lang.String s)
Constructor for ExpVector. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone this. |
ExpVector |
combine(ExpVector V)
Combine with ExpVector. |
ExpVector |
contract(int i,
int len)
Contract variables. |
int[] |
dependencyOnVariables()
ExpVector dependency on variables. |
ExpVector |
dif(ExpVector V)
ExpVector difference. |
boolean |
equals(java.lang.Object B)
Comparison with any other object. |
static ExpVector |
EVDIF(ExpVector U,
ExpVector V)
ExpVector difference. |
static int[] |
EVDOV(ExpVector U)
ExpVector dependency on variables. |
static ExpVector |
EVGCD(ExpVector U,
ExpVector V)
ExpVector greatest common divisor. |
static int |
EVIGLC(ExpVector U,
ExpVector V)
Inverse graded lexicographical compare. |
static int |
EVIGLC(ExpVector U,
ExpVector V,
int begin,
int end)
Inverse graded lexicographical compare part. |
static int |
EVILCP(ExpVector U,
ExpVector V)
Inverse lexicographical compare. |
static int |
EVILCP(ExpVector U,
ExpVector V,
int begin,
int end)
Inverse lexicographical compare part. |
static int |
EVIWLC(long[][] w,
ExpVector U,
ExpVector V)
Inverse weighted lexicographical compare. |
static int |
EVIWLC(long[][] w,
ExpVector U,
ExpVector V,
int begin,
int end)
Inverse weighted lexicographical compare part. |
static ExpVector |
EVLCM(ExpVector U,
ExpVector V)
ExpVector least common multiple. |
static long |
EVMDEG(ExpVector U)
ExpVector maximal degree. |
static boolean |
EVMT(ExpVector U,
ExpVector V)
ExpVector multiple test. |
static ExpVector |
EVRAND(int r,
long k,
float q)
Generate a random ExpVector. |
static ExpVector |
EVRAND(int r,
long k,
float q,
java.util.Random rnd)
Generate a random ExpVector. |
static int |
EVRIGLC(ExpVector U,
ExpVector V)
Reverse inverse graded lexicographical compare. |
static int |
EVRIGLC(ExpVector U,
ExpVector V,
int begin,
int end)
Reverse inverse graded lexicographical compare part. |
static int |
EVRILCP(ExpVector U,
ExpVector V)
Reverse inverse lexicographical compare. |
static int |
EVRILCP(ExpVector U,
ExpVector V,
int begin,
int end)
Reverse inverse lexicographical compare part. |
static int |
EVSIGN(ExpVector U)
ExpVector sign. |
static ExpVector |
EVSU(ExpVector U,
int i,
long d)
ExpVector substitution. |
static ExpVector |
EVSUM(ExpVector U,
ExpVector V)
ExpVector summation. |
static long |
EVTDEG(ExpVector U)
ExpVector total degree. |
static long |
EVWDEG(long[][] w,
ExpVector U)
ExpVector weighted degree. |
ExpVector |
extend(int i,
int j,
long e)
Extend variables. |
long |
getVal(int i)
Get the exponent at position i. |
int |
hashCode()
hashCode. |
boolean |
isZERO()
Is ExpVector zero. |
int |
length()
Get the length of this exponent vector. |
static ExpVector |
random(int r,
long k,
float q)
Generate a random ExpVector. |
static ExpVector |
random(int r,
long k,
float q,
java.util.Random rnd)
Generate a random ExpVector. |
ExpVector |
reverse()
Reverse variables. |
ExpVector |
reverse(int j)
Reverse j variables. |
protected long |
setVal(int i,
long e)
Set the exponent at position i to e. |
java.lang.String[] |
stdVars()
Standard variable names. |
static java.lang.String[] |
STDVARS(int n)
Standard variable names. |
java.lang.String[] |
stdVars(java.lang.String prefix)
Generate variable names. |
static java.lang.String[] |
STDVARS(java.lang.String prefix,
int n)
Generate variable names. |
ExpVector |
subst(int i,
long d)
ExpVector substitution. |
ExpVector |
sum(ExpVector V)
ExpVector summation. |
java.lang.String |
toString()
Get the string representation. |
java.lang.String |
toString(java.lang.String[] vars)
Get the string representation with variable names. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExpVector(int n)
n
- length of exponent vector.public ExpVector(int n, int i, long e)
n
- length of exponent vector.i
- index of exponent to be set.e
- exponent to be set.protected ExpVector(long[] v)
v
- other exponent vector.public ExpVector(java.lang.String s) throws java.lang.NumberFormatException
java.lang.NumberFormatException
s
- String representation.Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
Object.clone()
public long getVal(int i)
i
- position.
protected long setVal(int i, long e)
i
- e
-
public int length()
public ExpVector extend(int i, int j, long e)
i
- number of elements to extend.j
- index of element to be set.e
- new exponent for val[j].
public ExpVector contract(int i, int len)
i
- position of first element to be copied.len
- new length.
public ExpVector reverse()
public ExpVector reverse(int j)
j
- index of first variable not reversed.
public ExpVector combine(ExpVector V)
V
- the other exponent vector.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toString(java.lang.String[] vars)
Object.toString()
vars
- names of variables.public boolean equals(java.lang.Object B)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isZERO()
public java.lang.String[] stdVars()
public java.lang.String[] stdVars(java.lang.String prefix)
prefix
- name prefix.
public static java.lang.String[] STDVARS(int n)
n
- size of names array
public static java.lang.String[] STDVARS(java.lang.String prefix, int n)
n
- size of names array.prefix
- name prefix.
public static ExpVector EVSUM(ExpVector U, ExpVector V)
U
- V
-
public ExpVector sum(ExpVector V)
V
-
public static ExpVector EVDIF(ExpVector U, ExpVector V)
U
- V
-
public ExpVector dif(ExpVector V)
V
-
public static ExpVector EVSU(ExpVector U, int i, long d)
U
- i
- position.d
- new exponent.
public ExpVector subst(int i, long d)
i
- position.d
- new exponent.
public static ExpVector EVRAND(int r, long k, float q)
r
- length of new ExpVector.k
- maximal degree in each exponent.q
- density of nozero exponents.
public static ExpVector EVRAND(int r, long k, float q, java.util.Random rnd)
r
- length of new ExpVector.k
- maximal degree in each exponent.q
- density of nozero exponents.rnd
- is a source for random bits.
public static ExpVector random(int r, long k, float q)
r
- length of new ExpVector.k
- maximal degree in each exponent.q
- density of nozero exponents.
public static ExpVector random(int r, long k, float q, java.util.Random rnd)
r
- length of new ExpVector.k
- maximal degree in each exponent.q
- density of nozero exponents.rnd
- is a source for random bits.
public static int EVSIGN(ExpVector U)
U
-
public static long EVTDEG(ExpVector U)
U
-
public static long EVMDEG(ExpVector U)
U
-
public static long EVWDEG(long[][] w, ExpVector U)
w
- weights.U
-
public static ExpVector EVLCM(ExpVector U, ExpVector V)
U
- V
-
public static ExpVector EVGCD(ExpVector U, ExpVector V)
U
- V
-
public static int[] EVDOV(ExpVector U)
U
-
public int[] dependencyOnVariables()
public static boolean EVMT(ExpVector U, ExpVector V)
U
- V
-
public static int EVILCP(ExpVector U, ExpVector V)
U
- V
-
public static int EVILCP(ExpVector U, ExpVector V, int begin, int end)
U
- V
- begin
- end
-
public static int EVIGLC(ExpVector U, ExpVector V)
U
- V
-
public static int EVIGLC(ExpVector U, ExpVector V, int begin, int end)
U
- V
- begin
- end
-
public static int EVRILCP(ExpVector U, ExpVector V)
U
- V
-
public static int EVRILCP(ExpVector U, ExpVector V, int begin, int end)
U
- V
- begin
- end
-
public static int EVRIGLC(ExpVector U, ExpVector V)
U
- V
-
public static int EVRIGLC(ExpVector U, ExpVector V, int begin, int end)
U
- V
- begin
- end
-
public static int EVIWLC(long[][] w, ExpVector U, ExpVector V)
w
- weight array.U
- V
-
public static int EVIWLC(long[][] w, ExpVector U, ExpVector V, int begin, int end)
w
- weight array.U
- V
- begin
- end
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |