Category : intersection I am attempting to find the intersections of many polygons_with_holes to check the topology of a map. However, when using the CGAL::intersection() defined here (under 2D Regularized Boolean Set-Operations), the run time for one check exceeds 1 minute, sometimes reaching close to 2 minutes. I have about 60-70 polygons with holes, with a total of ..

I have two vectors containing integers, I can get an intersection of those vectors, but that only gives me the values, I also want to know the index positions/keys of the original items. How can I do this? I have tried to use lower_bound to search each vector for the items in the intersection to ..

I’m new here ! I just learned at school how to use vectors ! I wrote the code that I wrote on paper in c++ and I got a complete mess ! Basically what I need to do is find the elements that are also in vector A and vector B . I am attaching ..

There are two sets of segments M and N. There are requests to add segments to these sets. After each request, I need to print how many intersections are there in the total. How to do it in O(log|M|+log|N|)? Source: Windows Que..

I am trying to figure out how to calculate the point of intersection between two line segments – if it exists. However, I would like to know if the intersection exists for two line segments in their current form. For eg: Two lines if they are not parallel, will meet at some point if we ..

These are my answers for a codeforces problem and I don’t know why the first snippet gives a wrong answer. The second is accepted though. I want to know if there is a problem with the judgment test cases because they seem to give the same output. The problem says the following: Given the boundaries ..

I’m trying to check if there’s an intersection between a four-sided frustum that’s composed of a top, bottom, left and right plane (no near or far plane) and an oriented bounding box in 3D using C++. The result should be true if any part of the OBB is inside the frustum even only partially and ..