Skip to content

IsLoopFreeGraph ​

Whether a Graph has no self-loop.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageLoopFreeGraphQ✓
IsLoopFreeGraph(g)true iff no edge of g joins a vertex to itself.
Typed signatures
TypePackageApplies
(value) -> booleancombinatoricsalways

Domain: Collections

Details
  • Wolfram calls this LoopFreeGraphQ; this library uses the Is… spelling everywhere.

Examples

Basic #
live ↗
InIsLoopFreeGraph(Graph([UndirectedEdge(1,2)]))\mathrm{IsLoopFreeGraph}(\mathrm{Graph}(\bigl\lbrack\mathrm{UndirectedEdge}(1, 2)\bigr\rbrack))OutTrue\mathrm{True}
live ↗
InIsLoopFreeGraph(Graph([UndirectedEdge(1,1)]))\mathrm{IsLoopFreeGraph}(\mathrm{Graph}(\bigl\lbrack\mathrm{UndirectedEdge}(1, 1)\bigr\rbrack))OutFalse\mathrm{False}
About
Examples2
Checked againstWolfram Language 2 agreeSageMath 2 agree
CrosswalkWolfram Language

Implementation

mappedsagepackages/oracle/src/mappings.ts

See also: IsSimpleGraph