added a new helper class
added method squareByMatrix
This method also change the graph to its square, but it uses the matrix
of the graph to do so.