Subject: | |
From: | |
Reply To: | |
Date: | Thu, 16 Aug 2012 04:59:31 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Maybe I'm being simplistic (haven't been following the discussion *that*
closely), but why not just code the neighbours-related methods so that, either:
a) they return an exception if a distance > width is specified
b) just have initial if clauses that return all objects if a distance >=
min(width, height) is specified
a) is presumably not a good idea since, say, you might be modelling vision
range of 2D-located agents, where this is independent of the size of the
environment (so it would be perfectly normal to have vision range much
larger than the size of the environment if that run happened to use a small
environment).
Am I missing something?
Stuart
On Wed, 15 Aug 2012 20:21:40 +0200, Sean Luke <[log in to unmask]> wrote:
>On Aug 15, 2012, at 7:56 PM, Chris Hollander wrote:
>
>> So I tested out this code today at work... and when the distance gets
>> REALLY big, there are problems. For "normal" ranges, say making the
>> distance equal to the width, it seems to work fine... but it breaks
>> when the distance is say, 2 * width.
>
>Ah right, because we're using stx/sty rather than tx/ty.
>
>So *that* is an issue. stx/sty is much faster than tx/ty. However I think
I can adjust things so we can still use stx/sty.
>
>Sean
|
|
|