Return all nodes connected by the given hyperedge or all hyperedges
        connected to the given hypernode.
        
        @type  obj: hyperedge
        @param obj: Object identifier.
        
        @rtype:  list
        @return: List of node objects linked to the given hyperedge.

def links(self, obj):
        """
        Return all nodes connected by the given hyperedge or all hyperedges
        connected to the given hypernode.
        
        @type  obj: hyperedge
        @param obj: Object identifier.
        
        @rtype:  list
        @return: List of node objects linked to the given hyperedge.
        """
        if obj in self.edge_links:
            return self.edge_links[obj]
        else:
            return self.node_links[obj]