edu.jas.poly
Class ExpVectorByte
- java.lang.Object
-
- edu.jas.poly.ExpVector
-
- edu.jas.poly.ExpVectorByte
-
- All Implemented Interfaces:
- AbelianGroupElem<ExpVector>, Element<ExpVector>, java.io.Serializable, java.lang.Comparable<ExpVector>
public final class ExpVectorByte extends ExpVector
ExpVectorByte implements exponent vectors for polynomials using arrays of byte as storage unit. This class is used by ExpVector internally, there is no need to use this class directly.- See Also:
ExpVector, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.jas.poly.ExpVector
ExpVector.StorUnit
-
-
Field Summary
Fields Modifier and Type Field and Description static longmaxByteLargest byte.static longminByteSmallest byte.
-
Constructor Summary
Constructors Constructor and Description ExpVectorByte(int n)Constructor for ExpVector.ExpVectorByte(int n, int i, byte e)Constructor for ExpVector.ExpVectorByte(int n, int i, long e)Constructor for ExpVector.ExpVectorByte(long[] v)Constructor for ExpVector.ExpVectorByte(java.lang.String s)Constructor for ExpVector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ExpVectorByteabs()ExpVector absolute value.ExpVectorBytecombine(ExpVector V)Combine with ExpVector.intcompareTo(ExpVector V)ExpVector compareTo.ExpVectorBytecontract(int i, int len)Contract variables.ExpVectorBytecopy()Clone this.int[]dependencyOnVariables()ExpVector dependency on variables.booleanequals(java.lang.Object B)Comparison with any other object.ExpVectorByteextend(int i, int j, long e)Extend variables.ExpVectorByteextendLower(int i, int j, long e)Extend lower variables.ExpVectorBytegcd(ExpVector V)ExpVector greatest common divisor.longgetVal(int i)Get the exponent at position i.inthashCode()hashCode for this exponent vector.intinvGradCompareTo(ExpVector V)ExpVector inverse graded lexicographical compareTo.intinvGradCompareTo(ExpVector V, int begin, int end)ExpVector inverse graded lexicographical compareTo.intinvLexCompareTo(ExpVector V)ExpVector inverse lexicographical compareTo.intinvLexCompareTo(ExpVector V, int begin, int end)ExpVector inverse lexicographical compareTo.intinvWeightCompareTo(long[][] w, ExpVector V)ExpVector inverse weighted lexicographical compareTo.intinvWeightCompareTo(long[][] w, ExpVector V, int begin, int end)ExpVector inverse weighted lexicographical compareTo.ExpVectorBytelcm(ExpVector V)ExpVector least common multiple.intlength()Get the length of this exponent vector.longmaxDeg()ExpVector maximal degree.booleanmultipleOf(ExpVector V)ExpVector multiple test.ExpVectorBytenegate()ExpVector negate.ExpVectorBytereverse()Reverse variables.ExpVectorBytereverse(int j)Reverse j variables.intrevInvGradCompareTo(ExpVector V)ExpVector reverse inverse graded compareTo.intrevInvGradCompareTo(ExpVector V, int begin, int end)ExpVector reverse inverse graded compareTo.intrevInvLexCompareTo(ExpVector V)ExpVector reverse inverse lexicographical compareTo.intrevInvLexCompareTo(ExpVector V, int begin, int end)ExpVector reverse inverse lexicographical compareTo.intsignum()ExpVector signum.ExpVectorBytesubst(int i, byte d)ExpVector substitution.ExpVectorBytesubst(int i, long d)ExpVector substitution.ExpVectorBytesubtract(ExpVector V)ExpVector subtract.ExpVectorBytesum(ExpVector V)ExpVector summation.java.lang.StringtoString()Get the string representation.longtotalDeg()ExpVector total degree.longweightDeg(long[][] w)ExpVector weighted degree.-
Methods inherited from class edu.jas.poly.ExpVector
create, create, create, create, create, degree, divides, EVABS, evaluate, EVDIF, EVDOV, EVGCD, EVIGLC, EVIGLC, EVILCP, EVILCP, EVIWLC, EVIWLC, EVLCM, EVMDEG, EVMT, EVNEG, EVRAND, EVRAND, EVRIGLC, EVRIGLC, EVRILCP, EVRILCP, EVSIGN, EVSU, EVSUM, EVTDEG, EVWDEG, factory, indexVar, indexVarName, isFinite, isZERO, random, random, stdVars, STDVARS, stdVars, STDVARS, toScript, toScript, toScriptFactory, toString, varIndex, varsToString
-
-
-
-
Field Detail
-
maxByte
public static final long maxByte
Largest byte.- See Also:
- Constant Field Values
-
minByte
public static final long minByte
Smallest byte.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExpVectorByte
public ExpVectorByte(int n)
Constructor for ExpVector.- Parameters:
n- length of exponent vector.
-
ExpVectorByte
public ExpVectorByte(int n, int i, byte e)Constructor for ExpVector. Sets exponent i to e.- Parameters:
n- length of exponent vector.i- index of exponent to be set.e- exponent to be set.
-
ExpVectorByte
public ExpVectorByte(int n, int i, long e)Constructor for ExpVector. Sets exponent i to e.- Parameters:
n- length of exponent vector.i- index of exponent to be set.e- exponent to be set.
-
ExpVectorByte
public ExpVectorByte(long[] v)
Constructor for ExpVector. Sets val, converts from long array.- Parameters:
v- long representation array.
-
ExpVectorByte
public ExpVectorByte(java.lang.String s) throws java.lang.NumberFormatExceptionConstructor for ExpVector. Converts a String representation to an ExpVector. Accepted format = (1,2,3,4,5,6,7).- Parameters:
s- String representation.- Throws:
java.lang.NumberFormatException
-
-
Method Detail
-
copy
public ExpVectorByte copy()
Clone this.
-
getVal
public long getVal(int i)
Get the exponent at position i.
-
length
public int length()
Get the length of this exponent vector.
-
extend
public ExpVectorByte extend(int i, int j, long e)
Extend variables. Used e.g. in module embedding. Extend this by i elements and set val[j] to e.
-
extendLower
public ExpVectorByte extendLower(int i, int j, long e)
Extend lower variables. Extend this by i lower elements and set val[j] to e.- Specified by:
extendLowerin classExpVector- Parameters:
i- number of elements to extend.j- index of element to be set.e- new exponent for val[j].- Returns:
- extended exponent vector.
-
contract
public ExpVectorByte contract(int i, int len)
Contract variables. Used e.g. in module embedding. Contract this to len elements.
-
reverse
public ExpVectorByte reverse()
Reverse variables. Used e.g. in opposite rings.
-
reverse
public ExpVectorByte reverse(int j)
Reverse j variables. Used e.g. in opposite rings. Reverses the first j-1 variables, the rest is unchanged.
-
combine
public ExpVectorByte combine(ExpVector V)
Combine with ExpVector. Combine this with the other ExpVector V.
-
toString
public java.lang.String toString()
Get the string representation.
-
equals
public boolean equals(java.lang.Object B)
Comparison with any other object.
-
hashCode
public int hashCode()
hashCode for this exponent vector.
-
abs
public ExpVectorByte abs()
ExpVector absolute value.- Specified by:
absin interfaceAbelianGroupElem<ExpVector>- Specified by:
absin classExpVector- Returns:
- abs(this).
-
negate
public ExpVectorByte negate()
ExpVector negate.- Specified by:
negatein interfaceAbelianGroupElem<ExpVector>- Specified by:
negatein classExpVector- Returns:
- -this.
-
sum
public ExpVectorByte sum(ExpVector V)
ExpVector summation.- Specified by:
sumin interfaceAbelianGroupElem<ExpVector>- Specified by:
sumin classExpVector- Parameters:
V-- Returns:
- this+V.
-
subtract
public ExpVectorByte subtract(ExpVector V)
ExpVector subtract. Result may have negative entries.- Specified by:
subtractin interfaceAbelianGroupElem<ExpVector>- Specified by:
subtractin classExpVector- Parameters:
V-- Returns:
- this-V.
-
subst
public ExpVectorByte subst(int i, byte d)
ExpVector substitution. Clone and set exponent to d at position i.- Parameters:
i- position.d- new exponent.- Returns:
- substituted ExpVector.
-
subst
public ExpVectorByte subst(int i, long d)
ExpVector substitution. Clone and set exponent to d at position i.
-
signum
public int signum()
ExpVector signum.- Specified by:
signumin interfaceAbelianGroupElem<ExpVector>- Specified by:
signumin classExpVector- Returns:
- 0 if this is zero, -1 if some entry is negative, 1 if no entry is negative and at least one entry is positive.
-
totalDeg
public long totalDeg()
ExpVector total degree.
-
maxDeg
public long maxDeg()
ExpVector maximal degree.
-
weightDeg
public long weightDeg(long[][] w)
ExpVector weighted degree.
-
lcm
public ExpVectorByte lcm(ExpVector V)
ExpVector least common multiple.
-
gcd
public ExpVectorByte gcd(ExpVector V)
ExpVector greatest common divisor.
-
dependencyOnVariables
public int[] dependencyOnVariables()
ExpVector dependency on variables.- Specified by:
dependencyOnVariablesin classExpVector- Returns:
- array of indices where val has positive exponents.
-
multipleOf
public boolean multipleOf(ExpVector V)
ExpVector multiple test. Test if this is component wise greater or equal to V.- Specified by:
multipleOfin classExpVector- Parameters:
V-- Returns:
- true if this is a multiple of V, else false.
-
compareTo
public int compareTo(ExpVector V)
ExpVector compareTo.
-
invLexCompareTo
public int invLexCompareTo(ExpVector V)
ExpVector inverse lexicographical compareTo.- Specified by:
invLexCompareToin classExpVector- Parameters:
V-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
invLexCompareTo
public int invLexCompareTo(ExpVector V, int begin, int end)
ExpVector inverse lexicographical compareTo.- Specified by:
invLexCompareToin classExpVector- Parameters:
V-begin-end-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
invGradCompareTo
public int invGradCompareTo(ExpVector V)
ExpVector inverse graded lexicographical compareTo.- Specified by:
invGradCompareToin classExpVector- Parameters:
V-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
invGradCompareTo
public int invGradCompareTo(ExpVector V, int begin, int end)
ExpVector inverse graded lexicographical compareTo.- Specified by:
invGradCompareToin classExpVector- Parameters:
V-begin-end-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
revInvLexCompareTo
public int revInvLexCompareTo(ExpVector V)
ExpVector reverse inverse lexicographical compareTo.- Specified by:
revInvLexCompareToin classExpVector- Parameters:
V-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
revInvLexCompareTo
public int revInvLexCompareTo(ExpVector V, int begin, int end)
ExpVector reverse inverse lexicographical compareTo.- Specified by:
revInvLexCompareToin classExpVector- Parameters:
V-begin-end-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
revInvGradCompareTo
public int revInvGradCompareTo(ExpVector V)
ExpVector reverse inverse graded compareTo.- Specified by:
revInvGradCompareToin classExpVector- Parameters:
V-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
revInvGradCompareTo
public int revInvGradCompareTo(ExpVector V, int begin, int end)
ExpVector reverse inverse graded compareTo.- Specified by:
revInvGradCompareToin classExpVector- Parameters:
V-begin-end-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
invWeightCompareTo
public int invWeightCompareTo(long[][] w, ExpVector V)ExpVector inverse weighted lexicographical compareTo.- Specified by:
invWeightCompareToin classExpVector- Parameters:
w- weight array.V-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
invWeightCompareTo
public int invWeightCompareTo(long[][] w, ExpVector V, int begin, int end)ExpVector inverse weighted lexicographical compareTo.- Specified by:
invWeightCompareToin classExpVector- Parameters:
w- weight array.V-begin-end-- Returns:
- 0 if U == V, -1 if U < V, 1 if U > V.
-
-
DMelt 3.0 © DataMelt by jWork.ORG