Node

class graf.Node(id='')[source]

Class for nodes within a C{Graph} instance. Each node keeps a list of in-edges and out-edges. Each collection is backed by two data structures: 1. A list (for traversals) 2. A hash map Nodes may also contain one or more C{Annotation} objects.

__init__(id='')[source]

Constructor for C{GraphElement}.

Parameters:id – C{str}
add_region(region)[source]

Adds the given region to the first link for this node

clear()[source]

Clears this node’s visited status and those of all visited descendents