jweinst1
12/17/2015 - 9:09 AM

mapper.py

mapper.py

class mnode (object):
	#mapping node
	
	def __init__(self, value, connections=[]):
		self.value = value
		self.connections = connections
	
def addnode(mapp, value):
	mapp.connections.append(mnode(value, [mapp]))
	
class mapnode (object):
	
	def __init__(self, value):
		self.value = value
	def addnode(self, val):
		self.__dict__[val] = mapnode(val)
		self.__dict__[val].__dict__[self.value] = self