Hello Sean,

Modified Test.java for your attention.
The incorrect listing is in "Neighbors - false exclude origin".
In each case the list order is different between the include and exclude output.

Observe the printout and you will see what I mean.

Stewart.

On 16 May 2018 at 21:28, Sean Luke <[log in to unmask]> wrote:
getVonNeumannNeighbors calls getVonNeumannLocations to get locations, then extracts the elements at those locations.  So if you're having issues with the wrong stuff being returned, with a high probability it's getVonNeumannLocations.

Sean

> On May 16, 2018, at 3:27 PM, Stewart Aitken <00000068a29a4109-dmarc-[log in to unmask]> wrote:
>
> Thanks Sean,
>
> One thing that strikes me straight away is you are using:
>
> grid.getVonNeumannLocations(0, 8, 1, Grid2D.BOUNDED, true, xs, ys);
>
> and I am using:
>
> mySpace.getVonNeumannNeighbors(myX, myY, hop, Grid2D.BOUNDED, true, result, xNeighbors, yNeighbors);
>
> Is this incorrect?
>
> Having run your Test.java, I get the same results as you.
>
> Kind regards,
>
> Stewart.
>
>
>
>
> On 15 May 2018 at 21:37, Sean Luke <[log in to unmask]> wrote:
> > On May 12, 2018, at 3:36 PM, Stewart Aitken <00000068a29a4109-dmarc-[log in to unmask]> wrote:
> >
> > Hi Sean,
> >
> > Downloaded all of the updated files and added them to my MASON project in eclipse,
> > carried out a clean and rebuild and it made no difference.
> >
> > Here are some outputs from the von Neumann Neighbourhood:
> > Remember, the width and height count from 1 and the outputs count from 0.
> > That accounts for the difference seen.
>
>
> I'm sorry Stewart, but your message was just too cryptic to parse.  To nail down your problem, I need a specific and simple example, in code, of expected results and deviations.  To get you started, I made a little test program which prints out location results from the distance=1 von Neumann neighborhood at various locations in a 7x15 grid and with various modes.  You could modify this to find an example where it's producing the wrong results. [so far it seems correct]
>
>
>
>
> Sean
>
> Here's what I'm getting printed out in the current version of MASON BTW:
>
>
>
> Bounded 7x15 Center: (0,8)
> 0: (0, 7)
> 1: (0, 8)
> 2: (0, 9)
> 3: (1, 8)
> Unbounded 7x15 Center: (0,8)
> 0: (-1, 8)
> 1: (0, 7)
> 2: (0, 8)
> 3: (0, 9)
> 4: (1, 8)
> Toroidal 7x15 Center: (0,8)
> 0: (6, 8)
> 1: (0, 7)
> 2: (0, 8)
> 3: (0, 9)
> 4: (1, 8)
> Bounded 7x15 Center: (0,0)
> 0: (0, 0)
> 1: (0, 1)
> 2: (1, 0)
> Unbounded 7x15 Center: (0,0)
> 0: (-1, 0)
> 1: (0, -1)
> 2: (0, 0)
> 3: (0, 1)
> 4: (1, 0)
> Toroidal 7x15 Center: (0,0)
> 0: (6, 0)
> 1: (0, 14)
> 2: (0, 0)
> 3: (0, 1)
> 4: (1, 0)
> Bounded 7x15 Center: (6, 14)
> 0: (5, 14)
> 1: (6, 13)
> 2: (6, 14)
> Unbounded 7x15 Center: (6, 14)
> 0: (5, 14)
> 1: (6, 13)
> 2: (6, 14)
> 3: (6, 15)
> 4: (7, 14)
> Toroidal 7x15 Center: (6, 14)
> 0: (5, 14)
> 1: (6, 13)
> 2: (6, 14)
> 3: (6, 0)
> 4: (0, 14)
> Bounded 7x15 Center: (4, 0)
> 0: (3, 0)
> 1: (4, 0)
> 2: (4, 1)
> 3: (5, 0)
> Unbounded 7x15 Center: (4, 0)
> 0: (3, 0)
> 1: (4, -1)
> 2: (4, 0)
> 3: (4, 1)
> 4: (5, 0)
> Toroidal 7x15 Center: (4, 0)
> 0: (3, 0)
> 1: (4, 14)
> 2: (4, 0)
> 3: (4, 1)
> 4: (5, 0)
> Bounded 7x15 Center: (4, 8)
> 0: (3, 8)
> 1: (4, 7)
> 2: (4, 8)
> 3: (4, 9)
> 4: (5, 8)
> Unbounded 7x15 Center: (4, 8)
> 0: (3, 8)
> 1: (4, 7)
> 2: (4, 8)
> 3: (4, 9)
> 4: (5, 8)
> Toroidal 7x15 Center: (4, 8)
> 0: (3, 8)
> 1: (4, 7)
> 2: (4, 8)
> 3: (4, 9)
> 4: (5, 8)
>
>
>
>
>
> --
>
>
>
> EMAIL DISCLAIMER http://secure-web.cisco.com/1ejZdv09xipqWR5r9Pp1BOI1wCXg-Mw7_OS6HIE19wLC0KMJYrr15cKvsEeBqXSqQROtbGcjFVQYzS1dH8rrLqfu9keBZFOwTORhpS6nv03iK3n4Rfprcyye4-E6ncmWCQt2qyCT8O6DOP6Bzba8FMMtjP9m9GcIPzCx8jVG3s2TBK95C2QlkDIqiojxkfqtyY-v2y-ePSDVdps9QzfDGym6J-Ppo1Gp-sXLRW3hGyr1T4oQs-dzpb46WVVrynykUX1Lu_iwbBwIcHpTt_JSY5-NN156rzA_xvLlWf-Neq1JEgnBDWa5jElATLlvhFqVwW1W_qoDkcGujOBdcqSvrAaOrwo-sdpC_ASSxHbHrekIxJOGHNyNxsxjt2bshRCCoxVzj6xcSZUaLQpoSrypVLNxDCC01KXo7QaE_8kHt7xYyDFDAEI01fJZbYTiuEGe0fodYtyq9UInEFdGFRtBeyA/http%3A%2F%2Fwww.york.ac.uk%2Fdocs%2Fdisclaimer%2Femail.htm



--



EMAIL DISCLAIMER http://www.york.ac.uk/docs/disclaimer/email.htm