added degree vetor in Matrix class and associated functions to retrieve the degree of a vertex.