Class RandomElementwiseSplit
- java.lang.Object
- 
- de.uni_marburg.mdo_over.split.generic.RandomElementwiseSplit
 
- 
- All Implemented Interfaces:
- ISplitStrategy
 
 public class RandomElementwiseSplit extends Object implements ISplitStrategy A split strategy splitting a graph by keeping a specified problem part in both of the generated split parts. The solution part nodes are randomly distributed with respect to a user desired distribution ratio. Afterwards all solution edges are distributed favoring the split part where both source and target node are located. If both split parts contain the same number of edge nodes the edge is allocated randomly and, if appropriate, the winning split part is complemented with the missing edge node to prevent dangling edges. This may lead to split parts overlapping in their solutions nodes.Note: Every ModelGraphElementof the graphs handled by this strategy is expected to possess anon-nullobject reference.- Author:
- S. John
 
- 
- 
Constructor SummaryConstructors Constructor Description RandomElementwiseSplit(double nodeDistributionRatio, Set<org.eclipse.emf.ecore.EObject> problemParts)RandomElementwiseSplit(Random rng, double nodeDistribution, Set<org.eclipse.emf.ecore.EObject> problemParts)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CoSpansplit(ModelGraph graph)Splits each graph in the given list separately applying the strategy described inRandomElementwiseSplit.
 
- 
- 
- 
Method Detail- 
splitpublic CoSpan split(ModelGraph graph) Splits each graph in the given list separately applying the strategy described inRandomElementwiseSplit. For each graph in the list a corresponding cospan is created. The order of cospans in the output matches the order of the corresponding graphs in the input.- Specified by:
- splitin interface- ISplitStrategy
- Parameters:
- graph- graph to split
- Returns:
- cospan containing split parts and mappings
 
 
- 
 
-