Combinatorica`
Combinatorica`

Graph

As of Version 10, most of the functionality of the Combinatorica package is built into the Wolfram System. »

Graph[e,v,opts]

represents a graph object where e is the list of edges annotated with graphics options, v is a list of vertices annotated with graphics options, and opts is a set of global graph options.

Details and Options

  • Graph functionality is now available in the built-in Wolfram Language function Graph.
  • To use Graph, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
  • e has the form {{{i_(1),j_(1)},opts_(1)},{{i_(2),j_(2)},opts_(2)},...}, where {i_(1),j_(1)}, {i_(2),j_(2)}, are edges of the graph and opts_(1), opts_(2), are options that respectively apply to these edges.
  • v has the form {{{x_(1),y_(1)},opts_(1)},{{x_(2),y_(2)},opts_(2)},...}, where {x_(1),y_(1)}, {x_(2),y_(2)}, respectively denote the coordinates in the plane of vertex 1, vertex 2, and opts_(1), opts_(2), are options that respectively apply to these vertices.
  • Permitted edge options are EdgeWeight, EdgeColor, EdgeStyle, EdgeLabel, EdgeLabelColor, and EdgeLabelPosition.
  • Permitted vertex options are VertexWeight, VertexColor, VertexStyle, VertexNumber, VertexNumberColor, VertexNumberPosition, VertexLabel, VertexLabelColor, and VertexLabelPosition.
  • The third item in a Graph object is opts, a sequence of zero or more global options that apply to all vertices or all edges or to the graph as a whole.
  • All edge options and vertex options can be used as global options also.
  • If a global option and a local edge option or vertex option differ, then the local edge or vertex option is used for that particular edge or vertex.
  • In addition to these options, the following two options can be specified as part of the global options: LoopPosition and EdgeDirection.
  • Furthermore, all the options of the Wolfram Language function Plot can be used as global options in a Graph object. These can be used to specify how the graph looks when it is drawn.
  • Also, all options of the graphics primitive Arrow can also be specified as part of global graph options. These can be used to affect the look of arrows that represent directed edges.
  • See the usage message of individual options to find out more about values these options can take on.
  • Whether a graph is undirected or directed is given by the option EdgeDirection. This has default value False. For undirected graphs, the edges {i_(1),j_(1)}, {i_(2),j_(2)}, have to satisfy , , and for directed graphs the edges {i_(1),j_(1)}, {i_(2),j_(2)}, are treated as ordered pairs, each specifying the direction of the edge as well.
Wolfram Research (2012), Graph, Wolfram Language function, https://reference.wolfram.com/language/Combinatorica/ref/Graph.html.

Text

Wolfram Research (2012), Graph, Wolfram Language function, https://reference.wolfram.com/language/Combinatorica/ref/Graph.html.

CMS

Wolfram Language. 2012. "Graph." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/Graph.html.

APA

Wolfram Language. (2012). Graph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/Combinatorica/ref/Graph.html

BibTeX

@misc{reference.wolfram_2024_graph, author="Wolfram Research", title="{Graph}", year="2012", howpublished="\url{https://reference.wolfram.com/language/Combinatorica/ref/Graph.html}", note=[Accessed: 24-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_graph, organization={Wolfram Research}, title={Graph}, year={2012}, url={https://reference.wolfram.com/language/Combinatorica/ref/Graph.html}, note=[Accessed: 24-April-2024 ]}