Print

Print


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_OS6HIE19wLC0KMJYrr15cKvsEeBqXS
> qQROtbGcjFVQYzS1dH8rrLqfu9keBZFOwTORhpS6nv03iK3n4Rfprcyye4-
> E6ncmWCQt2qyCT8O6DOP6Bzba8FMMtjP9m9GcIPzCx8jVG3s2TBK95C2QlkD
> IqiojxkfqtyY-v2y-ePSDVdps9QzfDGym6J-Ppo1Gp-sXLRW3hGyr1T4oQs-
> dzpb46WVVrynykUX1Lu_iwbBwIcHpTt_JSY5-NN156rzA_xvLlWf-
> Neq1JEgnBDWa5jElATLlvhFqVwW1W_qoDkcGujOBdcqSvrAaOrwo-sdpC_
> ASSxHbHrekIxJOGHNyNxsxjt2bshRCCoxVzj6xcSZUaLQpoSrypVLNxDCC01KXo7QaE_
> 8kHt7xYyDFDAEI01fJZbYTiuEGe0fodYtyq9UInEFdGFRtBeyA/http%3A%
> 2F%2Fhttp://secure-web.cisco.com/1Gl-Xktow8Qb-9LUBvM3w1Im4Km_u-1rZ06XXf5Uk4R1gsrBCGcEoI0pmYN1TeeYk5QLhC7EzCLaQxgbV6gGB3a5fltg9bX80IDKD1A1JIUEjE7duqAterXin2UiPVXyYlaKzlMVrchDD3QTu7-bAX7j0JjDSXHNfnKhhVG_vTWvGnAEQF7xYxx13htZV_Kov0_y3PsK1kytCsvcdPQ9_kTjq3o3DCXTBX7nMpTqRQwhlGuMwe1_OLrq-b7AU4ytF-dU76_V-0voyyRkSVXlJ2DaPrl7XVJjUJpmPUYFqOQ08qtCfC1EY71nFtIPapoJjKuWKg1AoGKb7o1arRyZyVBa4sEU3wVUCup73BRrpt2yhefvyQh7KBtyIDUCuhp-bF-NNlxThxZk5BoI7cZC9nO88cAkQUn4vCgBdJPEykEiSZ0_SqMn3aFlSwLMIb7D7VE9UhDHNKK8fNu9bNWgKIg/http%3A%2F%2Fwww.york.ac.uk%2Fdocs%2Fdisclaimer%2Femail.htm
>



-- 



EMAIL DISCLAIMER http://secure-web.cisco.com/1ATdZwpW6Da5ihMUy_uPrcEj38AVRNX7RS_s-bW6jy5NannyPmHvKYHN7U4cXMKpb5N3InR2g3rB9i7w0qS7KEbu1KTrF8L5qCF-BQMpDHXawx4JBCoLzswPS-CJhNJquLd2fzZa6MlNSfagCc7ulHL5E4Np9-qnI_cyjO6sJlHELyc2fpXOPiWgsSZySwdn6ErYMVL9o7_icZW5_nunjFMt41IPAKjG_HpwV6o1885sGPIb0WrI64WIB-nto1FUyLvllMwHmWYh7ltinKJ9PPWXGhit-NSmFPsRGspuVjBV_dAz3kirMcAHi6yRRMvANdjSsH0n-F7wuDamq7-y9xT6QUyNsIwMFp8UfF8rTyiB_MI_SnFL_qA-ZLv7lpPcf5DJ89PsdiRFn8HVYQQ4pZo96nr-gh3Z-UYcGO3Swn3EK0aPhCIVkuKWZhj91ozv3cakPk-QhwLcF1gytJuRYJA/http%3A%2F%2Fwww.york.ac.uk%2Fdocs%2Fdisclaimer%2Femail.htm
<http://secure-web.cisco.com/1ATdZwpW6Da5ihMUy_uPrcEj38AVRNX7RS_s-bW6jy5NannyPmHvKYHN7U4cXMKpb5N3InR2g3rB9i7w0qS7KEbu1KTrF8L5qCF-BQMpDHXawx4JBCoLzswPS-CJhNJquLd2fzZa6MlNSfagCc7ulHL5E4Np9-qnI_cyjO6sJlHELyc2fpXOPiWgsSZySwdn6ErYMVL9o7_icZW5_nunjFMt41IPAKjG_HpwV6o1885sGPIb0WrI64WIB-nto1FUyLvllMwHmWYh7ltinKJ9PPWXGhit-NSmFPsRGspuVjBV_dAz3kirMcAHi6yRRMvANdjSsH0n-F7wuDamq7-y9xT6QUyNsIwMFp8UfF8rTyiB_MI_SnFL_qA-ZLv7lpPcf5DJ89PsdiRFn8HVYQQ4pZo96nr-gh3Z-UYcGO3Swn3EK0aPhCIVkuKWZhj91ozv3cakPk-QhwLcF1gytJuRYJA/http%3A%2F%2Fwww.york.ac.uk%2Fdocs%2Fdisclaimer%2Femail.htm>