Skip to main content

HasAgentIds

Trait HasAgentIds 

Source
pub trait HasAgentIds {
    // Required methods
    fn agent_ids(&self) -> Vec<AgentId> ;
    fn agent_ids_into(&self, buf: &mut Vec<AgentId>);
}
Expand description

Trait for types that can provide a snapshot of current agent IDs.

Implemented by StandardModel to allow schedulers to read agent IDs without full Model bounds.

Required Methods§

Source

fn agent_ids(&self) -> Vec<AgentId>

Collect all agent IDs into a new Vec.

Source

fn agent_ids_into(&self, buf: &mut Vec<AgentId>)

Append all agent IDs into buf (does not clear it first).

Implementors§

Source§

impl<S, A, Store, Props, R, Sch> HasAgentIds for StandardModel<S, A, Store, Props, R, Sch>
where A: Agent, S: Space, Store: AgentStore<A>, R: RngCore,