total_wt_by_edge_attr

Calculates the total sum of the specified edge weight attributes in the graph.

sasviya.network.utils.utils.total_wt_by_edge_attr(g, weight_attr=None)

Parameters

g : SAS graph object

Specifies the graph for which edge weights are summed.

weight_attr : str or None, optional

Specifies the edge attributes to sum. The default is None, meaning that unit weights are used.

Returns

int or float

Returns the sum of specified attributes over all edges in the graph.

Last updated: July 28, 2026