Boost logo

Boost :

Subject: Re: [boost] [GSOC] proposal for Trie
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2013-04-26 06:47:01


2013/4/26 Hardy <hzithlony_at_[hidden]>:
> Firstly, the 'key' here represent a string.
> The first 'get-key' function is to get a key which corresponds to the
> iterator(node in Trie), because in order to save space(which is one of
> Trie's advantages), the whole key string should not store in a single
> iterator(node), so it is necessary to provide such an interface under my
> design.

This looks bad.
Iterating through elements of 'string' may be a useful feature, but
not the main.
User will be putting in container 'string' and he will be expecting to
retrieve 'string' when dereferencing iterator.

> Since the relationship between key and string makes you confused, I am now
> trying to explain more about it.
> In my current design, a key is a 'string' itself.
> My idea is to take sequences of anytype as an abstract string in the bottom
> layer of the lib, in order to extend the capability of Trie.
> And after thinking on it several times, I now prefer to use 'key' as an
> element of a 'string', for it is more clear to users.
> Since it is a crucial and essential problem of the whole Trie project, I
> want some advices of you on it.

'key' is what we are going to store in container. User shall not care
that we store key in parts, so it looks right to treat 'key' close to
'string'.

> Ok, you mean that I should add this link of our discussion to the 'additional info' of my proposal in GSoC page?

Yes

--
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk