Re: Hash Table for self avoiding random walks
- To: mathgroup at smc.vnet.net
- Subject: [mg88497] Re: [mg88453] Hash Table for self avoiding random walks
- From: "Jason Merrill" <jwmerrill at gmail.com>
- Date: Tue, 6 May 2008 06:45:21 -0400 (EDT)
- References: <200805051017.GAA08668@smc.vnet.net>
On Mon, May 5, 2008 at 8:47 AM, W_Craig Carter <ccarter at mit.edu> wrote:
> Hello JM,
>
> I may be misunderstanding your question completely, so I am sorry if
> this suggestion is off target:
>
> atrail := Module[{trail}, NestWhile[takeStep, {{{0, 0, 0}}, trail},
> (Length[availableSteps[#]] > 0) &]]
>
> Table[atrail,{4}]
This is exactly what I was looking for. I knew there was a simple
step I was missing. About 5 minutes after posting, I came up with a
similar solution:
atrail = NestWhile[takeStep, {{{0, 0, 0}}, Unique[]},
(Length[availableSteps[#]] > 0) &]
JM
- References:
- Hash Table for self avoiding random walks
- From: "jwmerrill@gmail.com" <jwmerrill@gmail.com>
- Hash Table for self avoiding random walks