public class GenPolynomialTokenizer extends java.lang.Object
RingFactoryTokenizer
Constructor and Description |
---|
GenPolynomialTokenizer()
No-args constructor reads from System.in.
|
GenPolynomialTokenizer(GenPolynomialRing rf,
java.io.Reader r)
Constructor with Ring and Reader.
|
GenPolynomialTokenizer(java.io.Reader r)
Constructor with Reader.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
expressionVariables(java.lang.String s)
Extract variable list from expression.
|
void |
initFactory(RingFactory rf,
edu.jas.poly.GenPolynomialTokenizer.coeffType ct)
Initialize coefficient and polynomial factories.
|
void |
initSolvableFactory(RingFactory rf,
edu.jas.poly.GenPolynomialTokenizer.coeffType ct)
Initialize coefficient and solvable polynomial factories.
|
RingFactory |
nextCoefficientRing()
Parsing method for coefficient ring.
|
void |
nextComma() |
java.lang.String |
nextComment()
Parsing method for comments.
|
long |
nextExponent()
Parsing method for exponent (of variable).
|
GenPolynomial |
nextPolynomial()
Parsing method for GenPolynomial.
|
java.util.List<GenPolynomial> |
nextPolynomialList()
Parsing method for polynomial list.
|
PolynomialList |
nextPolynomialSet()
Parsing method for polynomial set.
|
void |
nextRelationTable()
Parsing method for solvable polynomial relation table.
|
GenSolvablePolynomial |
nextSolvablePolynomial()
Parsing method for solvable polynomial.
|
java.util.List<GenSolvablePolynomial> |
nextSolvablePolynomialList()
Parsing method for solvable polynomial list.
|
PolynomialList |
nextSolvablePolynomialSet()
Parsing method for solvable polynomial set.
|
java.util.List<java.util.List<GenSolvablePolynomial>> |
nextSolvableSubModuleList()
Parsing method for solvable submodule list.
|
ModuleList |
nextSolvableSubModuleSet()
Parsing method for solvable module set.
|
int |
nextSplitIndex()
Parsing method for split index.
|
java.util.List<java.util.List<GenPolynomial>> |
nextSubModuleList()
Parsing method for submodule list.
|
ModuleList |
nextSubModuleSet()
Parsing method for module set.
|
TermOrder |
nextTermOrder()
Parsing method for term order name.
|
java.lang.String[] |
nextVariableList()
Parsing method for variable list.
|
long[][] |
nextWeightArray()
Parsing method for weight array.
|
long[] |
nextWeightList()
Parsing method for weight list.
|
static java.lang.String[] |
variableList(java.lang.String s)
Parse variable list from String.
|
public GenPolynomialTokenizer()
public GenPolynomialTokenizer(GenPolynomialRing rf, java.io.Reader r)
rf
- ring factory.r
- reader stream.public GenPolynomialTokenizer(java.io.Reader r)
r
- reader stream.public void initFactory(RingFactory rf, edu.jas.poly.GenPolynomialTokenizer.coeffType ct)
rf
- ring factory.ct
- coefficient type.public void initSolvableFactory(RingFactory rf, edu.jas.poly.GenPolynomialTokenizer.coeffType ct)
rf
- ring factory.ct
- coefficient type.public GenPolynomial nextPolynomial() throws java.io.IOException
... coefficient variable**exponent ... variable^exponent + ... - ....Juxtaposition means multiplication
*
. Then terms/monomials
can be added or subtracted +, -
and grouped by parenthesis
()
. There are some heuristics to detect when a coefficient
should be parsed. To force parsing of a coefficient enclose it in braces
{}
.java.io.IOException
public long nextExponent() throws java.io.IOException
^long | **long
java.io.IOException
public java.lang.String nextComment() throws java.io.IOException
(* comment *) | /_* comment *_/without
_
. Unused, as it does not work with this pushBack().java.io.IOException
public java.lang.String[] nextVariableList() throws java.io.IOException
(a, b c, de)gives
[ "a", "b", "c", "de" ]
java.io.IOException
public RingFactory nextCoefficientRing() throws java.io.IOException
Rat | Q | Int | Z | Mod modul | Complex | C | D | Quat | AN[ (var) ( poly ) ] | AN[ modul (var) ( poly ) ] | IntFunc (var_list)
java.io.IOException
public long[] nextWeightList() throws java.io.IOException
(w1, w2, w3, ..., wn)
java.io.IOException
public long[][] nextWeightArray() throws java.io.IOException
( (w11, ...,w1n), ..., (wm1, ..., wmn) )
java.io.IOException
public int nextSplitIndex() throws java.io.IOException
|i|
java.io.IOException
public TermOrder nextTermOrder() throws java.io.IOException
L | IL | LEX | G | IG | GRLEX | W(weights) | '|'split index'|'
java.io.IOException
public java.util.List<GenPolynomial> nextPolynomialList() throws java.io.IOException
( p1, p2, p3, ..., pn )
java.io.IOException
public java.util.List<java.util.List<GenPolynomial>> nextSubModuleList() throws java.io.IOException
( ( p11, p12, p13, ..., p1n ), ..., ( pm1, pm2, pm3, ..., pmn ) )
java.io.IOException
public void nextRelationTable() throws java.io.IOException
( p_1, p_2, p_3, ..., p_{n+1}, p_{n+2}, p_{n+3} )semantics:
p_{n+1} * p_{n+2} = p_{n+3}
. The next relation
table is stored into the solvable polynomial factory.java.io.IOException
public PolynomialList nextPolynomialSet() throws java.io.IOException
coeffRing varList termOrderName polyList
java.io.IOException
public ModuleList nextSubModuleSet() throws java.io.IOException
coeffRing varList termOrderName moduleList
java.io.IOException
public java.util.List<GenSolvablePolynomial> nextSolvablePolynomialList() throws java.io.IOException
( p1, p2, p3, ..., pn )
java.io.IOException
public GenSolvablePolynomial nextSolvablePolynomial() throws java.io.IOException
java.io.IOException
public PolynomialList nextSolvablePolynomialSet() throws java.io.IOException
varList termOrderName relationTable polyList
java.io.IOException
public java.util.List<java.util.List<GenSolvablePolynomial>> nextSolvableSubModuleList() throws java.io.IOException
( ( p11, p12, p13, ..., p1n ), ..., ( pm1, pm2, pm3, ..., pmn ) )
java.io.IOException
public ModuleList nextSolvableSubModuleSet() throws java.io.IOException
varList termOrderName relationTable moduleList
java.io.IOException
public void nextComma() throws java.io.IOException
java.io.IOException
public static java.lang.String[] variableList(java.lang.String s)
s
- String. Syntax:
(n1,...,nk)or
(n1 ... nk)parenthesis are optional.
public static java.lang.String[] expressionVariables(java.lang.String s)
s
- String. Syntax: any polynomial expression.