code: public void computeMST(double[][] costs, UndirectedGraph graph) throws ContradictionException {
  		g = graph;
  		for (int i = 0; i < n; i++) {
  			Tree.getNeighOf(i).clear();
  		}
  		this.costs = costs;
  		heap.clear();
  		inTree.clear();
  		treeCost = 0;
  		tSize = 0;
  		prim();
  	}
docs: ***********************************************************************************