Boost logo

Boost Users :

Subject: Re: [Boost-users] [Property Tree] Complexity of find and get methods
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2013-01-07 08:06:52


On 07.01.2013, at 13:29, Elizabeta wrote:

> Hi
> I want to know the complexity of boost property tree find and get methods. I tried the following link http://www.boost.org/doc/libs/1_41_0/doc/html/boost/property_tree/basic_ptree.html#id973373-bb but it seems that the complexity is not specified.

find is O(log(n)) in the number of children the given tree node has.
The get* family is O(m*log(n)) where m is the number of elements in the path and n is the number of children per node. (Basically, the functions peel off the components of the path and walk down the tree, using find() at each level to find the next node.)

>
> Also can find function accept string paths or it just finds immediate childs?

It just finds immediate children.

Sebastian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net