A weighted graph is a graph in which vertices, edges, or both vertices and edges are assigned numerical values known as weights. A weighted graph is therefore a special type of labeled graph in which the labels are numbers (most commonly taken as nonnegative or positive).
A graph containing a weight for each vertex is known as a vertex-weighted graph, while a graph with a weight for each edge is known as an edge-weighted graph.