// // libsemigroups - C++ library for semigroups and monoids // Copyright (C) 2021 James D. Mitchell // Reinis Cirpons // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. //
#include <random> // for mt19937, random_device #include <string> // for tests with strings #include <utility> // for std::move
#include"catch.hpp"// for REQUIRE etc #include"test-main.hpp"// for LIBSEMIGROUPS_TEST_CASE
// Check the iterator version of the function works as intended
std::string a = "abcdba";
std::string b = "abcdcdba";
REQUIRE(freeband_equal_to(a.begin(), a.end(), b.begin(), b.end()));
a = "bcd";
b = "abc";
REQUIRE(!freeband_equal_to(a.begin(), a.end(), b.begin(), b.end()));
a = "adbcZ";
b = "adadbcZ";
REQUIRE(freeband_equal_to(a.begin(), a.end(), b.begin(), b.end()));
word_type w = {0, 1, 0}, x = {0, 1, 1, 0};
REQUIRE(freeband_equal_to(std::move(w), std::move(x)));
}
} // namespace libsemigroups
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.