Opened 10 years ago

Closed 9 years ago

#11871 closed defect (fixed)

Fix cellular automata function

Reported by: kcrisman Owned by: itolkov, jason
Priority: major Milestone: sage-5.1
Component: interact Keywords: sd41
Cc: jhpalmieri 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


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):


 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 jhpalmieri 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by kcrisman

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 10 years ago by jhpalmieri

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 9 years ago by jhpalmieri

  • Authors set to John Palmieri
  • Status changed from new to needs_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 9 years ago by jhpalmieri

comment:4 Changed 9 years ago by kcrisman

  • Reviewers set to Karl-Dieter Crisman
  • Status changed from needs_review to positive_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 9 years ago by jhpalmieri

  • Keywords sd41 added

comment:6 Changed 9 years ago by jdemeyer

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