Returns a comparison function for a numerical edge attribute.
The value(s) of the attr(s) must be numerical and sortable. If the sorted list of values from G1 and G2 are the same within some tolerance, then the constructed function returns True.
Parameters : | attr : string | list
default : value | list
rtol : float
atol : float
|
---|---|
Returns : | match : function
|
Examples
>>> import networkx.algorithms.isomorphism as iso
>>> nm = iso.numerical_multiedge_match('weight', 1.0)
>>> nm = iso.numerical_multiedge_match(['weight', 'linewidth'], [.25, .5])