ArgChecker.isNotNull(mutation, "mutation");
double newX, newY;
if (mutation instanceof Mutation.AppendMutation) {
AppendMutation m = (Mutation.AppendMutation) mutation;
newY = m.getY();
newX = m.getX();
double newInterval = newX - getX(getNumSamples() - 1);
this.minDomainInterval = Math.min(this.minDomainInterval, newInterval);
appendXY(newX, newY);
} else if (mutation instanceof Mutation.RangeMutation) {
Mutation.RangeMutation m = (Mutation.RangeMutation) mutation;
newY = m.getY();
mipMapStrategy.setRangeValue(m.getPointIndex(), newY,
mipMapChain.getMipMappedRangeTuples()[0]);
newX = this.getX(m.getPointIndex());
} else {
// TODO: Can add more mutation handlers later
throw new UnsupportedOperationException(
"mutation of type " + mutation.getClass().getName()
+ " currently not supported");