* @param event The TrustLogEvent that is being processed
* @param forward Whether or not the graph is being played forward
*/
@Override
public void graphEvent(TrustLogEvent event, boolean forward) {
ReputationAlgorithm alg = (ReputationAlgorithm) getAlgorithm();
//((EigenTrust) alg).setMatrixFilled(false);
//((EigenTrust) alg).setIterations(((EigenTrust) alg).getIterations() + (forward ? 1 : -1));
Collection<Agent> fbVertices = feedbackGraph.getVertices();
ArrayList<Agent> toRemove = new ArrayList<Agent>();
for (Agent src : fbVertices) {
for (Agent sink : fbVertices) {
if (!src.equals(sink)) {
double trustScore = -1;
try {
trustScore = alg.calculateTrustScore(src, sink);
} catch (Exception ex) {
continue;
}
ensureAgentExists(src.id, this);
ensureAgentExists(sink.id, this);