WeightedGraphQ
Details
- WeightedGraphQ will give True if there is an explicit VertexWeight or EdgeWeight property defined.
- In cases where a weighted graph is expected, the default vertex and edge weights are taken to be 1.
- Weights are often taken to mean cost, capacity, etc.
Examples
open allclose allScope (4)
Test undirected and directed graphs:
WeightedGraphQ gives False for anything that is not a weighted graph:
Possible Issues (1)
WeightedGraphQ gives False for non-explicit graphs:
Wolfram Research (2010), WeightedGraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/WeightedGraphQ.html.
Text
Wolfram Research (2010), WeightedGraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/WeightedGraphQ.html.
CMS
Wolfram Language. 2010. "WeightedGraphQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WeightedGraphQ.html.
APA
Wolfram Language. (2010). WeightedGraphQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WeightedGraphQ.html