angoel.livejournal.com |
Mon 2002-12-02 06:15 |
Ooh. I like that. Yes. That's very nice. I'm glad I asked you to tell us.
Couple of ideas. I think that rather than storing ten four-bit numbers per node and so on, you probably want to use matrices, and look at methods of storing sparce matrices (I presume you meant N*N rather than N^N - at least I can't see why the latter is necessary). That said, functionally, I suspect it'll come out looking similar. In any case, the storage difficulties can be sidestepped by having a sufficiently big bottom branch size, or not annotating the bottom nodes.
Secondly, I don't think that the autogeneration thing would be that hard. However, a thing that that might cause problems is multiple byte stuff, such as #ifdef 0 and #endif or /* and */. You'd have to check for them on deletion, etc.
Hang on. Thinking about that, I'm not sure that a matrix is sufficient. Consider if you considered both nested brackets and nested comments. Now you need two dimensions values which interact in nasty ways (multipally commented out brackets, etc). And potentially more, for more dimensions.
Don't know. But it's the end of my lunch break. So I'll stop thinking about it.
|
|