Skip to content

Unintuitive is_in() semantics #391

@Akash504-ai

Description

@Akash504-ai

Describe the issue
volume_cooling_balls.hpp relies on is_in() return values to count points inside various convex bodies. The code assumes that a return value of -1 indicates that a point lies inside the body.
However, different convex body implementations (HPolytope, Ball, BallIntersectPolytope, etc.) use different return conventions for is_in(), and recent changes updated the semantics for some bodies but not all.
This can lead to silent miscounting during ratio and convergence estimation, depending on the concrete convex body type used.

Impact
The issue does not cause crashes but may affect correctness of volume estimates due to inconsistent inside/outside classification.

Additional context
This is a semantic consistency issue rather than a localized bug, and resolving it likely requires either:

  • clarifying and enforcing a uniform is_in() contract, or
  • updating call sites to explicitly compare against documented semantics per convex body type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions