#include <cstddef>
#include <vector>
Go to the source code of this file.
◆ RejectionSampleIntersection()
std::vector<double> RejectionSampleIntersection |
( |
const Boundary *const |
_b1, |
|
|
const Boundary *const |
_b2, |
|
|
const size_t |
_maxAttempts = 10 , |
|
|
size_t *const |
_attempts = nullptr |
|
) |
| |
|
noexcept |
Use rejection sampling to find a point on the intersection of two boundaries.
- Parameters
-
_b1 | The first boundary. |
_b2 | The second boundary. |
_maxAttempts | The maximum number of attempts. |
_attempts | Optionally returns the number of attempts made. |
- Returns
- A point within both boundaries, or an empty vector if none was found.