Package de.saar.chorus.domgraph.chart
Class RegularTreeGrammar<E>
java.lang.Object
de.saar.chorus.domgraph.chart.RegularTreeGrammar<E>
- Direct Known Subclasses:
ConcreteRegularTreeGrammar,RewritingRtg
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancontainsSplitFor(E subgraph) Returns the number of solved forms represented by this chart.countSolvedFormsFor(E subgraph) abstract StringgetRootForSingleton(E nt) getSplitsFor(E subgraph) abstract void<F extends GraphBasedNonterminal>
voidintersect(RegularTreeGrammar<F> other, ConcreteRegularTreeGrammar<DecoratedNonterminal<F, E>> out) Call this method on the filtering grammar and pass the grammar that is to be filtered as the argument.abstract booleanisSingleton(E nt) abstract intsize()toString()Returns a string representation of the chart.
-
Field Details
-
numSolvedForms
-
-
Constructor Details
-
RegularTreeGrammar
public RegularTreeGrammar()
-
-
Method Details
-
getAllNonterminals
-
isSingleton
-
getRootForSingleton
-
getSplitsFor
-
getSplitsFor
-
containsSplitFor
-
getToplevelSubgraphs
-
intersect
public <F extends GraphBasedNonterminal> void intersect(RegularTreeGrammar<F> other, ConcreteRegularTreeGrammar<DecoratedNonterminal<F, E>> out) Call this method on the filtering grammar and pass the grammar that is to be filtered as the argument.- Type Parameters:
F-- Parameters:
other-
-
toString
Returns a string representation of the chart. -
countSolvedForms
Returns the number of solved forms represented by this chart. This method doesn't compute the solved forms themselves (and is much faster than that), but it can take a few hundred milliseconds for a large chart.The method assumes that the chart belongs to a solvable dominance graph, i.e. that it represents any solved forms in the first place. You can assume this for all charts that were generated by ChartSolver#solve with a return value of
true.- Returns:
- the number of solved forms
-
countSolvedFormsFor
-
size
public abstract int size()
-