Data structures for temporal graphs based on compact sequence representations