|
From: Mark R. D. <mdi...@la...> - 2003-08-11 16:38:58
|
I also notice that the "parameterization of the constructors is rather
inconsistent and could easily confuse a user and introduce undesired
behavior
public RasterSpace(double top, double left, double cellSize, int h, int w) {
...
}
public RasterSpace(double left, double bottom, double right, double top,
double cellSize, int w, int h) {
...
}
when a constructor is has alot of
double, double, double, double, double, int, int ...
consistent ordering would be good to maintain
double top, double left, double cellSize,
double left, double bottom, double right, double top, double cellSize,
and
int w, int h
int h, int w
can be confusing, it would be better to have
int w, int h, double cellSize, double top, double left
int w, int h, double cellSize, double top, double left, double bottom,
double right
-Mark
Ian Turton wrote:
> The constructor for RasterSpace shown below,
> public RasterSpace(double left, double bottom, double right, double top,
> double cellSize, int w, int h) {
> this.cellSize = cellSize;
> originx = left;
> originy = bottom;
> termx = right;
> termy = top;
> height = h;
> width = w;
> }
>
>
> needs to have
> matrix = new DoubleMatrix(h, w);
> added at the end.
>
> Ian
> Ian Turton, Director, Centre for Computational Geography, University of
> Leeds, Leeds, LS2 9JT
> http://www.geog.leeds.ac.uk/people/i.turton http://www.ccg.leeds.ac.uk
> http://www.geotools.org
> +44 (0) 113 343 3392 fax: +44 (0) 113 343 3308
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Repast-developer mailing list
> Rep...@li...
> https://lists.sourceforge.net/lists/listinfo/repast-developer
|