nl.uu.cs.treewidth.algorithm
Interface Algorithm<D extends GraphInput.InputData>
- All Known Subinterfaces:
- Constructive<D>, Exact<D>, LowerBound<D>, Permutation<D>, UpperBound<D>
- All Known Implementing Classes:
- AllStartLexBFS, AllStartMaximumCardinalitySearch, AllStartMaximumCardinalitySearchMinimal, AllStartMaximumMinimumDegree, AllStartMaximumMinimumDegreePlusLeastC, AllStartMinorMinWidth, GreedyDegree, GreedyFillIn, LexBFS, MaximumCardinalitySearch, MaximumCardinalitySearchMinimal, MaximumMinimumDegree, MaximumMinimumDegreePlusLeastC, MaximumMinimumDegreePlusMaxD, MaximumMinimumDegreePlusMinD, MinDegree, MinorMinWidth, PermutationGuesser, PermutationToTreeDecomposition, PreProcessor, QuickBB, Ramachandramurthi, TreewidthDP
public interface Algorithm<D extends GraphInput.InputData>
Base interface for all algorithms.
Using an Algorithm procedes in three steps.
-
Give it the graph to work on using
setInput
.
-
Have it do the actual computation using
run
.
-
Retrieve the result. Methods to do this are provided in subinterfaces.
(See the list of `known subinterfaces.')
- Author:
- tw team
Method Summary |
java.lang.String |
getName()
Every algorithm has a name. |
void |
run()
Does the actual computation of the algorithm. |
void |
setInput(NGraph<D> g)
Sets the input the algorithm will run on. |
getName
java.lang.String getName()
- Every algorithm has a name. This is for identification towards the user.
- Returns:
- Name of the algorithm.
setInput
void setInput(NGraph<D> g)
- Sets the input the algorithm will run on.
- Parameters:
g
- The graph in standard graph format.
run
void run()
- Does the actual computation of the algorithm. The result is remembered but not returned. Get it using the appropriate return function (getUpperbound(), getLowerBound(), etc.).
Only works after setInput has been called.