MASON-INTEREST-L Archives

August 2012

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Subject:
From:
Stuart Rossiter <[log in to unmask]>
Date:
Thu, 16 Aug 2012 05:46:38 -0400
Content-Transfer-Encoding:
8bit
Content-Type:
text/plain; charset="UTF-8"
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (38 lines)
Given that one of the most common idioms will be 'get my neighbours', then
sparse grids could still be confusing in that the includeOrigin parameter
will exclude other agents at the origin when this perhaps was not expected.
One possible solution would be to have companion methods such as:

For sparse grids (or any future grids where co-located objects are possible):

getNeighborsMaxDistanceOfTarget(Object target, boolean includeOrigin, int
dist, boolean toroidal, IntBag result, IntBag xPos, IntBag yPos)

For single-object-per-location grids:

getNeighborsMaxDistanceOfTarget(Object target, int dist, boolean toroidal,
IntBag result, IntBag xPos, IntBag yPos)

This avoids this includeOrigin ambiguity.

Does that sound useful or over-complicating?

Regards,
Stuart

P.S. Apologies that my Britishness painfully forces me to use the
'neighbour' spelling in non-code text :-) 

On Wed, 15 Aug 2012 02:09:44 +0200, Sean Luke <[log in to unmask]> wrote:

>1. We won't change their semantics -- they'll work as they did before:
either bounded or toroidal.
>2. They'll be officially deprecated.
>3. New versions will have, instead of a "toroidal" boolean parameter, the
following new parameters:
>
>	- mode:	one of Grid2D.BOUNDED, Grid2D.UNBOUNDED, or Grid2D.TOROIDAL
>	- includeOrigin (a boolean), which indicates whether to include the origin
point itself in the neighborhood
>

ATOM RSS1 RSS2