* @param forward Whether or not the graph is being played forward
*/
@Override
public void graphEvent(TrustLogEvent event, boolean forward) {
Agent src = ensureAgentExists(event.getAssessor(), this), sink = ensureAgentExists(event.getAssessee(), this);
SimFeedbackEdge dynEdge = (SimFeedbackEdge) ensureEdgeExists(src, sink, this);
SimFeedbackEdge refEdge = (SimFeedbackEdge) referenceGraph.findEdge(src, sink);
double feedback = event.getFeedback();
if (forward) {
//Add the feedback to the full edge so it can be seen in the viewer
dynEdge.addFeedback(src, sink, feedback);
refEdge.addFeedback(src, sink, feedback);
} else {
dynEdge.removeFeedback(feedback);
refEdge.removeFeedback(feedback);
if (dynEdge.feedbacks.isEmpty()){
removeEdgeAndVertices(dynEdge); //Remove the dynamic edge
}
}
}