geometry icon indicating copy to clipboard operation
geometry copied to clipboard

[experimental] update test-demo with version with lambdas

Open barendgehrels opened this issue 1 year ago • 4 comments

Hi, this is an experimental version of partition using lambdas.

For demonstration and evaluation purposes.

I'm curious to your findings.

barendgehrels avatar May 08 '23 20:05 barendgehrels

I updated this PR:

  • adding a lambda version over one range as well (like the original had)
  • applying the lambda version in buffer, which nicely removes many helper structures.

It's still in namespace experimental (so don't merge yet), I can't put it in namespace geometry because it conflicts with the structure partition. Any suggestions?

barendgehrels avatar Sep 29 '23 12:09 barendgehrels

I updated this PR:

  • adding a lambda version over one range as well (like the original had)
  • applying the lambda version in buffer, which nicely removes many helper structures.

It's still in namespace experimental (so don't merge yet), I can't put it in namespace geometry because it conflicts with the structure partition. Any suggestions?

I'm now using detail::lambda_partition. Still to do:

  • use it in disjoint
  • use it in is_valid
  • use it in relate So it's getting there.

Then we can deprecate partition itself because it is not used inside the library.

In a next Boost version, we can delete it and rename partition_lambda to just partition.

barendgehrels avatar Oct 04 '23 13:10 barendgehrels

gcc 5 now reports:

/home/gehrels/git_public/boost/boost/geometry/algorithms/detail/overlay/get_turns.hpp:524:32: error: request for member ‘bounding_box’ in ‘sec’, which is of non-class type ‘const int’
                geometry::expand(box, sec.bounding_box, strategy);

This is inconvenient and wrong, it is there and correct. And it is only for the second lambda...

Any idea how to circumvent this?

barendgehrels avatar Oct 04 '23 14:10 barendgehrels

which is of non-class type ‘const int’

It confuses the two overloads of partition_lambda... If I use different names, it works. But that is less convenient.... To be continued.

barendgehrels avatar Oct 04 '23 14:10 barendgehrels