pysal.lib.weights.
netW
(link_list, share='A', transform='r')[source]¶Create a networkcontiguity based weight object based on different nodal relationships encoded in a network.
Parameters: 


Returns: 

Examples
>>> import pysal.lib
>>> links = [('a','b'), ('a','c'), ('a','d'), ('c','d'), ('c', 'b'), ('c','a')]
>>> O = pysal.lib.weights.spintW.netW(links, share='O')
>>> O.neighbors[('a', 'b')]
[('a', 'c'), ('a', 'd')]
>>> OD = pysal.lib.weights.spintW.netW(links, share='OD')
>>> OD.neighbors[('a', 'b')]
[('a', 'c'), ('a', 'd'), ('c', 'b')]
>>> any_common = pysal.lib.weights.spintW.netW(links, share='A')
>>> any_common.neighbors[('a', 'b')]
[('a', 'c'), ('a', 'd'), ('c', 'b'), ('c', 'a')]