Assigns vertex weights to vertices.
This functionality does not run in MATLAB.
Graph::setVertexWeights(G
, Vertex
, VertexWeights
)
Graph::setVertexWeights(G, Vertex, VertexWeights)
returns
a graph where the vertices in Vertex
have the vertex
weights VertexWeights
.
Note:
The substitute 
How to set vertex weights with a list:
G1 := Graph::createCircleGraph(3): Graph::getVertexWeights(G1)
FAIL
was returned, because no vertex weights
were defined.
Graph::getVertices(G1); G1 := Graph::setVertexWeights(G1, [1, 3], [5, 1/2]): Graph::getVertexWeights(G1)
The first output shows all vertices and the second the assigned vertex weights.
How to set vertex weights with a table:
G1 := Graph::createCompleteGraph(3): Graph::getVertexWeights(G1)
FAIL
was returned, because no vertex weights
were defined.
G2 := Graph::createCompleteGraph(3): tbl := table(1 = 15, 3 = 20): G2 := Graph::setVertexWeights(G2, [1, 3], tbl): Graph::getVertexWeights(G2)

A graph 

A list of one or more vertices 

A list of one or more numbers, or a table consisting of the vertices with their weights. 
New graph with the corrected vertex weights.