public void Init()
        {
            string path = Path.Combine(Data.Directory, "mixed.txt");

            bool[,] array = Bool.Read2DimArray(path);
            grid          = new DataGrid <bool>(array);
            map           = new ActiveSiteMap(grid);

            path = Path.Combine(Data.Directory,
                                "true-locs-in-mixed.txt");
            activeSites = Data.ReadLocations(path);
        }
Ejemplo n.º 2
0
        public void Init()
        {
            string path = Path.Combine(Data.Directory, "mixed.txt");

            bool[,] array = Bool.Read2DimArray(path);
            grid          = new DataGrid <bool>(array);
            landscape     = new Landscape.Landscape(grid);

            intShare    = landscape.NewSiteVar <int>(InactiveSiteMode.Share1Value);
            intDistinct = landscape.NewSiteVar <int>(InactiveSiteMode.DistinctValues);

            objShare    = landscape.NewSiteVar <Foo>(InactiveSiteMode.Share1Value);
            objDistinct = landscape.NewSiteVar <Foo>(InactiveSiteMode.DistinctValues);

            fooObjs = new Foo[landscape.SiteCount];
            for (int i = 0; i < fooObjs.Length; ++i)
            {
                fooObjs[i] = new Foo(i + 1);
            }
        }
Ejemplo n.º 3
0
        //---------------------------------------------------------------------

        private bool[,] ReadBoolArray(string filename)
        {
            string path = System.IO.Path.Combine(dataDir, filename);

            return(Bool.Read2DimArray(path));
        }