Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

labelling the edges of poset

P = SetPartitions(3) f = lambda q,p: q in p.refinements() Po = Poset((P,f))

By using this command I have defined a poset in sage.

Po.show() displays the poset as a directed graph. My question is how to put labels to edges of this graph. when I try to do so, I try to iterate over the edge set like:

for u in Po.edges() :

but sage saying the error message that poset object has no method edges.

Can any one tell me how to put label for this directed graph.

If we define the corresponding Hasse diagram then we can define label, but I want to do label for the edges in the poset but not for the edges in the Hasse diagram. because when we display the pose it looks nice to see, but when we print Hasse diagram it looks little messy.

Thanks for your valuable time.

click to hide/show revision 2
retagged

labelling the edges of poset

P = SetPartitions(3) f = lambda q,p: q in p.refinements() Po = Poset((P,f))

By using this command I have defined a poset in sage.

Po.show() displays the poset as a directed graph. My question is how to put labels to edges of this graph. when I try to do so, I try to iterate over the edge set like:

for u in Po.edges() :

but sage saying the error message that poset object has no method edges.

Can any one tell me how to put label for this directed graph.

If we define the corresponding Hasse diagram then we can define label, but I want to do label for the edges in the poset but not for the edges in the Hasse diagram. because when we display the pose it looks nice to see, but when we print Hasse diagram it looks little messy.

Thanks for your valuable time.