Opened 9 years ago

Closed 9 years ago

#7733 closed defect (fixed)

Graph(g) and DiGraph(g) do not keep the embedding !

Reported by: ncohen Owned by: rlm
Priority: major Milestone: sage-4.3.4
Component: graph theory Keywords:
Cc: Merged in: sage-4.3.4.alpha1
Authors: Nathann Cohen Reviewers: Robert Miller
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Just try ::

sage: g = graphs.PetersenGraph()
sage: g.show()
sage: Graph(g).show()
sage: DiGraph(g).show()

The positions are not kept.... Why isn't Graph(g) equivalent to copy(g) ?

Nathann

Attachments (1)

trac_7733.patch (2.5 KB) - added by ncohen 9 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by ncohen

  • Status changed from new to needs_review

Two lines !

Nathann

comment:2 Changed 9 years ago by rlm

  • Status changed from needs_review to needs_work

You must provide doctests in both directions.

comment:3 Changed 9 years ago by ncohen

  • Status changed from needs_work to needs_review

Done !

Changed 9 years ago by ncohen

comment:4 Changed 9 years ago by rlm

  • Status changed from needs_review to needs_work

There is one case which is untested, going from a Graph to a DiGraph.

comment:5 Changed 9 years ago by ncohen

  • Status changed from needs_work to needs_info

What do you think of line 300 ?

sage: g = DiGraph(graphs.PetersenGraph()) 

Would you like to see an independent test for it ?

Nathann

comment:6 Changed 9 years ago by rlm

  • Authors set to Nathann Cohen
  • Reviewers set to Robert Miller
  • Status changed from needs_info to needs_review

Sorry, I must have missed that!

comment:7 Changed 9 years ago by rlm

  • Status changed from needs_review to positive_review

comment:8 Changed 9 years ago by ncohen

Thanks :-)

comment:9 Changed 9 years ago by mhansen

  • Merged in set to sage-4.3.4.alpha1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.