Package rosgraph :: Package impl :: Module graph :: Class EdgeList
[frames] | no frames]

Class EdgeList

source code

object --+
         |
        EdgeList

Data structure for storing Edge instances

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__iter__(self) source code
bool
has(self, edge)
Returns: True if edge is in edge list
source code
 
add(self, edge)
Add an edge to our internal representation.
source code
bool
add_edges(self, start, dest, direction, label='')
Create Edge instances for args and add resulting edges to edge list.
source code
 
delete_all(self, node)
Delete all edges that start or end at node
source code
 
delete(self, edge) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  edges_by_end
  edges_by_start

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

has(self, edge)

source code 
Returns: bool
True if edge is in edge list

add(self, edge)

source code 

Add an edge to our internal representation. not multi-thread safe

Parameters:
  • edge (Edge) - edge to add

add_edges(self, start, dest, direction, label='')

source code 

Create Edge instances for args and add resulting edges to edge list. Convenience method to avoid repetitve logging, etc...

Parameters:
  • edge_list (EdgeList) - data structure to add edge to
  • start (str) - name of start node. If None, warning will be logged and add fails
  • dest (str) - name of start node. If None, warning will be logged and add fails
  • direction (str) - direction string (i/o/b)
Returns: bool
True if update occured

delete_all(self, node)

source code 

Delete all edges that start or end at node

Parameters:
  • node (str) - name of node