|
Boost : |
Subject: Re: [boost] [ boost ] [ Trie ]
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2015-05-05 16:02:03
2015-05-04 17:13 GMT+03:00 Cosmin Boaca <boost.cosmin.boaca_at_[hidden]>:
> Hello,
>
> Is it really needed to create a new class called leaf ? I was thinking of
> storing a vector<key_type> in each node instead of a key_type element and
> this would handle both cases (one element / more elements) .
>
Actually, this could be even better for first time. But keep in mind that
we'll need to replace vector with something more compact some day.
Also, use boost::container::small_vector<key, 1> instead of
std::vector<key>. boost::container::small_vector<key, 1> does not cause
dynamic memory allocations for storing a single element.
-- 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