Make models be layers of DataSets

I ported part of Agentscript's DataSet along with the necessary subset of Util. I didn't port anything that had to do with images, canvases, patches, and so on. *A lot of it is untested.* I plan to port the Raster class from ecostem-sand to this and will be testing resampling and interpolation.

I replaced typed arrays in models with DataSets wrapping typed arrays.

I added some more get/set utility functions to DataSet.

I added some more helpers to BaseModel having to do with transfering data between layers or between indices within a layer.

I ported the models to take into account these changes.
Yeah I think so.
On Jun 30, 2014 4:03 PM, "Benny Lichtner" <notifications@github.com> wrote:

> In ModelingCore/DataSet.js:
>
> > +        var newDS = new DataSet(width, height, new constr(width * height)),
> > +            xScale = this.width/width,
> > +            yScale = this.height/height;
> > +
> > +        for (var x = 0; x < width; ++x) {
> > +            for (var y = 0; y < height; ++y) {
> > +                var xs = x * xScale,
> > +                    ys = y * yScale;
> > +                newDS.setXY(this.sample(xs, ys))
> > +            }
> > +        }
> > +
> > +        return newDS;
> > +    }
> > +
> > +    neighbors(x,y) {
>
> Do we need to revert this to Owen's original neighborhood() method so
> that convolve() works? Otherwise the kernel won't be the same size as the
> neighbors array I think.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/simtable/st-api/pull/11/files#r14378538>.
>