WeightedAdjacencyGraph

WeightedAdjacencyGraph[wmat]
gives the graph with weighted adjacency matrix wmat.

WeightedAdjacencyGraph[{v1, v2, ...}, wmat]
gives the graph with vertices and weighted adjacency matrix wmat.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Construct a graph from a weighted adjacency matrix:

In[1]:=
Click for copyable input
Out[1]=

A symmetric weighted adjacency matrix results in an undirected graph:

In[1]:=
Click for copyable input
Out[1]=
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »