/[projects]/queensgui/src/solutionmatrix.cpp
ViewVC logotype

Diff of /queensgui/src/solutionmatrix.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by torben, Fri Jul 20 01:22:53 2007 UTC revision 8 by torben, Fri Jul 20 16:58:04 2007 UTC
# Line 85  bool SolutionMatrix::operator==(const So Line 85  bool SolutionMatrix::operator==(const So
85          return true;          return true;
86  }  }
87    
 bool SolutionMatrix::operator!=(const Solution& s)  
 {  
         const SolutionMatrix& sol = dynamic_cast<const SolutionMatrix&>(s);  
           
         int matchcount = 0;  
         for (int i=0; i<m_size; i++)  
                 for (int j=0; j<m_size; j++)  
                         if (m_matrix[i][j] == sol.m_matrix[i][j])  
                                 matchcount++;  
         if (matchcount == (m_size*2) )  
                 return false;  
         else  
                 return true;  
 }  
   
88  bool SolutionMatrix::getMatrix(int x, int y) {  bool SolutionMatrix::getMatrix(int x, int y) {
89          return m_matrix[x][y];          return m_matrix[x][y];
90  }  }

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.20