libsemigroups
v3.6.3
C++ library for semigroups and monoids
Toggle main menu visibility
Loading...
Searching...
No Matches
freeband.hpp
1
//
2
// libsemigroups - C++ library for semigroups and monoids
3
// Copyright (C) 2021-2026 James D. Mitchell +
4
// Tom D. Conti-Leslie +
5
// Murray T. Whyte +
6
// Reinis Cirpons
7
//
8
// This program is free software: you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation, either version 3 of the License, or
11
// (at your option) any later version.
12
//
13
// This program is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with this program. If not, see <http://www.gnu.org/licenses/>.
20
//
21
22
// This file contains a declaration of the function freeband_equal_to which
23
// implements the algorithm described in:
24
// "Efficient Testing of Equivalence of Words in a Free Idempotent Semigroup"
25
// by J. Radoszewski and W. Rytter
26
// in SOFSEM 2010: Theory and Practice of Computer Science. Jan. 2010,
27
// pp. 664-671
28
// doi: 10.1007/978-3-642-11266-9_55
29
30
#ifndef LIBSEMIGROUPS_FREEBAND_HPP_
31
#define LIBSEMIGROUPS_FREEBAND_HPP_
32
33
#include "types.hpp"
// word_type
34
35
namespace
libsemigroups
{
36
45
98
bool
freeband_equal_to
(
word_type
const
& x,
word_type
const
& y);
99
121
template
<
typename
T>
122
bool
freeband_equal_to
(T x, T y) {
123
word_type
x1(x), y1(y);
124
return
freeband_equal_to
(x1, y1);
125
}
126
150
template
<
typename
T>
151
bool
freeband_equal_to
(T first1, T last1, T first2, T last2) {
152
return
freeband_equal_to
(
word_type
(first1, last1),
153
word_type
(first2, last2));
154
}
155
156
}
// namespace libsemigroups
157
158
#endif
// LIBSEMIGROUPS_FREEBAND_HPP_
libsemigroups::freeband_equal_to
bool freeband_equal_to(word_type const &x, word_type const &y)
Check if two words represent the same element of a free band.
libsemigroups::word_type
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition
types.hpp:99
libsemigroups
Namespace for everything in the libsemigroups library.
Definition
action.hpp:44
include
libsemigroups
freeband.hpp
Generated by
1.18.0