swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple attributes


From: Ken Cline
Subject: Re: multiple attributes
Date: Sat, 15 Mar 1997 10:36:45 -0500 (EST)

On Fri, 14 Mar 1997, Sven N. Thommesen wrote:

> Does anyone have an opinion as to what would be more efficient,
> having multiple 'heat spaces', or coding a new kind of space 
> where each site points to a LIST of attributes (e.g. a list of
> integers) ? 
> 
> I know the first alternative is doable (I currently have 3 spaces),
> but slow. Has anyone made any attempts toward the second alternative?
> 
> Sven

What about the efficiency part of Sven's question?

IMHO, if you wanted an n dimensional space with a mixture of
"static" and "dynamic" layers, e.g. several Discrete2D's and
also some Diffuse2D's throw in for good measure, then it
might be more efficient to implement this n-D space an array
of (id's pointing at) 2D grids, as opposed to a lattice of
objects that each contain an array of size n.

(Whew! ...that was a long one...)

(...just pausing to catch my breath...)

My reasoning: it would be more computationally expensive for
each object in the lattice to query its neighbors for their
current values when its updating its value.

(Some of my) assumptions: the "dynamic" 2D grid is holding
its values in an array, the boundary of the 2D grid can be
described simply (e.g. square, rectangular, or circular)
and "neighbors" are some simple, statically defined, subset
of the space, e.g. 

    A = { x-1, x, x+1 }, B = { y-1, y, y+1 }
    neighbors_(x,y) = { (A X B) - (x,y) }

If any of these, but especially the second and third
assumptions, do not hold then IMHO (again) not only would
you lose any efficiency advantage, it might even be much
simpler to build the n-space as a lattice of objects.  Of
course these objects would have to be provided with some
method for accessing their "neighbors".

Well I think I've stuck my neck out far enough...

Ken.


_________________________________________________________
Ken Cline                             address@hidden
SAIC                                 VOICE (410) 571-0413
Annapolis, MD                          FAX (301) 261-8427




reply via email to

[Prev in Thread] Current Thread [Next in Thread]