* @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) {
TrustAlgorithm alg = (TrustAlgorithm) getAlgorithm();
Collection<Agent> vertices = forward ? alg.getReputationGraph().vertexSet() : getVertices();
for (Agent src : vertices) {
for (Agent sink : vertices) {
try {
if (!src.equals(sink)) {
if (alg.trusts(src, sink)) { //Ensure an edge exists between the two agents that trust eachother
ensureAgentExists(src.id, this);
ensureAgentExists(sink.id, this);
ensureEdgeExists(src, sink, this);
} else {
throw new IllegalArgumentException(); //Remove the edge