Package de.saar.chorus.domgraph.chart
Class SplitSource<E extends GraphBasedNonterminal>
java.lang.Object
de.saar.chorus.domgraph.chart.SplitSource<E>
- Direct Known Subclasses:
CompleteSplitSource,OneSplitSource
An abstract superclass for classes that compute splits. A
ChartSolver
relies on an object of a subclass of this class to provide the splits
for a subgraph. You can provide your own subclass by implementing
the computeSplits method of this class.- Author:
- Alexander Koller
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputePotentialFreeRoots(E subgraph) Computes the list of all nodes in the subgraphs which have no incoming edges.computeSplits(E subgraph) Implement this abstract method when you write your own subclass ofSplitSource.getGraph()abstract EmakeToplevelSubgraph(Set<String> graph) abstract voidReduces the computed RTG.
-
Field Details
-
graph
-
-
Constructor Details
-
SplitSource
-
-
Method Details
-
makeToplevelSubgraph
-
computeSplits
Implement this abstract method when you write your own subclass ofSplitSource. The method gets a subgraph as its argument, and has the task of computing an iterator over the splits of this subgraph.- Parameters:
subgraph- a subgraph- Returns:
- an iterator over some or all splits of this subgraph
- Throws:
UnsolvableSubgraphException
-
reduceIfNecessary
Reduces the computed RTG. If your split source is such that the RTG it computes is not automatically reduced, you should implement this method to call reduce() on the output RTG. This method is called as the last operation by the chart solver.- Parameters:
chart- the output RTG computed by the chart solver
-
computePotentialFreeRoots
Computes the list of all nodes in the subgraphs which have no incoming edges. These nodes are candidates for being free roots; however, you still need to check that the holes are in different biconnected components.- Parameters:
subgraph- a subgraph- Returns:
- the list of nodes without in-edges in the subgraph
-
getGraph
-