A change is either a state change, or a scan or a grapheme change
An update is a sequence of changes
Source code of the graph function.