pub enum SafetyVerdict {
Safe,
Unsafe(Witness),
Indeterminate,
}Expand description
The result of a conservative safety check.
Over-approximations can only prove safety. A check that cannot prove it
returns SafetyVerdict::Indeterminate, never SafetyVerdict::Safe.
Variants§
Safe
The reachable set provably avoids every unsafe region.
A proof only with the sound feature; without it, up to floating-point rounding.
Unsafe(Witness)
Some reachable state provably lies in an unsafe region; carries that state.
Never produced from an over-approximated set alone: a point of the enclosure inside
an obstacle need not be reachable. Only a model’s
Reach::certify_collision hook can produce it;
without a certified witness the verdict stays SafetyVerdict::Indeterminate.
Indeterminate
Neither could be proven; refine or reject.
Implementations§
Source§impl SafetyVerdict
impl SafetyVerdict
Sourcepub const fn from_intersection(intersection: Intersection) -> Self
pub const fn from_intersection(intersection: Intersection) -> Self
The verdict for one over-approximated set against one obstacle.
Only Intersection::Disjoint proves anything, so it is the only answer that maps to
SafetyVerdict::Safe. Intersection::Intersects maps to
SafetyVerdict::Indeterminate: its witness is evaluated in plain f64 and lies in
the enclosure, not necessarily in the true reachable set.
Sourcepub const fn is_safe(&self) -> bool
pub const fn is_safe(&self) -> bool
Whether a planner may accept this result. Only SafetyVerdict::Safe is accepted.
Sourcepub fn and(self, other: Self) -> Self
pub fn and(self, other: Self) -> Self
Combines two verdicts for a compound check: SafetyVerdict::Unsafe dominates
SafetyVerdict::Indeterminate, which dominates SafetyVerdict::Safe.
The left witness wins if both are unsafe.
Trait Implementations§
Source§impl Clone for SafetyVerdict
impl Clone for SafetyVerdict
Source§impl Debug for SafetyVerdict
impl Debug for SafetyVerdict
Source§impl From<SafetyVerdict> for Validity
impl From<SafetyVerdict> for Validity
Source§fn from(verdict: SafetyVerdict) -> Self
fn from(verdict: SafetyVerdict) -> Self
Safe becomes Validity::Valid, Unsafe Validity::Invalid and Indeterminate
Validity::Unknown, which sampling-planning’s planners reject.
Source§impl PartialEq for SafetyVerdict
impl PartialEq for SafetyVerdict
impl StructuralPartialEq for SafetyVerdict
Auto Trait Implementations§
impl Forget for SafetyVerdict
impl Freeze for SafetyVerdict
impl Move for SafetyVerdict
impl RefUnwindSafe for SafetyVerdict
impl Send for SafetyVerdict
impl Sync for SafetyVerdict
impl Unpin for SafetyVerdict
impl UnsafeUnpin for SafetyVerdict
impl UnwindSafe for SafetyVerdict
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.