pub struct EdgeCutConstraintModel {
pub underlying: Arc<dyn ConstraintModel>,
/* private fields */
}Expand description
A wrapper of the user-generated ConstraintModel which prohibits traversals on selected edges. algorithms can create this wrapper with a set of “cut edges” and the search will not allow traversal of these edges.
Fields§
§underlying: Arc<dyn ConstraintModel>Implementations§
Source§impl EdgeCutConstraintModel
impl EdgeCutConstraintModel
pub fn new( underlying: Arc<dyn ConstraintModel>, cut_edges: HashSet<EdgeId>, ) -> EdgeCutConstraintModel
Trait Implementations§
Source§impl ConstraintModel for EdgeCutConstraintModel
impl ConstraintModel for EdgeCutConstraintModel
Source§fn valid_frontier(
&self,
ctx: &EdgeFrontierContext<'_>,
state: &[StateVariable],
state_model: &StateModel,
) -> Result<bool, ConstraintModelError>
fn valid_frontier( &self, ctx: &EdgeFrontierContext<'_>, state: &[StateVariable], state_model: &StateModel, ) -> Result<bool, ConstraintModelError>
Validates an edge before allowing it to be added to the search frontier. Read more
Source§fn valid_edge(&self, edge: &Edge) -> Result<bool, ConstraintModelError>
fn valid_edge(&self, edge: &Edge) -> Result<bool, ConstraintModelError>
Validates an edge independent of a search state, noting whether it
is simply impassable with this ConstraintModel configuration. Can be
called by valid_frontier as a cheaper first-pass operation. Also
used by MapModel during query map matching. Read more
Auto Trait Implementations§
impl Freeze for EdgeCutConstraintModel
impl !RefUnwindSafe for EdgeCutConstraintModel
impl Send for EdgeCutConstraintModel
impl Sync for EdgeCutConstraintModel
impl Unpin for EdgeCutConstraintModel
impl UnsafeUnpin for EdgeCutConstraintModel
impl !UnwindSafe for EdgeCutConstraintModel
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> 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