public class PathDecomposition extends Object implements GraphDecomposition
GraphDecomposition.Bag
Decomposition.Type
Modifier and Type | Method and Description |
---|---|
boolean |
contains(GraphDecomposition.Bag bag)
Checks whether the bag
bag is contained in this path decomposition. |
boolean |
equals(Object o) |
GraphDecomposition.Bag |
getBag(int index)
Returns the bag with the identifier
identifier . |
Graph |
getGraph()
Returns the graph which can be obtained from this graph decomposition.
|
int |
getLength()
Returns the length of this decomposition, i.e. the number of
bags of this decomposition.
|
static PathDecomposition |
getPathDecomposition(Permutation permutation)
Creates a new path decomposition from the permutation
permutation . |
static PathDecomposition |
getPathDecomposition(TreeDecomposition treeDecomposition)
Creates a new path decomposition from the tree decomposition
decomposition . |
Data.Type |
getType()
Returns the type of the data object.
|
int |
getWidth()
Returns the overall width of this decomposition, i.e. the size of the
largest interface of this decomposition.
|
int |
hashCode() |
boolean |
isEmpty()
Returns
true if and only if the decomposition is empty, i.e. it has the length zero. |
Iterator<GraphDecomposition.Bag> |
iterator() |
String |
toString() |
public static PathDecomposition getPathDecomposition(Permutation permutation)
permutation
.permutation
- the permutationpublic static PathDecomposition getPathDecomposition(TreeDecomposition treeDecomposition)
decomposition
.treeDecomposition
- the tree decompositionpublic boolean contains(GraphDecomposition.Bag bag)
bag
is contained in this path decomposition.bag
- the bag to be checkedtrue
if the bag is contained, false
otherwisepublic int getWidth()
Decomposition
getWidth
in interface Decomposition<GraphDecomposition.Bag>
public boolean isEmpty()
Decomposition
true
if and only if the decomposition is empty, i.e. it has the length zero.isEmpty
in interface Decomposition<GraphDecomposition.Bag>
true
if the decomposition is empty, false
otherwisepublic int getLength()
Decomposition
getLength
in interface Decomposition<GraphDecomposition.Bag>
public Iterator<GraphDecomposition.Bag> iterator()
iterator
in interface Iterable<GraphDecomposition.Bag>
public Graph getGraph()
GraphDecomposition
getGraph
in interface GraphDecomposition
public GraphDecomposition.Bag getBag(int index)
GraphDecomposition
identifier
.getBag
in interface GraphDecomposition
index
- the identifier of the bagpublic Data.Type getType()
Data