edu.jas.poly
Class GenPolynomialTokenizer

java.lang.Object
  extended by edu.jas.poly.GenPolynomialTokenizer

public class GenPolynomialTokenizer
extends java.lang.Object

GenPolynomial Tokenizer. Used to read rational polynomials and lists from input streams.

Author:
Heinz Kredel

Constructor Summary
GenPolynomialTokenizer()
          noargs 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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenPolynomialTokenizer

public GenPolynomialTokenizer()
noargs constructor reads from System.in.


GenPolynomialTokenizer

public GenPolynomialTokenizer(GenPolynomialRing rf,
                              java.io.Reader r)
constructor with Ring and Reader.

Parameters:
rf - ring factory.
r - reader stream.

GenPolynomialTokenizer

public GenPolynomialTokenizer(java.io.Reader r)
constructor with Reader.

Parameters:
r - reader stream.
Method Detail

initFactory

public void initFactory(RingFactory rf,
                        edu.jas.poly.GenPolynomialTokenizer.coeffType ct)
initialize coefficient and polynomial factories.

Parameters:
rf - ring factory.
ct - coefficient type.

initSolvableFactory

public void initSolvableFactory(RingFactory rf,
                                edu.jas.poly.GenPolynomialTokenizer.coeffType ct)
initialize coefficient and solvable polynomial factories.

Parameters:
rf - ring factory.
ct - coefficient type.

nextPolynomial

public GenPolynomial nextPolynomial()
                             throws java.io.IOException
parsing method for GenPolynomial. syntax ? (simple)

Throws:
java.io.IOException
Returns:
the next polynomial.

nextExponent

public long nextExponent()
                  throws java.io.IOException
parsing method for exponent (of variable). syntax: ^long | **long.

Throws:
java.io.IOException
Returns:
the next exponent or 1.

nextComment

public java.lang.String nextComment()
                             throws java.io.IOException
parsing method for comments. syntax: (* comment *) | /_* comment *_/ without _ Does not work with this pushBack(), unused.

Throws:
java.io.IOException

nextVariableList

public java.lang.String[] nextVariableList()
                                    throws java.io.IOException
parsing method for variable list. syntax: (a, b c, de) gives [ "a", "b", "c", "de" ]

Throws:
java.io.IOException
Returns:
the next variable list.

nextCoefficientRing

public RingFactory nextCoefficientRing()
                                throws java.io.IOException
parsing method for coefficient ring. syntax: Rat | Q | Int | Z | Mod modul | Complex | C | Quat | AN[ (var) ( poly ) | AN[ modul (var) ( poly ) ] | RatFunc (var_list) | ModFunc modul (var_list) | IntFunc (var_list)

Throws:
java.io.IOException
Returns:
the next coefficient factory.

nextWeightList

public long[] nextWeightList()
                      throws java.io.IOException
parsing method for weight list. syntax: (w1, w2, w3, ..., wn)

Throws:
java.io.IOException
Returns:
the next weight list.

nextWeightArray

public long[][] nextWeightArray()
                         throws java.io.IOException
parsing method for weight array. syntax: ( (w11, ...,w1n), ..., (wm1, ..., wmn) )

Throws:
java.io.IOException
Returns:
the next weight array.

nextSplitIndex

public int nextSplitIndex()
                   throws java.io.IOException
parsing method for split index. syntax: |i|

Throws:
java.io.IOException
Returns:
the next split index.

nextTermOrder

public TermOrder nextTermOrder()
                        throws java.io.IOException
parsing method for term order name. syntax: termOrderName = L, IL, LEX, G, IG, GRLEX, W(weights) |split index|

Throws:
java.io.IOException
Returns:
the next term order.

nextPolynomialList

public java.util.List<GenPolynomial> nextPolynomialList()
                                                 throws java.io.IOException
parsing method for polynomial list. syntax: ( p1, p2, p3, ..., pn )

Throws:
java.io.IOException
Returns:
the next polynomial list.

nextSubModuleList

public java.util.List<java.util.List<GenPolynomial>> nextSubModuleList()
                                                                throws java.io.IOException
parsing method for submodule list. syntax: ( ( p11, p12, p13, ..., p1n ), ..., ( pm1, pm2, pm3, ..., pmn ) )

Throws:
java.io.IOException
Returns:
the next list of polynomial lists.

nextRelationTable

public void nextRelationTable()
                       throws java.io.IOException
parsing method for solvable polynomial relation table. syntax: ( p_1, p_2, p_3, ..., p_{n+3} ) semantics: p_{n+1} * p_{n+2} = p_{n+3} The next relation table is stored into the solvable polynomial factory.

Throws:
java.io.IOException

nextPolynomialSet

public PolynomialList nextPolynomialSet()
                                 throws java.io.IOException
parsing method for polynomial set. syntax: coeffRing varList termOrderName polyList.

Throws:
java.io.IOException
Returns:
the next polynomial set.

nextSubModuleSet

public ModuleList nextSubModuleSet()
                            throws java.io.IOException
parsing method for module set. syntax: coeffRing varList termOrderName moduleList.

Throws:
java.io.IOException
Returns:
the next module set.

nextSolvablePolynomialList

public java.util.List<GenSolvablePolynomial> nextSolvablePolynomialList()
                                                                 throws java.io.IOException
parsing method for solvable polynomial list. syntax: ( p1, p2, p3, ..., pn )

Throws:
java.io.IOException
Returns:
the next solvable polynomial list.

nextSolvablePolynomial

public GenSolvablePolynomial nextSolvablePolynomial()
                                             throws java.io.IOException
parsing method for solvable polynomial. syntax: p.

Throws:
java.io.IOException
Returns:
the next polynomial.

nextSolvablePolynomialSet

public PolynomialList nextSolvablePolynomialSet()
                                         throws java.io.IOException
parsing method for solvable polynomial set. syntax: varList termOrderName relationTable polyList.

Throws:
java.io.IOException
Returns:
the next solvable polynomial set.

nextSolvableSubModuleList

public java.util.List<java.util.List<GenSolvablePolynomial>> nextSolvableSubModuleList()
                                                                                throws java.io.IOException
parsing method for solvable submodule list. syntax: ( ( p11, p12, p13, ..., p1n ), ..., ( pm1, pm2, pm3, ..., pmn ) )

Throws:
java.io.IOException
Returns:
the next list of solvable polynomial lists.

nextSolvableSubModuleSet

public ModuleList nextSolvableSubModuleSet()
                                    throws java.io.IOException
parsing method for solvable module set. syntax: varList termOrderName relationTable moduleList.

Throws:
java.io.IOException
Returns:
the next solvable module set.

nextComma

public void nextComma()
               throws java.io.IOException
Throws:
java.io.IOException