Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# First some classes to implement graph theory. These aren't supposed to know
# anything about Physics.
class Node(object):
"""Nodes are told about the edges that exist as they are created, so
they know about each other. This means that a set of connected Nodes can be
referred to by any one of them; none are special."""