Ignore:
Timestamp:
Aug 26, 2021, 10:38:04 AM (19 months ago)
Author:
Peter
Message:

store the right_most node, so it can be accessed in constant time (rather than logarithmic); refs #710

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/kendall-score/yat/utility/Ranking.h

    r4077 r4079  
    523523        impl_.head_.left_ = impl_.root_node();
    524524        impl_.head_.right_ = impl_.root_node();
     525        impl_.right_most() = impl_.root_node();
    525526        impl_.head_.update_height();
    526527        impl_.head_.update_size();
     
    806807    head_node()->update_height();
    807808    head_node()->update_size();
     809    if (root_node())
     810      impl_.right_most() = root_node()->right_most();
     811    else
     812      impl_.right_most() = head_node();
    808813    YAT_ASSERT(validate());
    809814    return root;
Note: See TracChangeset for help on using the changeset viewer.