Author Topic: Data Structures for Text Sequences  (Read 3816 times)

0 Members and 1 Guest are viewing this topic.

kryton9

  • Guest
Data Structures for Text Sequences
« on: November 30, 2010, 01:07:50 AM »
Thought this might prove useful for your glEditor Charles.
http://www.cs.unm.edu/~crowley/papers/sds/sds.html

Charles Pegge

  • Guest
Re: Data Structures for Text Sequences
« Reply #1 on: November 30, 2010, 04:27:26 AM »
Thanks Kent,
This document has lost all its tables and diagrams unfortunately, but it is always useful to get the schema.  The most powerful structure I have encountered so far is the Bstring which is very simple and extremely versatile. It can be used to contain any data including other bstrings or even trees of bstrings. Also, objects of any structure can be passed around as bstrings and accessed by applying a dim overlay.

The structure I use for the elastic TextArray for instance is A single bstring of bstrings - containing a a bstr for each line

Charles

Brief definition of a bstring:

pointer to a sequence of bytes followed by two null bytes. The length of the byte sequence is a 4 byte integer located immediately preceding the byte sequence.





kryton9

  • Guest
Re: Data Structures for Text Sequences
« Reply #2 on: December 02, 2010, 09:29:57 PM »
Sounds like you are using the method that they recommend "The Piece Chains".
http://www.catch22.net/tuts/neatpad/17

He has lots of good information with code at that site.

Charles Pegge

  • Guest
Re: Data Structures for Text Sequences
« Reply #3 on: December 02, 2010, 10:06:00 PM »

Thanks Kent,

Computers are so speedy and vast in memory these days, you can get away with very inefficient manipulation and keep the code very simple.

BTW. I enjoyed investigating Gauss. The Gaussian distribution is one of the fundamentals of maths and physics. I will include an example in the next release.

Charles

kryton9

  • Guest
Re: Data Structures for Text Sequences
« Reply #4 on: December 03, 2010, 01:06:43 PM »
Looking forward to it Charles. I was playing with more equations and they will come in handy for all procedural generated media in the future.