EdgeRules

EdgeRules[g]

gives the list of edge rules for the graph g.

EdgeRules[{vw,}]

uses rules vw to specify the graph g.

Details

  • EdgeRules[g] returns the list of edge rules in the order used by the graph g.
  • Undirected edges uv and directed edges uv are both represented as the rule u->v.

Examples

open allclose all

Basic Examples  (2)

The list of edge rules for an explicitly constructed graph:

For a parametrically constructed graph:

Scope  (4)

EdgeRules works with undirected graphs:

Directed graphs:

Use rules to specify the graph:

EdgeRules works with large graphs:

Properties & Relations  (8)

EdgeRules gives rules for undirected graphs:

Reconstruct the undirected graph:

EdgeRules gives rules for directed graphs:

Reconstruct the directed graph:

Rules cannot represent isolated vertices:

Reconstructing the graph from EdgeRules excludes isolated vertices:

Including the vertex list reconstructs the full graph:

EdgeRules can be found using EdgeList:

EdgeCount can be found using EdgeRules:

Rules are given in the same order they are entered for Graph:

Edge rules can be explicitly specified in Graph:

TreeGraph:

PathGraph:

Use EdgeRules to extract the AnnotationValue of edges:

Wolfram Research (2010), EdgeRules, Wolfram Language function, https://reference.wolfram.com/language/ref/EdgeRules.html (updated 2015).

Text

Wolfram Research (2010), EdgeRules, Wolfram Language function, https://reference.wolfram.com/language/ref/EdgeRules.html (updated 2015).

CMS

Wolfram Language. 2010. "EdgeRules." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/EdgeRules.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_edgerules, author="Wolfram Research", title="{EdgeRules}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/EdgeRules.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_edgerules, organization={Wolfram Research}, title={EdgeRules}, year={2015}, url={https://reference.wolfram.com/language/ref/EdgeRules.html}, note=[Accessed: 21-November-2024 ]}