diff --git a/src/core/2/domains/paving/codac2_Paving.h b/src/core/2/domains/paving/codac2_Paving.h index 0e137b0e..9cc2084e 100644 --- a/src/core/2/domains/paving/codac2_Paving.h +++ b/src/core/2/domains/paving/codac2_Paving.h @@ -106,6 +106,15 @@ namespace codac2 return l; } + size_t nb_leaves() const + { + if(is_leaf()) + return 1; + else + return (_left ? _left->nb_leaves() : 0) + + (_right ? _right->nb_leaves() : 0); + } + protected: void boxes_list_push(std::list>>& l, const IntervalVector_& intersect = IntervalVector_()) const