Skip to content

Conversation

@rubenpoppe
Copy link

@rubenpoppe rubenpoppe commented Jan 13, 2023

Adds the methods IntersectingLabels and VisitIntersectingCells as well as the testing.

@google-cla
Copy link

google-cla bot commented Jan 13, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

neilaram1 added a commit to MadHive/geo that referenced this pull request Mar 18, 2023
neilaram1 added a commit to MadHive/geo that referenced this pull request Mar 18, 2023
neilaram1 added a commit to MadHive/geo that referenced this pull request Mar 18, 2023
neilaram1 added a commit to MadHive/geo that referenced this pull request Mar 18, 2023
neilaram1 added a commit to MadHive/geo that referenced this pull request Mar 20, 2023
@panmari
Copy link
Collaborator

panmari commented Apr 25, 2025

@jmr what else is necessary to make this mergeable? Do you want me to review?

rangeIter.Begin()

for ok := true; ok; ok = pos != len(target) {
if rangeIter.LimitID() <= target[pos].RangeMin() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In C++ this was if rangeIter.LimitID() <= rangeIter.RangeMin() { is there a reason it's not like that here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In C++ it was range.limit_id() <= it->range_min() where it is an iterator derived from target. Because there's no iterator I manually iterate over the cell ids.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id = id.ChildBegin()
}
}
target.Normalize()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to Normalize wasn't in the C++. Does removing this change the test outcomes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing target.Normalize() fails the test. I can't remember why anymore (my bad, left this open for too long).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmr jmr changed the title Add CellIndex intersection Dec 30, 2025
sort.Slice(b, func(i, j int) bool {
return b[i].less(b[j])
})
return reflect.DeepEqual(a, b)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parent doesn't need to be equal and checked. (See LabelledCell in C++)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants