Class RegularTreeGrammar<E>

java.lang.Object
de.saar.chorus.domgraph.chart.RegularTreeGrammar<E>
Direct Known Subclasses:
ConcreteRegularTreeGrammar, RewritingRtg

public abstract class RegularTreeGrammar<E> extends Object
  • Field Details

  • Constructor Details

    • RegularTreeGrammar

      public RegularTreeGrammar()
  • Method Details

    • getAllNonterminals

      public abstract Set<E> getAllNonterminals()
    • isSingleton

      public abstract boolean isSingleton(E nt)
    • getRootForSingleton

      public abstract String getRootForSingleton(E nt)
    • getSplitsFor

      public abstract List<Split<E>> getSplitsFor(E subgraph)
    • getSplitsFor

      public abstract void getSplitsFor(E subgraph, String label, List<Split<E>> splits)
    • containsSplitFor

      public abstract boolean containsSplitFor(E subgraph)
    • getToplevelSubgraphs

      public abstract List<E> 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

      public String toString()
      Returns a string representation of the chart.
      Overrides:
      toString in class Object
    • countSolvedForms

      public BigInteger 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

      public BigInteger countSolvedFormsFor(E subgraph)
    • size

      public abstract int size()