is_graph_weighted function

Is the graph a weighted graph?