def __eq__(self, other):
def links_eq():<EOL><INDENT>for edge in self.edges():<EOL><INDENT>for link in self.links(edge):<EOL><INDENT>if (link not in other.links(edge)): return False<EOL><DEDENT><DEDENT>for edge in other.edges():<EOL><INDENT>for link in other.links(edge):<EOL><INDENT>if (link not in self.links(edge)): return False<EOL><DEDENT><DEDENT>return True<EOL><DEDENT>return common.__eq__(self, other) and links_eq() and labeling.__eq__(self, other)<EOL>
Return whether this hypergraph is equal to another one.

@type other: hypergraph
@param other: Other hypergraph

@rtype: boolean
@return: Whether this hypergraph and the other are equal.