gaioguys / GAIO.jl

A Julia package for set oriented computations.
MIT License
8 stars 4 forks source link

Remove linear indices from BoxPartition #85

Closed April-Hannah-Lena closed 1 year ago

April-Hannah-Lena commented 1 year ago

This PR includes some upgrades to BoxPartition. Mainly, BoxPartitions now only use cartesian indices so the code is much shorter and more elegant. The key_to_box, point_to_key, point_to_box api is now exported aswell, and mentioned in the docs. Finally, a box now returns its own center and radius: calling

Q = Box(c, r)
c, r = Q

now returns the center and radius of the Box Q. Truthfully, it just became too annoying to write out Q.center, Q.radius all the time. This method to access boxes is written in the docs. Some extra BoxSet tests have also been added relating to this method.

This PR addresses #83 .