Esempio n. 1
0
  public SolutionProcess(SolutionProcess sample) {
    this.height = sample.GetHeight();
    this.width = sample.GetWidth();

    solutionHistory = new ArrayList<>();
    currentSolution = new int[this.width][];
    for (int i = 0; i < this.width; i++) {
      currentSolution[i] = new int[height];
      for (int j = 0; j < this.height; ++j) {
        currentSolution[i][j] = sample.GetCell(i, j);
      }
    }

    solutionHistory.add(copy(currentSolution));
  }
Esempio n. 2
0
 public void FillSolution(SolutionProcess sample) {
   for (int i = 0; i < width; ++i) {
     for (int j = 0; j < height; ++j) {
       currentSolution[i][j] = sample.GetCell(i, j);
     }
   }
 }