--- queensgui/src/containerminimalvector.cpp 2007/07/22 20:19:43 13 +++ queensgui/src/containerminimalvector.cpp 2007/07/25 19:29:51 14 @@ -55,59 +55,38 @@ void ContainerMinimalVector::addSolution(Solution* sol) { - std::auto_ptr tmp( sol->copy() ); + std::auto_ptr norm1( sol->copy() ); + std::auto_ptr norm2( sol->copy() ); + std::auto_ptr norm3( sol->copy() ); + + std::auto_ptr mirror1( sol->copy() ); + std::auto_ptr mirror2( sol->copy() ); + std::auto_ptr mirror3( sol->copy() ); + std::auto_ptr mirror4( sol->copy() ); bool found = false; - for (VIt it = m_solutions.begin(); it != m_solutions.end(); it++) + norm1->rotate90(); + norm2->rotate90(); + norm2->rotate90(); + norm3->rotate90(); + norm3->rotate90(); + norm3->rotate90(); + + mirror1->mirror(); + mirror2->mirror(); + mirror2->rotate90(); + mirror3->mirror(); + mirror3->rotate90(); + mirror3->rotate90(); + mirror4->mirror(); + mirror4->rotate90(); + mirror4->rotate90(); + mirror4->rotate90(); + + for (VIt it = m_solutions.begin(); it != m_solutions.end() && found == false; it++) { - tmp->rotate90(); - if ( *tmp == *(*it)) - { - found = true; - break; - } - - - tmp->rotate90(); - if ( *tmp == *(*it)) - { - found = true; - break; - } - - tmp->rotate90(); - if ( *tmp == *(*it)) - { - found = true; - break; - } - tmp->rotate90(); - if ( *tmp == *(*it)) - { - found = true; - break; - } - tmp->mirror(); - if ( *tmp == *(*it)) - { - found = true; - break; - } - - tmp->rotate90(); - if ( *tmp == *(*it)) - { - found = true; - break; - } - tmp->rotate90(); - if ( *tmp == *(*it)) - { - found = true; - break; - } - tmp->rotate90(); - if ( *tmp == *(*it)) + if ( *norm1 == *(*it) || *norm2 == *(*it) || *norm3 == *(*it) || + *mirror1 == *(*it) || *mirror2 == *(*it) || *mirror3 == *(*it) || *mirror4 == *(*it)) { found = true; break;