[clean-list] Text Editor Undo and Persistent Data Structures...

Richard A. O'Keefe ok@atlas.otago.ac.nz
Tue, 29 May 2001 13:08:14 +1200 (NZST)


	> My question about that is : is there some deep reason why unlimited UNDO was
	> not implemented in the text editor, and is it possible to use a persistent
	> data structure to implement it ? Are efficient persistent data structures
	> known that support : insertion and deletion in the MIDDLE of a sequence, and
	> random access within a sequence.
	
Yes.  AVL DAGs, for one.  The total size of an AVL DAG is proportional to
the number of changes (for AVL nodes) plus the amount of text changed (for
character storage).  The access time is proportional to log d, where d is
the number of changes pertinent to the relevant version.