Opened 11 years ago

Closed 10 years ago

#11871 closed defect (fixed)

Fix cellular automata function

Reported by: Karl-Dieter Crisman Owned by: itolkov, jason
Priority: major Milestone: sage-5.1
Component: interact Keywords: sd41
Cc: John Palmieri Merged in: sage-5.1.beta6
Authors: John Palmieri Reviewers: Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In #9623, lots of interacts were added to the library. Unfortunately, one (based on this wiki page by Pablo Angulo and Eviatar Bach) was "optimized" a bit too much. We need to replace

        for k in range(N-j, N+j+1):

by

 for k in range(0,2*N):

as in the original.

One can test this by making sure the outputs are the same as at the MathWorld site for this. Thanks to jhpalmieri for discovering this in unrelated testing at #9623.

Attachments (1)

trac_11871-cellular.patch (1.9 KB) - added by John Palmieri 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by Karl-Dieter Crisman

There's also a typo - "callular" isn't an adjective I'm familiar with in Wolfram's work :) And N is not actually used in the rule in the documentation, which has no actual output for this function! Any patch should fix those things as well.

comment:2 Changed 11 years ago by John Palmieri

Note that without applying the patch at #8708, any doctests enclosed in ''' will not be tested at all, so to test any changes here, you might want to either apply the scripts patch from #8708 or change ''' to """.

comment:3 Changed 10 years ago by John Palmieri

Authors: John Palmieri
Status: newneeds_review

Here is a patch. I don't really understand the example, so please review it carefully. This patch is based on: the wiki page cited in the description, the resulting interact (and in particular making sure the pictures look like the ones at MathWorld), and making doctests pass.

Changed 10 years ago by John Palmieri

Attachment: trac_11871-cellular.patch added

comment:4 Changed 10 years ago by Karl-Dieter Crisman

Reviewers: Karl-Dieter Crisman
Status: needs_reviewpositive_review

This is fine, thanks a lot.

<unrelated meandering comment> I guess doing the patch really is just following instructions of the reporter ;) but the math is definitely easier than, say, stable homotopy theory :) (reading this was a nice walk through memory lane in some ways, good times) and also kind of fun, you should try it. You don't have to read ANKOS to get the gist, and indeed probably shouldn't. </unrelated meandering comment>

comment:5 Changed 10 years ago by John Palmieri

Keywords: sd41 added

comment:6 Changed 10 years ago by Jeroen Demeyer

Merged in: sage-5.1.beta6
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.