1 | initial version |
Like this
def _libgap_(self):
"""
self = a directed graph with vertices 0, ... , n-1
"""
from sage.libs.gap.libgap import libgap
libgap.LoadPackage("QPA")
L = [(x + 1, y + 1, f"x_i")
for i, (x, y) in enumerate(self.edges(labels=False))]
return libgap.Quiver(dg.num_verts(), L)
2 | No.2 Revision |
Like this
def _libgap_(self):
"""
self = a directed graph with vertices 0, ... , n-1
"""
from sage.libs.gap.libgap import libgap
libgap.LoadPackage("QPA")
L = [(x + 1, y + 1, f"x_i")
f"x_{i}")
for i, (x, y) in enumerate(self.edges(labels=False))]
return libgap.Quiver(dg.num_verts(), L)
3 | No.3 Revision |
Like this
def _libgap_(self):
"""
self = a directed graph with vertices 0, ... , n-1
"""
from sage.libs.gap.libgap import libgap
libgap.LoadPackage("QPA")
L = [(x + 1, y + 1, f"x_{i}")
f"x_{i + 1}")
for i, (x, y) in enumerate(self.edges(labels=False))]
return libgap.Quiver(dg.num_verts(), L)
4 | No.4 Revision |
Like this
def _libgap_(self):
"""
self = a directed graph with vertices 0, ... , n-1
"""
from sage.libs.gap.libgap import libgap
libgap.LoadPackage("QPA")
L = [(x + 1, y + 1, f"x_{i + 1}")
for i, (x, y) in enumerate(self.edges(labels=False))]
return libgap.Quiver(dg.num_verts(), libgap.Quiver(self.num_verts(), L)
example
sage: G = DiGraph([(0, 4), (3, 2), (4, 5), (5, 1), (5, 3)])
sage: _libgap_(G)
<quiver with 6 vertices and 5 arrows>