Ticket #850 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

[with patch] [tested by cwitty] graphs: create graph by specifying vertices and a function giving adjacencies

Reported by: jason Owned by: was
Priority: major Milestone: sage-2.8.7
Component: combinatorics Keywords: graphs
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

It would be very useful to be able to create a graph by giving a list of vertices and a function which specified the adjacencies. See the doc examples in the patch for several examples.

Attachments

function-init.patch Download (5.2 KB) - added by jason 3 years ago.

Change History

Changed 3 years ago by jason

Changed 3 years ago by jason

  • summary changed from graphs: create graph by specifying vertices and a function giving adjacencies to [with patch] graphs: create graph by specifying vertices and a function giving adjacencies

I just noticed that the comment in the DiGraph? init function should be changed from:

# Pass XGraph a dict of lists describing the adjacencies

to

# Pass XDiGraph a dict of lists describing the adjacencies

Sorry.

Changed 3 years ago by cwitty

  • summary changed from [with patch] graphs: create graph by specifying vertices and a function giving adjacencies to [with patch] [tested by cwitty] graphs: create graph by specifying vertices and a function giving adjacencies

Changed 3 years ago by was

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.