Beispiel #1
0
 public int[,] getUpdatedCellsArray(TissueMain theTissue)
 {
     newCells = (int[,]) theTissue.cells.Clone();
     //newCells = new int[theTissue.cells.GetLength(0), theTissue.cells.GetLength(1)];
     for (int x = size / 2; x < theTissue.getTissueSize() + size / 2; x++)
     {
         for (int y = size / 2; y < theTissue.getTissueSize() + size / 2; y++)
         {
             int? res = MultiplyArrays(theTissue.getSubArray(1, x, y), transF);
             if (res.HasValue)
             {
                 newCells[x, y] = thresholdFunc[res.Value];
             }
         }
     }
     return newCells;
 }
Beispiel #2
0
 public static string toXMLString(TissueMain theTissue)
 {
     return JsonConvert.SerializeObject(theTissue);
 }