Reference 〉 Class
MultiDict

Edges(agentAgent)

A dict-like container for containing, creating, and removing the Edge objects that defining the networks an agent is part of. Each network is a key of the object, with the values being a list of edges of the agent in that network.

Initialization Parameters

  • agent Agent, required

    The agent whose edges the object organizes.

Methods

Click a method name for more detailed documentation.

  • add( partner, kind, direction, … )

    Creates a new Edge object between the current agent and a new agent, for use in graphs and networks.

  • inbound( kind, undirected, obj )

    Returns a list of edges for which the agent is an endpoint.

  • outbound( kind, undirected, obj )

    Returns a list of edges for which the agent is a startpoint.

  • With( partner, kind )

    Returns a list of direct connections with another agent. Does not indicate indirect connections.

    Note that the method name is capitalized, to avoid a collision with the Python with keyword.

Object Properties

  • all list[Object]

    A flat list of all elements (Agent or Edge) within the MultiDict.

    Initial value: []

  • agent Agent

    The agent whose edges the object organizes.

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.

History