Package edu.jas.application
Class RingFactoryTokenizer
java.lang.Object
edu.jas.application.RingFactoryTokenizer
RingFactory Tokenizer. Used to read ring factories from input streams. It can
also read QuotientRing factory.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enum
private static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean
private RingFactory
private static final org.apache.logging.log4j.Logger
private int
private RingFactoryTokenizer.coeffType
private RingFactoryTokenizer.polyType
private GenPolynomialRing
private final Reader
private GenSolvablePolynomialRing
private RelationTable
private final StreamTokenizer
private TermOrder
private String[]
-
Constructor Summary
ConstructorsConstructorDescriptionNo-args constructor reads from System.in.Constructor with Ring and Reader.Constructor with Reader. -
Method Summary
Modifier and TypeMethodDescription(package private) static boolean
digit
(char x) void
Initialize coefficient and polynomial factories.void
Initialize coefficient and solvable polynomial factories.Parsing method for coefficient ring.void
Parsing method for polynomial ring.void
Parsing method for solvable polynomial relation table.Parsing method for solvable polynomial ring.Parsing method for solvable module ring.int
Parsing method for split index.Parsing method for module ring.Parsing method for term order name.String[]
Parsing method for variable list.long[][]
Parsing method for weight array.long[]
Parsing method for weight list.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
vars
-
nvars
private int nvars -
tord
-
table
-
tok
-
reader
-
fac
-
parsedCoeff
-
pfac
-
parsedPoly
-
spfac
-
-
Constructor Details
-
RingFactoryTokenizer
public RingFactoryTokenizer()No-args constructor reads from System.in. -
RingFactoryTokenizer
Constructor with Ring and Reader.- Parameters:
rf
- ring factory.r
- reader stream.
-
RingFactoryTokenizer
Constructor with Reader.- Parameters:
r
- reader stream.
-
-
Method Details
-
initFactory
Initialize coefficient and polynomial factories.- Parameters:
rf
- ring factory.ct
- coefficient type.
-
initSolvableFactory
Initialize coefficient and solvable polynomial factories.- Parameters:
rf
- ring factory.ct
- coefficient type.
-
nextVariableList
Parsing method for variable list. Syntax:(a, b c, de)
gives[ "a", "b", "c", "de" ]
- Returns:
- the next variable list.
- Throws:
IOException
-
nextCoefficientRing
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:
IOException
-
nextWeightList
Parsing method for weight list. Syntax:(w1, w2, w3, ..., wn)
- Returns:
- the next weight list.
- Throws:
IOException
-
nextWeightArray
Parsing method for weight array. Syntax:( (w11, ...,w1n), ..., (wm1, ..., wmn) )
- Returns:
- the next weight array.
- Throws:
IOException
-
nextSplitIndex
Parsing method for split index. Syntax:|i|
- Returns:
- the next split index.
- Throws:
IOException
-
nextTermOrder
Parsing method for term order name. Syntax:L | IL | LEX | G | IG | GRLEX | W(weights) | '|'split index'|'
- Returns:
- the next term order.
- Throws:
IOException
-
nextRelationTable
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:
IOException
-
nextPolynomialRing
Parsing method for polynomial ring. Syntax:coeffRing varList termOrderName (no polyList)
- Returns:
- the next polynomial ring.
- Throws:
IOException
-
nextSolvablePolynomialRing
Parsing method for solvable polynomial ring. Syntax:varList termOrderName relationTable (no polyList)
- Returns:
- the next solvable polynomial ring.
- Throws:
IOException
-
digit
static boolean digit(char x) -
nextComma
- Throws:
IOException
-
nextSubModuleRing
Parsing method for module ring. Syntax:coeffRing varList termOrderName (no moduleList)
- Returns:
- the next module ring.
- Throws:
IOException
-
nextSolvableSubModuleRing
Parsing method for solvable module ring. Syntax:varList termOrderName relationTable (no moduleList*)
- Returns:
- the next solvable module ring.
- Throws:
IOException
-