trustGraphs.add(graphConfig);
} else if (graphConfig.isFeedbackGraph()) { // add the Feedback Graph
graphs.add(new SimFeedbackGraph(graphConfig));
} else if (graphConfig.isReputationGraph()) { //Add a Reputation Graph
graphs.add(new SimReputationGraph(graphConfig, (SimFeedbackGraph) graphs.get(0)));
ReputationAlgorithmType2 alg = (ReputationAlgorithmType2) graphConfig.getAlgorithm(); //get the algorithm and add it to the inner jGraphT graph
try
{
alg.setGraph2Listen((FeedbackHistoryGraph) getInnerGraph(graphConfig.getBaseIndex(), graphs));
} catch (Exception e)
{
ChatterBox.criticalError("SimGraphPair", "<init>", "Error setting algorithm to listen to feedback history graph. " + e);
}
} else {
ChatterBox.criticalError("SimGraphPair", "<init>", "Unsupported graph type");
}
}
for (GraphConfig graphConfig : trustGraphs) { //Now add the Tryst Graphs
graphs.add(new SimTrustGraph(graphConfig));
TrustAlgorithm alg = (TrustAlgorithm) graphConfig.getAlgorithm(); //get the algorithm and add it to the inner jGraphT graph
alg.setReputationGraph((ReputationGraph) getInnerGraph(graphConfig.getBaseIndex(), graphs));
}
return graphs;
}