Package svs_simulation :: Package terrain :: Module navgraphs :: Class NavGraph
[show private | hide private]
[frames | no frames]

Class NavGraph

DGraph --+    
         |    
    UGraph --+
             |
            NavGraph

Known Subclasses:
Path

Navigation graph.
Method Summary
  __init__(self, name)
  addEdge(self, head, tail)
Adds new edge.
  addNode(self, x, y, simdata)
Creates new node and adds it to graph.
  clearTransitionNode(self, node)
Clears transition link for node.
  decode(self, data)
Sets self to encoded values.
  encode(self)
Returns encoded description of self.
  encodeEdge(self, edge)
Encodes edge data.
  enterNode(self, entity)
  exitNode(self, entity)
  getNodesInArea(self, area)
Collects nodes in specified area.
svs_simulation.simdata.simdatalib.SimData getSimDataForEdge(self, edge)
Returns simulation data for edge.
  getValidEdges(self)
Returns a list of valid edges.
  getValidNodes(self)
Returns a list of valid nodes.
  isAccessibleArea(self, area)
Checks if area can be entered.
  isValidEdge(self, edge)
Checks if edge is hidden or not.
  isValidNode(self, node)
Checks if node is hidden or not.
  removeEdge(self, edge)
Removes an edge from the graph.
  removeEdges(self, edges)
Removes listed edges from graph.
  removeNode(self, node)
Removes node from the graph.
  setSimDataForEdge(self, edge, simdata)
Attaches simulation data to edge.
  setTransitionNode(self, node, link)
Sets transition link for node.
    Inherited from UGraph
  __str__(self)
User friendly representation
  add_edge(self, head, tail, wt, data, create_nodes)
Adds a directed edge going from head to tail.
  all_degree(self, node)
The total degree of a node
  all_nbrs(self, node)
The total degree of a node
  graph_error(self, msg)
Reports an error message
  number_of_edges(self)
Returns the number of edges
    Inherited from DGraph
  __contains__(self, node)
Test whether a node is in the graph
  __iter__(self)
Iterates over all nodes in the graph
  __len__(self)
Returns the number of nodes
  __repr__(self)
User friendly and verbose representation
  add_node(self, node, data)
Creates a new node with a node.
  all_edges(self, node)
Returns a list containing all incoming and outging edges
  edge_data(self, edge)
Returns the data associated with an edge
  edge_head(self, edge)
Returns the head of the edge.
  edge_list(self)
Returns a list of all edge_ids in the graph
  edge_nodes(self, edge)
Returns the head and the tail of an edge.
  edge_tail(self, edge)
Returns the tail of the edge.
  get_edge(self, head, tail)
Returns the edge that connects the head to tail
  get_edge_data(self, edge)
Sets the data for an edge
  get_edge_wt(self, edge)
Gets the wt of the edge
  hide_edge(self, edge)
Hides an edge from the graph.
  hide_node(self, node)
Hides a node from the graph.
  inc_degree(self, node)
Returns the number of incoming edges
  inc_edges(self, node)
Returns a list of the incoming edges
  inc_nbrs(self, node)
Returns a list of nodes connected by incoming edges.
  node_data(self, node)
Returns the data associated with a node
  node_list(self)
Returns a list of the nodes in the graph.
  number_of_hidden_edges(self)
Returns the number of hidden edges.
  number_of_hidden_nodes(self)
Returns the number of hidden nodes.
  number_of_nodes(self)
Returns the number of nodes
  out_degree(self, node)
Returns the number of outgoing edges
  out_edges(self, node)
Returns a list of the outgoing edges.
  out_nbrs(self, node)
Returns a list of nodes connected by outgoing edges.
  restore_all_edges(self)
Restores all hidden edges.
  restore_all_nodes(self)
Restores all hidden nodes.
  restore_edge(self, edge)
Restores a hidden edge.
  restore_node(self, node)
Restores a hidden node
  set_edge_data(self, edge_id, edge_data)
Sets the data for an edge
  set_edge_wt(self, edge, wt)
Sets the wt of the edge

Method Details

addEdge(self, head, tail)

Adds new edge.

Checks that edge does not already exist, if it does return the existing node rather than a new one.

addNode(self, x, y, simdata=None)

Creates new node and adds it to graph.

Checks that node does not already exist, if it does return the existing node rather than a new one.

clearTransitionNode(self, node)

Clears transition link for node.

decode(self, data)

Sets self to encoded values.

@type data:dict

encode(self)

Returns encoded description of self.

@rtype:dict

encodeEdge(self, edge)

Encodes edge data.

getNodesInArea(self, area)

Collects nodes in specified area.

getSimDataForEdge(self, edge)

Returns simulation data for edge.
Returns:
svs_simulation.simdata.simdatalib.SimData

getValidEdges(self)

Returns a list of valid edges.

getValidNodes(self)

Returns a list of valid nodes.

isAccessibleArea(self, area)

Checks if area can be entered.

isValidEdge(self, edge)

Checks if edge is hidden or not.

isValidNode(self, node)

Checks if node is hidden or not.

removeEdge(self, edge)

Removes an edge from the graph.

This actually 'hides' the edge, which can be restored later. See: http://pygraphlib.sourceforge.net/doc/index.html

removeEdges(self, edges)

Removes listed edges from graph.

removeNode(self, node)

Removes node from the graph.

This actually 'hides' the node, which can be restored later. See: http://pygraphlib.sourceforge.net/doc/index.html

setSimDataForEdge(self, edge, simdata)

Attaches simulation data to edge.
Parameters:
simdata
           (type=svs_simulation.simdata.simdatalib.SimData)

setTransitionNode(self, node, link=None)

Sets transition link for node.

Generated by Epydoc 2.1 on Thu Oct 20 15:30:29 2005 http://epydoc.sf.net