Combinatorica Package >

ToAdjacencyMatrix

ToAdjacencyMatrix[g]
constructs an adjacency matrix representation for graph g.
ToAdjacencyMatrix[g, EdgeWeight]
returns edge weights as entries of the adjacency matrix with Infinity representing missing edges.
  • An option Type that takes on values All or Simple can be used to affect the matrix constructed.
  • Type->All is the default, and Type->Simple ignores any self-loops or multiple edges g may have.
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team