[Boost-users] [Property Tree] Complexity of find and get methods

80 views
Skip to first unread message

Elizabeta

unread,
Jan 7, 2013, 7:29:44 AM1/7/13
to boost...@lists.boost.org
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.

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

Thank you

_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Sebastian Redl

unread,
Jan 7, 2013, 8:06:52 AM1/7/13
to boost...@lists.boost.org

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
Reply all
Reply to author
Forward
0 new messages