State
- public class ConcreteTreeAutomaton<State> extends TreeAutomaton<State>
TreeAutomaton.BottomUpStateVisitor
D, DEBUG_STORE
Constructor and Description |
---|
ConcreteTreeAutomaton()
Constructs a new instance without any final states of rules.
|
ConcreteTreeAutomaton(Signature signature)
Constructs a new instance without any final states or rules.
|
ConcreteTreeAutomaton(Signature signature,
Interner<State> interner)
Constructs a new instance without any final states or rules, which
will use the given state interner to enumerate its states.
|
Modifier and Type | Method and Description |
---|---|
void |
addFinalState(int state) |
void |
addRule(Rule rule)
Adds the rule to the automaton.
|
int |
addState(State state) |
void |
foreachRuleBottomUpForSets(IntSet labelIds,
List<IntSet> childStateSets,
SignatureMapper signatureMapper,
Consumer<Rule> fn) |
Iterable<Rule> |
getRulesBottomUp(int label,
int[] childStates)
Finds automaton rules bottom-up for a given list of child states and a
given parent label.
|
Iterable<Rule> |
getRulesTopDown(int label,
int parentState)
Finds automaton rules top-down for a given parent state and label.
|
boolean |
isBottomUpDeterministic()
Determines whether the automaton is deterministic if read as a bottom-up
automaton.
|
accepts, acceptsRaw, analyze, asConcreteTreeAutomaton, asConcreteTreeAutomatonBottomUp, asConcreteTreeAutomatonWithStringStates, countTrees, createRule, createRule, createRule, createRule, createRule, createRule, determinize, determinize, dumpToFile, equals, evaluateInSemiring, evaluateInSemiring, evaluateInSemiringTopDown, foreachRuleTopDown, foreachStateInBottomUpOrder, getAllLabels, getAllRulesTopDown, getAllStates, getFinalStates, getIdForState, getLabelsTopDown, getNumberOfRules, getNumberOfSeenStates, getRandomRuleTree, getRandomRuleTreeFromInside, getRandomTree, getRandomTreeFromInside, getReachableStates, getRulesBottomUp, getRulesBottomUp, getRuleSet, getRulesForRhsState, getRulesTopDown, getRuleTree, getSignature, getStateForId, getStateInterner, getStatesInBottomUpOrder, getStoredConstantsForID, getWeight, getWeightRaw, hasRuleWithPrefix, hasStoredConstants, homomorphism, inside, intersect, intersect, intersectBottomUp, intersectCondensed, intersectCondensed, intersectCondensed, intersectCondensedBottomUp, intersectCondensedBottomUp, intersectEarley, intersectViterbi, intersectViterbi, inverseCondensedHomomorphism, inverseHomomorphism, isCyclic, isEmpty, isStoring, language, languageIterable, languageIterator, languageIteratorRaw, languageRaw, makeAllRulesExplicit, newSiblingFinder, normalizeRuleWeights, outside, processAllRulesBottomUp, processAllRulesTopDown, reduceTopDown, run, run, runRaw, setRulePrintingFilter, setSkipFail, setStoring, sortedLanguageIterator, supportsBottomUpQueries, supportsTopDownQueries, toString, toStringBottomUp, useSiblingFinder, viterbi, viterbiRaw, write
public ConcreteTreeAutomaton()
public ConcreteTreeAutomaton(Signature signature)
signature
- public ConcreteTreeAutomaton(Signature signature, Interner<State> interner)
signature
- interner
- public int addState(State state)
public void addFinalState(int state)
public void addRule(Rule rule)
rule
- public Iterable<Rule> getRulesBottomUp(int label, int[] childStates)
TreeAutomaton
getRulesBottomUp
in class TreeAutomaton<State>
public Iterable<Rule> getRulesTopDown(int label, int parentState)
TreeAutomaton
Note that not every method of TreeAutomaton is safely available in your
implementation of getRulesTopDown. Most notably, you can't use the
default implementation of TreeAutomaton.getAllStates()
, because that method
makes all rules of the automaton explicit and calls TreeAutomaton.getRulesTopDown(int, int)
in the process, leading to an infinite recursion.
getRulesTopDown
in class TreeAutomaton<State>
public boolean isBottomUpDeterministic()
TreeAutomaton
isBottomUpDeterministic
in class TreeAutomaton<State>
public void foreachRuleBottomUpForSets(IntSet labelIds, List<IntSet> childStateSets, SignatureMapper signatureMapper, Consumer<Rule> fn)
foreachRuleBottomUpForSets
in class TreeAutomaton<State>
Copyright © 2017. All rights reserved.