update matrix.pig and graph.pig