/[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 5 by torben, Fri Jul 20 01:22:53 2007 UTC revision 655 by torben, Fri Apr 23 05:57:28 2010 UTC
# Line 18  Line 18 
18   *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *   *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19   ***************************************************************************/   ***************************************************************************/
20    
21    /*
22  #include "solutionmatrix.h"  #include "solutionmatrix.h"
23    
24  SolutionMatrix::SolutionMatrix(int size)  SolutionMatrix::SolutionMatrix(int size)
# Line 85  bool SolutionMatrix::operator==(const So Line 86  bool SolutionMatrix::operator==(const So
86          return true;          return true;
87  }  }
88    
 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;  
 }  
   
89  bool SolutionMatrix::getMatrix(int x, int y) {  bool SolutionMatrix::getMatrix(int x, int y) {
90          return m_matrix[x][y];          return m_matrix[x][y];
91  }  }
# Line 113  Solution* SolutionMatrix::copy() Line 99  Solution* SolutionMatrix::copy()
99  {  {
100          return new SolutionMatrix(*this);          return new SolutionMatrix(*this);
101  }  }
102    */
103    

Legend:
Removed from v.5  
changed lines
  Added in v.655

  ViewVC Help
Powered by ViewVC 1.1.20