Package edu.jas.application
Class RingFactoryTokenizer
- java.lang.Object
-
- edu.jas.application.RingFactoryTokenizer
-
public class RingFactoryTokenizer extends java.lang.Object
RingFactory Tokenizer. Used to read ring factories from input streams. It can also read QuotientRing factory.- See Also:
GenPolynomialTokenizer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RingFactoryTokenizer.coeffType
private static class
RingFactoryTokenizer.polyType
-
Field Summary
Fields Modifier and Type Field Description private static boolean
debug
private RingFactory
fac
private static org.apache.logging.log4j.Logger
logger
private int
nvars
private RingFactoryTokenizer.coeffType
parsedCoeff
private RingFactoryTokenizer.polyType
parsedPoly
private GenPolynomialRing
pfac
private java.io.Reader
reader
private GenSolvablePolynomialRing
spfac
private RelationTable
table
private java.io.StreamTokenizer
tok
private TermOrder
tord
private java.lang.String[]
vars
-
Constructor Summary
Constructors Constructor Description RingFactoryTokenizer()
No-args constructor reads from System.in.RingFactoryTokenizer(GenPolynomialRing rf, java.io.Reader r)
Constructor with Ring and Reader.RingFactoryTokenizer(java.io.Reader r)
Constructor with Reader.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
digit(char x)
void
initFactory(RingFactory rf, RingFactoryTokenizer.coeffType ct)
Initialize coefficient and polynomial factories.void
initSolvableFactory(RingFactory rf, RingFactoryTokenizer.coeffType ct)
Initialize coefficient and solvable polynomial factories.RingFactory
nextCoefficientRing()
Parsing method for coefficient ring.void
nextComma()
GenPolynomialRing
nextPolynomialRing()
Parsing method for polynomial ring.void
nextRelationTable()
Parsing method for solvable polynomial relation table.GenSolvablePolynomialRing
nextSolvablePolynomialRing()
Parsing method for solvable polynomial ring.GenSolvablePolynomialRing
nextSolvableSubModuleRing()
Parsing method for solvable module ring.int
nextSplitIndex()
Parsing method for split index.GenPolynomialRing
nextSubModuleRing()
Parsing method for module ring.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.
-
-
-
Field Detail
-
logger
private static final org.apache.logging.log4j.Logger logger
-
debug
private static final boolean debug
-
vars
private java.lang.String[] vars
-
nvars
private int nvars
-
tord
private TermOrder tord
-
table
private RelationTable table
-
tok
private final java.io.StreamTokenizer tok
-
reader
private final java.io.Reader reader
-
fac
private RingFactory fac
-
parsedCoeff
private RingFactoryTokenizer.coeffType parsedCoeff
-
pfac
private GenPolynomialRing pfac
-
parsedPoly
private RingFactoryTokenizer.polyType parsedPoly
-
spfac
private GenSolvablePolynomialRing spfac
-
-
Constructor Detail
-
RingFactoryTokenizer
public RingFactoryTokenizer()
No-args constructor reads from System.in.
-
RingFactoryTokenizer
public RingFactoryTokenizer(GenPolynomialRing rf, java.io.Reader r)
Constructor with Ring and Reader.- Parameters:
rf
- ring factory.r
- reader stream.
-
RingFactoryTokenizer
public RingFactoryTokenizer(java.io.Reader r)
Constructor with Reader.- Parameters:
r
- reader stream.
-
-
Method Detail
-
initFactory
public void initFactory(RingFactory rf, RingFactoryTokenizer.coeffType ct)
Initialize coefficient and polynomial factories.- Parameters:
rf
- ring factory.ct
- coefficient type.
-
initSolvableFactory
public void initSolvableFactory(RingFactory rf, RingFactoryTokenizer.coeffType ct)
Initialize coefficient and solvable polynomial factories.- Parameters:
rf
- ring factory.ct
- coefficient type.
-
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" ]
- Returns:
- the next variable list.
- Throws:
java.io.IOException
-
nextCoefficientRing
public RingFactory nextCoefficientRing() throws java.io.IOException
Parsing method for coefficient ring. Syntax:Rat | Q | Int | Z | Mod modul | Complex | C | D | Quat | AN[ (var) ( poly ) | AN[ modul (var) ( poly ) ] | RatFunc (var_list) | ModFunc modul (var_list) | IntFunc (var_list)
- Returns:
- the next coefficient factory.
- Throws:
java.io.IOException
-
nextWeightList
public long[] nextWeightList() throws java.io.IOException
Parsing method for weight list. Syntax:(w1, w2, w3, ..., wn)
- Returns:
- the next weight list.
- Throws:
java.io.IOException
-
nextWeightArray
public long[][] nextWeightArray() throws java.io.IOException
Parsing method for weight array. Syntax:( (w11, ...,w1n), ..., (wm1, ..., wmn) )
- Returns:
- the next weight array.
- Throws:
java.io.IOException
-
nextSplitIndex
public int nextSplitIndex() throws java.io.IOException
Parsing method for split index. Syntax:|i|
- Returns:
- the next split index.
- Throws:
java.io.IOException
-
nextTermOrder
public TermOrder nextTermOrder() throws java.io.IOException
Parsing method for term order name. Syntax:L | IL | LEX | G | IG | GRLEX | W(weights) | '|'split index'|'
- Returns:
- the next term order.
- Throws:
java.io.IOException
-
nextRelationTable
public void nextRelationTable() throws java.io.IOException
Parsing method for solvable polynomial relation table. Syntax:( 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.- Throws:
java.io.IOException
-
nextPolynomialRing
public GenPolynomialRing nextPolynomialRing() throws java.io.IOException
Parsing method for polynomial ring. Syntax:coeffRing varList termOrderName (no polyList)
- Returns:
- the next polynomial ring.
- Throws:
java.io.IOException
-
nextSolvablePolynomialRing
public GenSolvablePolynomialRing nextSolvablePolynomialRing() throws java.io.IOException
Parsing method for solvable polynomial ring. Syntax:varList termOrderName relationTable (no polyList)
- Returns:
- the next solvable polynomial ring.
- Throws:
java.io.IOException
-
digit
static boolean digit(char x)
-
nextComma
public void nextComma() throws java.io.IOException
- Throws:
java.io.IOException
-
nextSubModuleRing
public GenPolynomialRing nextSubModuleRing() throws java.io.IOException
Parsing method for module ring. Syntax:coeffRing varList termOrderName (no moduleList)
- Returns:
- the next module ring.
- Throws:
java.io.IOException
-
nextSolvableSubModuleRing
public GenSolvablePolynomialRing nextSolvableSubModuleRing() throws java.io.IOException
Parsing method for solvable module ring. Syntax:varList termOrderName relationTable (no moduleList*)
- Returns:
- the next solvable module ring.
- Throws:
java.io.IOException
-
-