pub struct ParallelFeasibilityChecker { /* private fields */ }Expand description
Parallel batch feasibility checker.
Checks N points against M constraints simultaneously using rayon. The outermost parallelism is over points (each point is independent); within a point, constraints are checked sequentially for cache efficiency.
Implementations§
Source§impl ParallelFeasibilityChecker
impl ParallelFeasibilityChecker
Sourcepub fn new(config: ParallelConfig) -> Self
pub fn new(config: ParallelConfig) -> Self
Create a new checker with the given configuration.
Sourcepub fn add_constraint(&mut self, constraint: Box<dyn FastConstraint>)
pub fn add_constraint(&mut self, constraint: Box<dyn FastConstraint>)
Add a constraint to the checker.
Sourcepub fn num_constraints(&self) -> usize
pub fn num_constraints(&self) -> usize
Number of registered constraints.
Sourcepub fn check_batch(&self, points: &Array2<f32>) -> Vec<bool>
pub fn check_batch(&self, points: &Array2<f32>) -> Vec<bool>
Check feasibility of a batch of points.
points must be a (num_points, dim) matrix in row-major order.
Returns one bool per point indicating whether all constraints are satisfied.
Auto Trait Implementations§
impl Freeze for ParallelFeasibilityChecker
impl !RefUnwindSafe for ParallelFeasibilityChecker
impl Send for ParallelFeasibilityChecker
impl Sync for ParallelFeasibilityChecker
impl Unpin for ParallelFeasibilityChecker
impl UnsafeUnpin for ParallelFeasibilityChecker
impl !UnwindSafe for ParallelFeasibilityChecker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more