org.eclipse.emf.henshin.interpreter
Interface PartitionedEGraph

All Superinterfaces:
Collection<EObject>, EGraph, Iterable<EObject>
All Known Implementing Classes:
PartitionedEGraphImpl

public interface PartitionedEGraph
extends EGraph

An extension of EGraphs to support partitioning.


Method Summary
 List<EObject> getDomain(EClass type, boolean strict, int partition)
          Get all EObjects of this graph which are compatible with the given type and are in a given partition.
 int getDomainSize(EClass type, boolean strict, int partition)
          Returns the size of the domain for a type in a partition.
 int getNumPartitions()
          Get the number of partitions of this partitioned graph.
 
Methods inherited from interface org.eclipse.emf.henshin.interpreter.EGraph
addGraph, addTree, copy, getCrossReferenceAdapter, getDomain, getDomainSize, getRoots, removeGraph, removeTree
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

getNumPartitions

int getNumPartitions()
Get the number of partitions of this partitioned graph.

Returns:
The number of partitions.

getDomain

List<EObject> getDomain(EClass type,
                        boolean strict,
                        int partition)
Get all EObjects of this graph which are compatible with the given type and are in a given partition. The partition must be greater or equal zero and strictly less than the number of partitions of this graph. This returns a fresh and modifiable list.

Parameters:
type - The type of the objects.
strict - Whether subtypes are excluded from the result.
partition - The partition to be used.
Returns:
A set of EObjects compatible with the type.

getDomainSize

int getDomainSize(EClass type,
                  boolean strict,
                  int partition)
Returns the size of the domain for a type in a partition. The returned number equals the size of the list returned by getDomain(EClass, boolean, int). This method should be used whenever the actual objects are not needed.

Parameters:
type - The type.
strict - Whether subtypes are excluded.
partition - The partition to be used.
Returns:
The size of the domain.