Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: Dashing[{}]
  • Next by Date: Re: Dashing[{}]
  • Previous by thread: Hash Table for self avoiding random walks
  • Next by thread: Re: Hash Table for self avoiding random walks