*/
protected PartFactorySetup getFactories() {
PartitioningFactory currentPFactory = null;
ModelAnalyzerFactory suitableMAFactory = null;
InfrastructureAnalyzerFactory suitableIAFactory = null;
int numOfPFactories = partitioningFactories.size();
int numOfMAFactories = modelAnalyzerFactories.size();
int numOfIAFactories = 0;
if (infrastructAnalysisFactories != null) {
numOfIAFactories = infrastructAnalysisFactories.size();
}
for (int i = 0; i < numOfPFactories; i++) {
currentPFactory = partitioningFactories.get(i);
suitableMAFactory = null;
suitableIAFactory = null;
// Check whether there is a compatible model analyzer algorithm
for (int j = 0; j < numOfMAFactories; j++) {
ModelAnalyzerFactory currentMAFactory = modelAnalyzerFactories.get(j);
if (currentPFactory.supportsModelGraphLabels(
currentMAFactory.getGeneratedEdgeLabel(),
currentMAFactory.getGeneratedVertexLabel())) {
suitableMAFactory = currentMAFactory;
break;
}
}
if (suitableMAFactory == null) {
continue;
}
// Check whether there is a compatible hardware analyzer algorithm
for (int j = 0; j < numOfIAFactories; j++) {
InfrastructureAnalyzerFactory currentIAFactory =
infrastructAnalysisFactories.get(j);
if (currentPFactory.supportsHardwareGraphLabels(
currentIAFactory.getGeneratedEdgeLabel(),
currentIAFactory.getGeneratedVertexLabel())) {
suitableIAFactory = currentIAFactory;
break;
}
}