get_edges#

get_edges(domain, network_name=None, edge_weight_name=None)#

Get the edges of a network as edge values and object IDs. The object IDs will be repeated for each edge (i.e. if an edge is between nodes A and B, the value will be repeated for both A and B). If edge_weight_name is None, all edge values will be 1.

Parameters:
domainobject

The domain containing the objects and network of interest.

network_namestr, optional

The name of the network within the domain from which to get edges, by default None.

edge_weight_namestr, optional

The name of the edge attribute to use as edge values. If None, all edges will have a value of 1, by default None.

Returns:
edge_valuesnumpy.ndarray

The values of the edges selected by the query, based on the edge attribute specified by edge_weight_name. The length of edge_values will be the same as the length of object_ids, and the values will be repeated for each edge (i.e. if an edge is between nodes A and B, the value will be repeated for both A and B). If edge_weight_name is None, all edge values will be 1.

object_idsnumpy.ndarray

The indices of the objects selected by the query.