Opened 8 years ago

Closed 8 years ago

#12293 closed defect (fixed)

Graph(n) is not documented

Reported by: zimmerma Owned by: mvngu
Priority: minor Milestone: sage-5.1
Component: documentation Keywords: sd35.5, sd40.5
Cc: Merged in: sage-5.1.beta5
Authors: Douglas McNeil Reviewers: Dan Drake
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by ddrake)

the syntax Graph(n), which apparently creates a graph with n vertices 0, 1, ..., n-1 and no edge, is not documented.

Apply attachment:trac_12293_document_graph_int_format_v3.patch

Attachments (1)

trac_12293_document_graph_int_format_v3.patch (2.3 KB) - added by ddrake 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by kcrisman

At first I thought this might have been unintended. But

        if format is None and isinstance(data, (int, Integer)):
            format = 'int'
        if format is None and data is None:
            format = 'int'
            data = 0

so apparently it is intentional.

There is

       One can very easily create a graph in Sage by typing:
    
          sage: g = Graph()
    
       By typing the name of the graph, one can get some basic information
       about it:
    
          sage: g
          Graph on 0 vertices

but that is not really documentation. Good find.

comment:2 Changed 8 years ago by dsm

  • Keywords sd40.5 added

comment:3 Changed 8 years ago by dsm

  • Status changed from new to needs_review

comment:4 Changed 8 years ago by ddrake

  • Authors set to Douglas McNeil
  • Reviewers set to Dan Drake
  • Status changed from needs_review to positive_review

Nice work. Positive review.

comment:5 Changed 8 years ago by ddrake

The change from "nodes" to "vertices" is fine. Still positive review.

comment:6 Changed 8 years ago by jdemeyer

  • Status changed from positive_review to needs_work

This needs to be rebased to sage-5.1.beta1. Keep in mind that #12874 and #12810 also touch graphs.py (I haven't checked whether these conflict with this patch).

comment:7 Changed 8 years ago by ddrake

  • Description modified (diff)
  • Status changed from needs_work to positive_review

Apply only trac_12293_document_graph_int_format_v3.patch . The v3 patch applies to 5.1.beta2.

comment:8 Changed 8 years ago by jdemeyer

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