Combinatorica Package >

ToAdjacencyLists

ToAdjacencyLists[g]
constructs an adjacency list representation for graph g.
ToAdjacencyLists[g, EdgeWeight]
returns an adjacency list representation along with edge weights.
  • An option called Type that takes on values All or Simple can be given.
  • Type->All is the default setting of the option, and this permits self-loops and multiple edges to be reported in the adjacency lists.
  • Type->Simple deletes self-loops and multiple edges from the constructed adjacency lists.
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team