Ropes

Andrej Mitrovic and.mitrovic at hotmail.com
Fri Jul 23 17:29:42 PDT 2010


sybrandy Wrote:

> Not sure if this is what's used by an Appender, but this seems like a 
> cool data structure:
> 
> http://ahmadsoft.org/ropes/
> 
> http://en.wikipedia.org/wiki/Rope_%28computer_science%29
> 
> It's not good for indexing, but concatenation is an O(1) operation, so 
> using it when you have to do a lot of appending seems to make a lot of 
> sense.  And, if I understand appender correctly, it's meant only for 
> appending data and that you need to convert it to a range/array before 
> you work with it.
> 
> Casey

Also see http://www.ibm.com/developerworks/java/library/j-ropes/ for a lengthy cover of ropes. SGI has an implementation of ropes in it's STL lib http://www.sgi.com/tech/stl/Rope.html .


More information about the Digitalmars-d mailing list