[R] pivot algorithm

2006-11-27 Thread sethlatimer
I am trying to simulate a self avoiding random walk in 2d of length 100. So I am using two vectors of length 100 to encode the x and y coordinates. At each step I want apply a orthogonal transformation at a random point and then check to see if the walk intersects with itself. This amounts to

[R] matching coordinates

2006-11-19 Thread sethlatimer
I am trying to implement the so called pivot algorithm for a markov chain monte carlo simulation of self avoiding random walks. There must be a simple method of checking to see if the pivoted portion of the random walk intersects with the previous section? In other words I have a list of