Skip to content

Add SimplexIntersectBall convex body and tests#496

Open
maria-zaza wants to merge 15 commits into
GeomScale:developfrom
maria-zaza:simplex-intersect-ball-body
Open

Add SimplexIntersectBall convex body and tests#496
maria-zaza wants to merge 15 commits into
GeomScale:developfrom
maria-zaza:simplex-intersect-ball-body

Conversation

@maria-zaza

Copy link
Copy Markdown

Summary

This PR adds SimplexIntersectBall, a convex body representing the intersection of a simplex in H-representation with a unit ball.

The body models:

[
K = {x \in \mathbb{R}^d : Ax \le b,\ |x - x_0| \le 1}.
]

Implemented functionality

  • dimension()
  • num_of_hyperplanes()
  • is_in(...)
  • is_in_optimized(...)
  • line_intersect(...)
  • gc_intersect(...)
  • gc_intersect_positive(...)
  • gc_intersect_all_roots(...)
  • compute_reflection(...)
  • linear_transformIt(...)
  • shift(...)

Tests added

Adds unit tests for:

  • 2D simplex membership
  • line intersection
  • 3D tetrahedron membership
  • great-circle interval computation
  • positive great-circle intersection
  • all great-circle roots
  • incremental great-circle update against fresh recomputation
  • reflection on a tetrahedron facet

Validation

Tested locally with:

cmake --build build --target simplexintersectball_test
cd build
ctest -R simplexintersectball --output-on-failure

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant