// TODO: LOOK AT WHERE MAP AND SET CAN BE USED INSTEAD OF CRAZY THINGS I HAVE BEEN DOING WITH SHARE_PTR ADDRESS COMPARISONS EG SORT_BOUNDARIES SORT_REGIONS
// Boundary may be discontinuous (e.g. multiple overlapping curves). Therefore, multiple DiscreteBoundaries may be returned (in general, upper != lower)