somebody has already asked me about this- the short answer is that it
can be emulated, but won't be supported natively. i'm pasting the
correspondence below in the hope that it helps you and any others in the
future. fyi, it looks like the library is not actively being
maintained, so i have no future plans for this module.
Show quoted textI've been experimenting with Tree::Suffix today and I have a question
I hope you can help me out with. My "alphabet" consists of more than
256 letters, so I've had to encode them as multicharacter strings. I
think that libstree supports this. But I've looked through your
documentation and tests and can't see a way to do it with
Tree::Suffix.
Right now I'm separating each letter by commas. So my strings look
like this:
aa, ab, ac, aa
That works, but it would be nice if this were supported natively. Is
that something you're planning on working on?
-----
i wasn't planning on it, but if you have any suggestions, or a patch,
to easily accomlish this, they would be most welcome. i've only
glanced at that part of the library code, but would it be enough to
allow item_size (in lst_string_new) to be modified? then you could
make a call like
$tree->letter_size(2)
before inserting any strings. I'm not sure if that would work or if a
new LST_StringClass would need to be created.
-----
Sorry I didn't get back to you earlier. I tried using the library
directly with some C code but I couldn't get that to work, either. I
emailed the author of the library, but he hasn't gotten back to me
yet.
Since the library may not do what I want, it's probably not worth your
spending any time on the Perl front end just yet. I'll let you know
when and if I hear back from Christian.
Show quoted text
On Fri Jul 14 18:49:48 2006, jmarca wrote:
Show quoted text> In your documentation, you mention in the To Do list: User-definable
> string types (e.g. > 256 char alphabets). I need to use this, but my C
> skills and XS skills are quite poor. Do you have any pointers on how to
> implement expanded alphabets?
>
> My first thought would be to convert the char version in the libstree
> code to long, which should be workable as an index into an arbitrarily
> large set of alphabet nodes. But I'm likely to spend days figuring out
> how to compare/copy/print longs in C. I'd rather do the compare copy
> and print code in Perl and plug that in to the XS code somehow. Is that
> even possible?
>
> Cheers, and thanks for your work setting this module up
> James
>