Skip to main content

nearby_ids_except

Function nearby_ids_except 

Source
pub fn nearby_ids_except<S, A, Store, Props, R, Sch>(
    model: &StandardModel<S, A, Store, Props, R, Sch>,
    position: &A::Position,
    radius: usize,
    exclude_id: AgentId,
) -> Vec<AgentId> 
where A: PositionedAgent, S: SpaceInteraction<A>, Store: AgentStore<A>, R: RngCore, Sch: Scheduler<StandardModel<S, A, Store, Props, R, Sch>>,
Expand description

Query agent IDs near a position, excluding a specific agent.

The meaning of radius depends on the space: grid cells (Chebyshev), Euclidean distance (continuous), or graph hops (graph).