pub trait RemovableNeighbors<Sp: StateSpace>: NearestNeighbors<Sp> {
// Required method
fn remove(&mut self, id: usize) -> bool;
}Expand description
A NearestNeighbors structure that can also forget nodes.
Planners that keep only a sparse set of active nodes (SST) need this. It is a separate trait so that structures that cannot remove cheaply still work with every other planner.
Required Methods§
Sourcefn remove(&mut self, id: usize) -> bool
fn remove(&mut self, id: usize) -> bool
Removes the node with id. Returns whether such a node was stored.
Ids should be unique among the stored nodes; if an id was inserted twice, which of the two nodes is removed depends on the structure. A removed id may be inserted again, and then counts as the newest node for tie breaking.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".