pub struct Instance<G> { /* private fields */ }Expand description
A validated MAPF instance.
Starts are pairwise distinct, goals are pairwise distinct, and every start and goal is a vertex of the graph.
Implementations§
Source§impl<G: Graph> Instance<G>
impl<G: Graph> Instance<G>
Sourcepub fn new(graph: G, agents: Vec<Agent>) -> Result<Self, InstanceError>
pub fn new(graph: G, agents: Vec<Agent>) -> Result<Self, InstanceError>
Creates an instance after checking the agents against the graph.
§Errors
InstanceError::OutOfRangeif a start or goal is not a vertex ofgraph;InstanceError::SharedStartif two agents start at the same vertex;InstanceError::SharedGoalif two agents have the same goal, which goal-stay semantics makes unsolvable.
Trait Implementations§
impl<G: Eq> Eq for Instance<G>
impl<G: PartialEq> StructuralPartialEq for Instance<G>
Auto Trait Implementations§
impl<G> Forget for Instance<G>
impl<G> Freeze for Instance<G>where
G: Freeze,
impl<G> Move for Instance<G>
impl<G> RefUnwindSafe for Instance<G>where
G: RefUnwindSafe,
impl<G> Send for Instance<G>where
G: Send,
impl<G> Sync for Instance<G>where
G: Sync,
impl<G> Unpin for Instance<G>where
G: Unpin,
impl<G> UnsafeUnpin for Instance<G>where
G: UnsafeUnpin,
impl<G> UnwindSafe for Instance<G>where
G: UnwindSafe,
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