Skip to content

Commit 7aaf9a6

Browse files
committed
fix
1 parent 7e340c4 commit 7aaf9a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace py = pybind11;
77

88
using T = int64_t; // is a temporary type of template. You can change it and
99
// recompile this.
10-
const int B = 6; // the number of children of tree.
10+
const int B = 2; // the number of children of tree.
1111

1212
PYBIND11_MODULE(PRTree, m)
1313
{

cpp/prtree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,12 @@ class PRTreeElement
645645
is_used = true;
646646
}
647647

648-
bool operator()(const BB<D> &target) { return mbb(target); }
648+
bool operator()(const BB<D> &target) { return is_used && mbb(target); }
649649

650650
template <class Archive>
651651
void serialize(Archive &archive)
652652
{
653-
archive(mbb, leaf);
653+
archive(mbb, leaf, is_used);
654654
}
655655
};
656656

0 commit comments

Comments
 (0)