Package netconv :: Module network :: Class Edge
[show private | hide private]
[frames | no frames]

Class Edge


Defines a Edge and its properties
Method Summary
  __init__(self, node1, node2, id, weight, directed)
  directed(self, v)
Sets direction of edge.
  getAttribute(self, attr, attribs)
Return generic attribute for the edge
  getName(self)
Return name (canonical) of the edge
  getNode1(self)
Return 1st node of the edge
  getNode2(self)
Return 2nd node of the edge
  getWeight(self)
Return the weight of the edge
  setAttribute(self, attr, value, attribs)
Defines generic attribute for the edge
  setName(self, name)
  setNode1(self, source)
  setNode2(self, target)
  setWeight(self, w)
Defines the weight of the edge

Method Details

__init__(self, node1=None, node2=None, id=None, weight=1, directed=False)
(Constructor)

Parameters:
node1 - source node for edge
node2 - target node for edge
weight - weight of edge

directed(self, v=None)

Sets direction of edge.
Parameters:
v - True/False
Returns:
direction if v is not specified

getAttribute(self, attr, attribs=None)

Parameters:
attr - attribute to be read
attribs - dict of attributes
Returns:
generic attribute for the edge

getName(self)

Returns:
name (canonical) of the edge

getNode1(self)

Returns:
1st node of the edge

getNode2(self)

Returns:
2nd node of the edge

getWeight(self)

Returns:
the weight of the edge

setAttribute(self, attr, value, attribs=None)

Defines generic attribute for the edge
Parameters:
attr - attribute to be set (can be a tuple)
value - value of attribute
attribs - dict of attributes

setName(self, name)

Parameters:
name - name (canonical) of the edge

setNode1(self, source)

Parameters:
source - 1st node of the edge

setNode2(self, target)

Parameters:
target - 2nd node of the edge

setWeight(self, w)

Defines the weight of the edge
Parameters:
w - weight

Generated by Epydoc 2.1 on Tue Aug 30 11:04:16 2005 http://epydoc.sf.net