示例#1
0
	def initialRead(self):
		"""
		initialize the calculator with size of the spreadsheet

		args: 
			None

		return:
			cells with 0 in-degree
		"""
		for row in xrange(self.row):
			for col in xrange(self.col):
				value = sys.stdin.readline()
				new_cell = Cell(self.calId(row,col), value)
				new_cell.evaluate(self.cellBook)
				if not new_cell.evaluated:
					self.dependencyGraph[new_cell.getId()] = new_cell.getDependency()
					self.cellsWithDepen.append(new_cell.getId())
					self.cells[new_cell.getId()] = new_cell