add finalize() method to lock the graph; givens are now in topological order to maintain consistency
add finalize() method to lock the graph; givens are now in topological order to maintain consistency

dasayan05/probml