diff --git a/adapters_8hpp.html b/adapters_8hpp.html deleted file mode 100644 index 6124dc0d2..000000000 --- a/adapters_8hpp.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - -libsemigroups: include/adapters.hpp File Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Namespaces
-
-
adapters.hpp File Reference
-
-
- -

This file contains function templates for adapting a user-defined type so that it can be used with libsemigroups. -More...

-
#include <algorithm>
-#include <utility>
-#include <vector>
-#include "libsemigroups-config.hpp"
-
-Include dependency graph for adapters.hpp:
-
-
- - - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - - - - - - - - - - - - - -
-
-

Go to the source code of this file.

- - - - - -

-Namespaces

 libsemigroups
 Namespace for everything in the libsemigroups library.
 
-

Detailed Description

-

This file contains function templates for adapting a user-defined type so that it can be used with libsemigroups.

-

To use the TODO(now)

-
- - - - diff --git a/adapters_8hpp__dep__incl.map b/adapters_8hpp__dep__incl.map deleted file mode 100644 index d9f392f39..000000000 --- a/adapters_8hpp__dep__incl.map +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/adapters_8hpp__dep__incl.md5 b/adapters_8hpp__dep__incl.md5 deleted file mode 100644 index 1a78430d7..000000000 --- a/adapters_8hpp__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -e48d16a7e55fea29eaf8d6d20289c86a \ No newline at end of file diff --git a/adapters_8hpp__dep__incl.png b/adapters_8hpp__dep__incl.png deleted file mode 100644 index 497cb68aa..000000000 Binary files a/adapters_8hpp__dep__incl.png and /dev/null differ diff --git a/adapters_8hpp__incl.map b/adapters_8hpp__incl.map deleted file mode 100644 index da3790760..000000000 --- a/adapters_8hpp__incl.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/adapters_8hpp__incl.md5 b/adapters_8hpp__incl.md5 deleted file mode 100644 index 432350987..000000000 --- a/adapters_8hpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -8a6c76f28b357516d706a5632dfff28f \ No newline at end of file diff --git a/adapters_8hpp__incl.png b/adapters_8hpp__incl.png deleted file mode 100644 index 54045c36e..000000000 Binary files a/adapters_8hpp__incl.png and /dev/null differ diff --git a/adapters_8hpp_source.html b/adapters_8hpp_source.html deleted file mode 100644 index cbb461c65..000000000 --- a/adapters_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/adapters.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
adapters.hpp
-
-
-Go to the documentation of this file.
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
24 
25 #ifndef LIBSEMIGROUPS_INCLUDE_ADAPTERS_HPP_
26 #define LIBSEMIGROUPS_INCLUDE_ADAPTERS_HPP_
27 
28 #include <algorithm> // for std::sort
29 #include <utility> // for std::swap
30 #include <vector> // for std::vector
31 
32 #include "libsemigroups-config.hpp" // for LIBSEMIGROUPS_DENSEHASHMAP
33 
34 namespace libsemigroups {
35  template <typename TElementType, typename = void>
36  struct complexity;
37  template <typename TElementType, typename = void>
38  struct degree;
39  template <typename TElementType, typename = void>
40  struct increase_degree_by;
41  template <typename TElementType, typename = void>
42  struct less;
43  template <typename TElementType, typename = void>
44  struct one;
45  template <typename TElementType, typename = void>
46  struct product;
47  template <typename TElementType, typename = void>
48  struct swap {
49  void operator()(TElementType& x, TElementType& y) {
50  std::swap(x, y);
51  }
52  };
53 
54  template <typename TElementType, typename TPointType, typename = void>
55  struct action;
56  template <typename TElementType, typename = void>
57  struct inverse;
58 
59  template <typename TElementType, typename TPointType, typename = void>
60  struct left_action;
61  template <typename TElementType, typename TPointType, typename = void>
62  struct right_action;
63 
64  template <typename TElementType, typename TPointType, typename = void>
65  struct on_points;
66 
67  template <typename TElementType,
68  typename TPointType,
69  typename TContainerType = std::vector<TPointType>,
70  typename = void>
71  struct on_tuples {
72  void operator()(TContainerType& res,
73  TContainerType const& pt,
74  TElementType const& p) const {
75  for (size_t i = 0; i < pt.size(); ++i) {
76  on_points<TElementType, TPointType>()(res[i], pt[i], p);
77  }
78  }
79  };
80 
81  template <typename TElementType,
82  typename TPointType,
83  typename TContainerType = std::vector<TPointType>,
84  typename = void>
85  struct on_sets {
86  void operator()(TContainerType& res,
87  TContainerType const& pt,
88  TElementType const& p) const {
89  on_tuples<TElementType, TPointType, TContainerType>()(res, pt, p);
90  std::sort(res.begin(), res.end());
91  }
92  };
93 
94 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
95  template <typename TElementType, typename = void>
96  struct empty_key;
97 #endif
98 } // namespace libsemigroups
99 #endif // LIBSEMIGROUPS_INCLUDE_ADAPTERS_HPP_
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/annotated.html b/annotated.html deleted file mode 100644 index 985011031..000000000 --- a/annotated.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -libsemigroups: Class List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class List
-
-
-
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 123]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 NlibsemigroupsNamespace for everything in the libsemigroups library
 CBipartitionClass for bipartitions
 CBlocksClass for signed partitions of the set \(\{0, \ldots, n - 1\}\)
 CBooleanMatMatrices over the boolean semiring
 CBooleanSemiringThe usual Boolean semiring
 CCongruenceClass for congruence on a semigroup or fintely presented semigroup
 CElementAbstract base class for semigroup elements
 CEqualProvides a call operator for comparing Elements via pointers
 CHashProvides a call operator returning a hash value for an Element via a pointer
 CElementWithVectorDataAbstract base class for elements using a vector to store their defining data
 CElementWithVectorDataDefaultHashAbstract base class for elements using a vector to store their defining data and the default hash function for that underlying vector
 CIntegersThe usual ring of integers
 CMatrixOverSemiringMatrices over a semiring
 CMatrixOverSemiringBaseMatrices over a semiring
 CMaxPlusSemiringThe max-plus semiring consists of the integers together with negative infinity with operations max and plus. Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY
 CMinPlusSemiringThe min-plus semiring consists of the integers together with infinity with operations min and plus. Infinity is represented by Semiring<int64_t>::INFTY
 CNaturalSemiringThis class implements the semiring consisting of \(\{0, 1, ..., t, t + 1, ..., t + p - 1\}\) for some threshold \(t\) and period \(p\) with operations addition and multiplication modulo the congruence \(t = t + p\)
 CPartialPermTemplate class for partial permutations
 CPartialTransformationAbstract class for partial transformations
 CPartitionClass for partitions of a set used by Congruence::nontrivial_classes
 CPBRClass for partitioned binary relations (PBR)
 CPermutationTemplate class for permutations
 CProjectiveMaxPlusMatrixClass for projective max-plus matrices
 CReductionOrderingThis class provides a call operator which can be used to compare libsemigroups::rws_word_t
 CRWSThis class is used to represent a string rewriting system defining a finitely presented monoid or semigroup
 CRWSESubclass of Element that wraps an libsemigroups::rws_word_t
 CSemigroupClass for semigroups generated by instances of Element
 CSemiringThis class its subclasses provide very basic functionality for creating semirings
 CSemiringWithThresholdThis abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring
 CSHORTLEXThis class implements the shortlex reduction ordering derived from an ordering on libsemigroups::rws_letter_t's
 CTransformationTemplate class for transformations
 CTropicalMaxPlusSemiringThe tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\infty\). Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY
 CTropicalMinPlusSemiringThe tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\infty\). Infinity is represented by Semiring<int64_t>::INFTY
-
-
- - - - diff --git a/bc_s.png b/bc_s.png deleted file mode 100644 index 224b29aa9..000000000 Binary files a/bc_s.png and /dev/null differ diff --git a/bdwn.png b/bdwn.png deleted file mode 100644 index 940a0b950..000000000 Binary files a/bdwn.png and /dev/null differ diff --git a/blocks_8h_source.html b/blocks_8h_source.html deleted file mode 100644 index 3e851353b..000000000 --- a/blocks_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -libsemigroups: src/blocks.h Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
blocks.h
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2016 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains the declaration of a blocks class, which is needed by the
20 // bipartitions code.
21 
22 #ifndef LIBSEMIGROUPS_SRC_BLOCKS_H_
23 #define LIBSEMIGROUPS_SRC_BLOCKS_H_
24 
25 #include <algorithm>
26 #include <functional>
27 #include <vector>
28 
29 #include "libsemigroups-debug.h"
30 
31 namespace libsemigroups {
32 
44 
45  class Blocks {
46  public:
50  Blocks() : _blocks(nullptr), _lookup(nullptr), _nr_blocks(0), _rank(0) {}
51 
65  Blocks(std::vector<u_int32_t>* blocks, std::vector<bool>* lookup)
66  : _blocks(blocks), _lookup(lookup), _nr_blocks(), _rank(UNDEFINED) {
67  LIBSEMIGROUPS_ASSERT(_blocks->size() != 0);
68  _nr_blocks = *(std::max_element(_blocks->begin(), _blocks->end())) + 1;
69  LIBSEMIGROUPS_ASSERT(_nr_blocks == _lookup->size());
70  }
71 
92  Blocks(std::vector<u_int32_t>* blocks,
93  std::vector<bool>* lookup,
94  u_int32_t nr_blocks)
95  : _blocks(blocks),
96  _lookup(lookup),
97  _nr_blocks(nr_blocks),
98  _rank(UNDEFINED) {
99  LIBSEMIGROUPS_ASSERT(_blocks->size() != 0);
100  LIBSEMIGROUPS_ASSERT(_nr_blocks == _lookup->size());
101  }
102 
105  Blocks& operator=(Blocks const& copy) = delete;
106 
111  Blocks(Blocks const& copy);
112 
117  delete _blocks;
118  delete _lookup;
119  }
120 
126  bool operator==(const Blocks& that) const;
127 
132  bool operator<(const Blocks& that) const;
133 
138  inline u_int32_t degree() const {
139  return (_nr_blocks == 0 ? 0 : _blocks->size());
140  }
141 
146  inline u_int32_t block(size_t pos) const {
147  LIBSEMIGROUPS_ASSERT(pos < _blocks->size());
148  return (*_blocks)[pos];
149  }
150 
157  inline bool is_transverse_block(size_t index) const {
158  LIBSEMIGROUPS_ASSERT(index < _nr_blocks);
159  return (*_lookup)[index];
160  }
161 
167  // FIXME better to have lookup_begin/end methods
168  inline std::vector<bool> const* lookup() const {
169  return _lookup;
170  }
171 
176  inline u_int32_t nr_blocks() const {
177  return _nr_blocks;
178  }
179 
184  u_int32_t rank();
185 
190  size_t hash_value() const;
191 
195  inline typename std::vector<u_int32_t>::const_iterator cbegin() const {
196  LIBSEMIGROUPS_ASSERT(_blocks != nullptr);
197  return _blocks->cbegin();
198  }
199 
203  inline typename std::vector<u_int32_t>::const_iterator cend() const {
204  LIBSEMIGROUPS_ASSERT(_blocks != nullptr);
205  return _blocks->cend();
206  }
207 
208  private:
209  std::vector<u_int32_t>* _blocks;
210  std::vector<bool>* _lookup;
211  u_int32_t _nr_blocks;
212  u_int32_t _rank;
213  static u_int32_t const UNDEFINED = std::numeric_limits<u_int32_t>::max();
214  };
215 } // namespace libsemigroups
216 
217 #endif // LIBSEMIGROUPS_SRC_BLOCKS_H_
Blocks()
A constructor.
Definition: blocks.h:50
-
~Blocks()
Default destructor.
Definition: blocks.h:116
-
std::vector< u_int32_t >::const_iterator cbegin() const
Returns a const_iterator pointing to the index of the first block.
Definition: blocks.h:195
-
Class for signed partitions of the set .
Definition: blocks.h:45
-
Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup, u_int32_t nr_blocks)
A constructor.
Definition: blocks.h:92
-
bool operator==(const Blocks &that) const
Returns true if this equals that.
Definition: blocks.cc:48
-
bool is_transverse_block(size_t index) const
Returns true if the block with index index is transverse.
Definition: blocks.h:157
-
size_t hash_value() const
Returns a hash value for a this.
Definition: blocks.cc:85
-
u_int32_t nr_blocks() const
Returns the number of blocks in the Blocks object.
Definition: blocks.h:176
-
Namespace for everything in the libsemigroups library.
Definition: blocks.cc:32
-
Blocks & operator=(Blocks const &copy)=delete
The assignment operator is deleted for Blocks to avoid unintended copying.
-
u_int32_t rank()
Returns the number of signed (transverse) blocks in this.
Definition: blocks.cc:78
-
u_int32_t block(size_t pos) const
Returns the index of the block containing pos.
Definition: blocks.h:146
-
Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup)
A constructor.
Definition: blocks.h:65
-
std::vector< bool > const * lookup() const
Returns a pointer to the lookup table for block indices.
Definition: blocks.h:168
-
std::vector< u_int32_t >::const_iterator cend() const
Returns a const_iterator referring to past-the-end of the last block.
Definition: blocks.h:203
-
u_int32_t degree() const
Returns the degree of a Blocks object.
Definition: blocks.h:138
-
bool operator<(const Blocks &that) const
Returns true if this is less than that.
Definition: blocks.cc:59
-
- - - - diff --git a/blocks_8hpp_source.html b/blocks_8hpp_source.html deleted file mode 100644 index 1268f932f..000000000 --- a/blocks_8hpp_source.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -libsemigroups: include/blocks.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
blocks.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2016 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains the declaration of a blocks class, which is needed by the
20 // bipartitions code.
21 
22 #ifndef LIBSEMIGROUPS_INCLUDE_BLOCKS_HPP_
23 #define LIBSEMIGROUPS_INCLUDE_BLOCKS_HPP_
24 
25 #include <stddef.h> // for size_t
26 #include <stdint.h> // for uint32_t
27 
28 #include <vector> // for vector, vector<>::const_iterator
29 
30 namespace libsemigroups {
31 
43  class Blocks {
44  public:
48  Blocks();
49 
63  Blocks(std::vector<uint32_t>*, std::vector<bool>*);
64 
85  Blocks(std::vector<uint32_t>*, std::vector<bool>*, uint32_t);
86 
89  Blocks& operator=(Blocks const&) = delete;
90 
95  Blocks(Blocks const&);
96 
100  ~Blocks();
101 
107  bool operator==(Blocks const& that) const;
108 
113  bool operator<(Blocks const& that) const;
114 
119  uint32_t degree() const;
120 
125  uint32_t block(size_t) const;
126 
133  bool is_transverse_block(size_t) const;
134 
140  // FIXME better to have lookup_begin/end methods
141  std::vector<bool> const* lookup() const;
142 
147  uint32_t nr_blocks() const;
148 
153  uint32_t rank();
154 
159  size_t hash_value() const;
160 
164  typename std::vector<uint32_t>::const_iterator cbegin() const;
165 
169  typename std::vector<uint32_t>::const_iterator cend() const;
170 
171  private:
172  std::vector<uint32_t>* _blocks;
173  std::vector<bool>* _lookup;
174  uint32_t _nr_blocks;
175  uint32_t _rank;
176  };
177 } // namespace libsemigroups
178 
179 #endif // LIBSEMIGROUPS_INCLUDE_BLOCKS_HPP_
Blocks()
A constructor.
-
uint32_t nr_blocks() const
Returns the number of blocks in the Blocks object.
-
~Blocks()
Default destructor.
-
uint32_t rank()
Returns the number of signed (transverse) blocks in this.
-
Class for signed partitions of the set .
Definition: blocks.hpp:43
-
bool is_transverse_block(size_t) const
Returns true if the block with index index is transverse.
-
Blocks & operator=(Blocks const &)=delete
The assignment operator is deleted for Blocks to avoid unintended copying.
-
bool operator==(Blocks const &that) const
Returns true if this equals that.
-
size_t hash_value() const
Returns a hash value for a this.
-
bool operator<(Blocks const &that) const
Returns true if this is less than that.
-
uint32_t degree() const
Returns the degree of a Blocks object.
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
std::vector< uint32_t >::const_iterator cbegin() const
Returns a const_iterator pointing to the index of the first block.
-
std::vector< bool > const * lookup() const
Returns a pointer to the lookup table for block indices.
-
std::vector< uint32_t >::const_iterator cend() const
Returns a const_iterator referring to past-the-end of the last block.
-
uint32_t block(size_t) const
Returns the index of the block containing pos.
-
- - - - diff --git a/bmat8_8hpp_source.html b/bmat8_8hpp_source.html deleted file mode 100644 index 3e9b7435b..000000000 --- a/bmat8_8hpp_source.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: include/bmat8.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
bmat8.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2017 Finn Smith
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains a declaration of fast boolean matrices up to dimension 8.
20 
21 #ifndef LIBSEMIGROUPS_INCLUDE_BMAT8_HPP_
22 #define LIBSEMIGROUPS_INCLUDE_BMAT8_HPP_
23 
24 // Includes required whether or not HPCombi is available.
25 
26 #include "libsemigroups-config.hpp" // for LIBSEMIGROUPS_HPCOMBI
27 #include "libsemigroups-debug.hpp" // for LIBSEMIGROUPS_ASSERT
28 
29 #ifdef LIBSEMIGROUPS_HPCOMBI
30 #include "hpcombi.hpp"
31 namespace libsemigroups {
32  using BMat8 = HPCombi::BMat8;
33 }
34 #else
35 
36 #include <algorithm> // for uniform_int_distribution, swap
37 #include <climits> // for CHAR_BIT
38 #include <cstddef> // for size_t
39 #include <cstdint> // for uint64_t
40 #include <iostream> // for operator<<, ostringstream
41 #include <random> // for mt19937, random_device
42 #include <utility> // for hash
43 #include <vector> // for vector
44 
45 #include "adapters.hpp" // for complexity, degree, etc . . .
46 #include "element.hpp"
47 #include "stl.hpp" // for internal::to_string
48 
49 namespace libsemigroups {
59  class BMat8 {
60  public:
64  BMat8() = default;
65 
70  explicit BMat8(uint64_t mat) : _data(mat) {}
71 
76  explicit BMat8(std::vector<std::vector<bool>> const& mat);
77 
81  BMat8(BMat8 const&) = default;
82 
86  BMat8(BMat8&&) = default;
87 
91  BMat8& operator=(BMat8 const&) = default;
92 
96  BMat8& operator=(BMat8&&) = default;
97 
99  ~BMat8() = default;
100 
104  bool operator==(BMat8 const& that) const {
105  return _data == that._data;
106  }
107 
111  bool operator!=(BMat8 const& that) const {
112  return _data != that._data;
113  }
114 
119  bool operator<(BMat8 const& that) const {
120  return _data < that._data;
121  }
122 
127  bool operator>(BMat8 const& that) const {
128  return _data > that._data;
129  }
130 
136  bool operator()(size_t i, size_t j) const {
137  LIBSEMIGROUPS_ASSERT(i < 8);
138  LIBSEMIGROUPS_ASSERT(j < 8);
139  return (_data << (8 * i + j)) >> 63;
140  }
141 
147  void set(size_t, size_t, bool);
148 
154  inline uint64_t to_int() const {
155  return _data;
156  }
157 
162  inline BMat8 transpose() const {
163  uint64_t x = _data;
164  uint64_t y = (x ^ (x >> 7)) & 0xAA00AA00AA00AA;
165  x = x ^ y ^ (y << 7);
166  y = (x ^ (x >> 14)) & 0xCCCC0000CCCC;
167  x = x ^ y ^ (y << 14);
168  y = (x ^ (x >> 28)) & 0xF0F0F0F0;
169  x = x ^ y ^ (y << 28);
170  return BMat8(x);
171  }
172 
179  BMat8 operator*(BMat8 const& that) const;
180 
181  Permutation<uint8_t> right_perm_action_on_basis(BMat8 bm) const {
182  // LIBSEMIGROUPS_ASSERT(basis.row_space_basis() == basis);
183  std::vector<uint8_t> rows = this->rows();
184  BMat8 product = *this * bm;
185  std::vector<uint8_t> prod_rows = product.rows();
186 
187  // LIBSEMIGROUPS_ASSERT(product.row_space_basis() == basis);
188 
189  std::vector<uint8_t> perm(8);
190  for (size_t i = 0; i < nr_rows(); ++i) {
191  uint8_t row = rows[i];
192  perm[i]
193  = std::distance(prod_rows.begin(),
194  std::find(prod_rows.begin(), prod_rows.end(), row));
195  }
196  std::iota(perm.begin() + nr_rows(), perm.end(), nr_rows());
197  return Permutation<uint8_t>(perm);
198  }
199 
203  friend std::ostringstream& operator<<(std::ostringstream& os,
204  BMat8 const& bm) {
205  uint64_t x = bm._data;
206  uint64_t pow = 1;
207  pow = pow << 63;
208  for (size_t i = 0; i < 8; ++i) {
209  for (size_t j = 0; j < 8; ++j) {
210  if (pow & x) {
211  os << "1";
212  } else {
213  os << "0";
214  }
215  x = x << 1;
216  }
217  os << "\n";
218  }
219  return os;
220  }
221 
225  friend std::ostream& operator<<(std::ostream& os, BMat8 const& bm) {
226  os << internal::to_string(bm);
227  return os;
228  }
229 
233  static BMat8 random();
234 
239  static BMat8 random(size_t dim);
240 
241  inline void swap(BMat8& that) {
242  std::swap(this->_data, that._data);
243  }
244 
245 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
246  // FIXME do this another way
247  BMat8 empty_key() const {
248  return BMat8(0xFF7FBFDFEFF7FBFE);
249  }
250 #endif
251 
252  BMat8 row_space_basis() const;
253  BMat8 col_space_basis() const;
254 
255  std::vector<uint8_t> rows() const {
256  std::vector<uint8_t> rows;
257  for (size_t i = 0; i < 8; ++i) {
258  uint8_t row = static_cast<uint8_t>(_data << (8 * i) >> 56);
259  rows.push_back(row);
260  }
261  return rows;
262  }
263 
264  size_t row_space_size() const;
265 
271  size_t nr_rows() const {
272  size_t count = 0;
273  for (size_t i = 0; i < 8; ++i) {
274  if (_data << (8 * i) >> 56 > 0) {
275  count++;
276  }
277  }
278  return count;
279  }
280 
283  bool is_regular_element() const {
284  return *this
285  * BMat8(
286  ~(*this * BMat8(~_data).transpose() * (*this)).to_int())
287  .transpose()
288  * (*this)
289  == *this;
290  }
291 
295  static BMat8 one() {
296  return BMat8(0x8040201008040201);
297  }
298 
299  private:
300  void sort_rows();
301 
302  uint64_t _data;
303  static std::random_device _rd;
304  static std::mt19937 _gen;
305  static std::uniform_int_distribution<uint64_t> _dist;
306  };
307 } // namespace libsemigroups
308 
309 namespace std {
310  template <>
311  struct hash<libsemigroups::BMat8> {
312  size_t operator()(libsemigroups::BMat8 const& bm) const {
313  return hash<uint64_t>()(bm.to_int());
314  }
315  };
316 } // namespace std
317 #endif // LIBSEMIGROUPS_HPCOMBI
318 
319 namespace libsemigroups {
321  // Functions that are independent of HPCombi and libsemigroups
323 
324  // TODO move to konieczny
325  bool is_group_index(BMat8 const& x, BMat8 const& y);
326 
332  size_t nr_cols(BMat8 const&);
333  size_t col_space_size(BMat8 const&);
334  BMat8 bmat8_sub_one(size_t);
335  size_t min_possible_dim(BMat8 const&);
336 
337  // Specialization for adapters.hpp structs
338  template <>
339  struct complexity<BMat8> {
340  constexpr inline size_t operator()(BMat8 const&) const noexcept {
341  return 0;
342  }
343  };
344 
345  template <>
346  struct degree<BMat8> {
347  constexpr inline size_t operator()(BMat8 const&) const noexcept {
348  return 8;
349  }
350  };
351 
352  template <>
353  struct increase_degree_by<BMat8> {
354  inline void operator()(BMat8 const&) const noexcept {}
355  };
356 
357  template <>
358  struct less<BMat8> {
359  inline bool operator()(BMat8 const& x, BMat8 const& y) const noexcept {
360  return x < y;
361  }
362  };
363 
364  template <>
365  struct one<BMat8> {
366  inline BMat8 operator()(BMat8 const& x) const noexcept {
367  return x.one();
368  }
369 
370  inline BMat8 operator()(size_t = 0) const noexcept {
371  return BMat8::one();
372  }
373  };
374 
375  template <>
376  struct product<BMat8> {
377  inline void
378  operator()(BMat8& xy, BMat8 const& x, BMat8 const& y, size_t = 0) const
379  noexcept {
380  xy = x * y;
381  }
382  };
383 
384  template <>
385  struct right_action<BMat8, BMat8> {
386  void operator()(BMat8& res, BMat8 const& pt, BMat8 const& x) const
387  noexcept {
388  res = (pt * x).row_space_basis();
389  }
390  };
391 
392  template <>
393  struct left_action<BMat8, BMat8> {
394  void operator()(BMat8& res, BMat8 pt, BMat8 x) const noexcept {
395  res = (x * pt).col_space_basis();
396  }
397  };
398 
399  template <>
400  struct inverse<BMat8> {
401  inline BMat8 operator()(BMat8 const& x) const noexcept {
402  LIBSEMIGROUPS_ASSERT(x * x.transpose() == x.one());
403  return x.transpose();
404  }
405  };
406 } // namespace libsemigroups
407 
408 #endif // LIBSEMIGROUPS_INCLUDE_BMAT8_HPP_
size_t nr_cols(BMat8 const &)
Returns the number of non-zero rows in this.
-
Definition: kbe.hpp:198
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
This file contains function templates for adapting a user-defined type so that it can be used with li...
-
- - - - diff --git a/class_t.html b/class_t.html deleted file mode 100644 index d8b53213e..000000000 --- a/class_t.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - -libsemigroups: T Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- -
-
-
-
T Class Reference
-
-
-
The documentation for this class was generated from the following files:
- - - - diff --git a/classes.html b/classes.html deleted file mode 100644 index b0432b654..000000000 --- a/classes.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -libsemigroups: Class Index - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class Index
-
-
-
b | c | e | h | i | m | n | p | r | s | t
- - - - - - - - - - - - - - -
  b  
-
ElementWithVectorData (libsemigroups)   MatrixOverSemiringBase (libsemigroups)   PBR (libsemigroups)   Semiring (libsemigroups)   
ElementWithVectorDataDefaultHash (libsemigroups)   MaxPlusSemiring (libsemigroups)   Permutation (libsemigroups)   SemiringWithThreshold (libsemigroups)   
Bipartition (libsemigroups)   Element::Equal (libsemigroups)   MinPlusSemiring (libsemigroups)   ProjectiveMaxPlusMatrix (libsemigroups)   SHORTLEX (libsemigroups)   
Blocks (libsemigroups)   
  h  
-
  n  
-
  r  
-
  t  
-
BooleanMat (libsemigroups)   
BooleanSemiring (libsemigroups)   Element::Hash (libsemigroups)   NaturalSemiring (libsemigroups)   ReductionOrdering (libsemigroups)   Transformation (libsemigroups)   
  c  
-
  i  
-
  p  
-
RWS (libsemigroups)   TropicalMaxPlusSemiring (libsemigroups)   
RWSE (libsemigroups)   TropicalMinPlusSemiring (libsemigroups)   
Congruence (libsemigroups)   Integers (libsemigroups)   PartialPerm (libsemigroups)   
  s  
-
  e  
-
  m  
-
PartialTransformation (libsemigroups)   
Partition (libsemigroups)   Semigroup (libsemigroups)   
Element (libsemigroups)   MatrixOverSemiring (libsemigroups)   
-
b | c | e | h | i | m | n | p | r | s | t
-
- - - - diff --git a/classlibsemigroups_1_1_action_digraph-members.html b/classlibsemigroups_1_1_action_digraph-members.html deleted file mode 100644 index 05c9c6e1a..000000000 --- a/classlibsemigroups_1_1_action_digraph-members.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::ActionDigraph< TIntType > Member List
-
-
- -

This is the complete list of members for libsemigroups::ActionDigraph< TIntType >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ActionDigraph(TIntType nr_ndes=0, TIntType dgree=0)libsemigroups::ActionDigraph< TIntType >inlineexplicit
ActionDigraph(ActionDigraph const &)=default (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >
ActionDigraph(ActionDigraph &&)=default (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >
add_edge(node_type i, node_type j, label_type lbl)libsemigroups::ActionDigraph< TIntType >inline
add_nodes(size_t nr)libsemigroups::ActionDigraph< TIntType >inline
add_to_out_degree(size_t nr)libsemigroups::ActionDigraph< TIntType >inline
cbegin_edges(node_type i) const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cbegin_nodes() const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cbegin_scc(scc_index_type i) const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cbegin_scc_roots() const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cbegin_sccs() const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cend_edges(node_type i) const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cend_nodes() const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cend_scc(scc_index_type i) const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cend_scc_roots() const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
cend_sccs() const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
const_iterator_edges typedeflibsemigroups::ActionDigraph< TIntType >
const_iterator_nodes typedeflibsemigroups::ActionDigraph< TIntType >
const_iterator_scc typedeflibsemigroups::ActionDigraph< TIntType >
const_iterator_scc_roots typedeflibsemigroups::ActionDigraph< TIntType >
const_iterator_sccs typedeflibsemigroups::ActionDigraph< TIntType >
label_type typedeflibsemigroups::ActionDigraph< TIntType >
neighbor(node_type v, label_type lbl) constlibsemigroups::ActionDigraph< TIntType >inline
node_type typedeflibsemigroups::ActionDigraph< TIntType >
nr_edges() const noexceptlibsemigroups::ActionDigraph< TIntType >inline
nr_nodes() const noexceptlibsemigroups::ActionDigraph< TIntType >inline
nr_scc() constlibsemigroups::ActionDigraph< TIntType >inline
operator=(ActionDigraph const &)=default (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >
operator=(ActionDigraph &&)=default (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >
out_degree() const noexceptlibsemigroups::ActionDigraph< TIntType >inline
random(TIntType nr_ndes, TIntType dgree, std::mt19937 mt=std::mt19937()) (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inlinestatic
reserve(TIntType nr_ndes, TIntType out_dgree) const noexceptlibsemigroups::ActionDigraph< TIntType >inline
reverse_spanning_forest() const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
root_of_scc(node_type nd) const (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >inline
scc_id(node_type nd) constlibsemigroups::ActionDigraph< TIntType >inline
scc_index_type typedeflibsemigroups::ActionDigraph< TIntType >
spanning_forest() constlibsemigroups::ActionDigraph< TIntType >inline
validate() const noexceptlibsemigroups::ActionDigraph< TIntType >inline
~ActionDigraph()=default (defined in libsemigroups::ActionDigraph< TIntType >)libsemigroups::ActionDigraph< TIntType >
- - - - diff --git a/classlibsemigroups_1_1_action_digraph.html b/classlibsemigroups_1_1_action_digraph.html deleted file mode 100644 index f6df33064..000000000 --- a/classlibsemigroups_1_1_action_digraph.html +++ /dev/null @@ -1,838 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::ActionDigraph< TIntType > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -List of all members
-
-
libsemigroups::ActionDigraph< TIntType > Class Template Reference
-
-
- -

Class for out-regular digraphs. - More...

- -

#include <digraph.hpp>

- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

using const_iterator_edges = typename internal::RecVec< TIntType >::const_iterator
 Alias for the type of an iterator pointing to the out-edges of a node in a digraph. More...
 
using const_iterator_nodes = typename IntegralRange< TIntType >::const_iterator
 Alias for the type of an iterator pointing to the nodes of a digraph. More...
 
using const_iterator_scc = typename std::vector< TIntType >::const_iterator
 Alias for the type of an iterator pointing to the nodes in a strongly connected component of a digraph. More...
 
using const_iterator_scc_roots = internal::iterator_base< std::vector< TIntType >, node_type const *, node_type const &, node_type, iterator_methods_scc_roots >
 Alias for the type of an iterator pointing to the roots of a strongly connected components of a digraph. More...
 
using const_iterator_sccs = typename std::vector< std::vector< TIntType > >::const_iterator
 Alias for the type of an iterator pointing to the strongly connected components of a digraph. More...
 
using label_type = TIntType
 Alias for the type of edge labels in a digraph. More...
 
using node_type = TIntType
 Alias for the type of nodes in a digraph. More...
 
using scc_index_type = TIntType
 Alias for the type of an index in a strongly connected component of a digraph. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

Modifiers
void add_nodes (size_t nr)
 Adds nr nodes to this. More...
 
void add_to_out_degree (size_t nr)
 Adds nr to the out-degree of this. More...
 
void add_edge (node_type i, node_type j, label_type lbl)
 Add an edge from i to j labelled lbl. More...
 
void reserve (TIntType nr_ndes, TIntType out_dgree) const noexcept
 Reserve capacity. More...
 
Nodes, edges, neighbors
TIntType neighbor (node_type v, label_type lbl) const
 Returns the node adjacent to v via the edge labelled lbl. If there is no such node, then Libsemigroups::UNDEFINED is returned. More...
 
TIntType nr_nodes () const noexcept
 Returns the number of nodes of this. More...
 
size_t nr_edges () const noexcept
 Returns the number of edges of this. More...
 
TIntType out_degree () const noexcept
 Returns the out-degree of this. More...
 
bool validate () const noexcept
 Check every node has exactly out_degree() out-edges. More...
 
-const_iterator_nodes cbegin_nodes () const
 
-const_iterator_nodes cend_nodes () const
 
-const_iterator_edges cbegin_edges (node_type i) const
 
-const_iterator_edges cend_edges (node_type i) const
 
Strongly connected components
TIntType scc_id (node_type nd) const
 Returns the id of the strongly connected component of a node. More...
 
TIntType nr_scc () const
 Returns the number of strongly connected components in this. More...
 
-node_type root_of_scc (node_type nd) const
 
-const_iterator_sccs cbegin_sccs () const
 
-const_iterator_sccs cend_sccs () const
 
-const_iterator_scc cbegin_scc (scc_index_type i) const
 
-const_iterator_scc cend_scc (scc_index_type i) const
 
-const_iterator_scc_roots cbegin_scc_roots () const
 
-const_iterator_scc_roots cend_scc_roots () const
 
Spanning forests of strongly connected components
Forest const & spanning_forest () const
 Returns a Forest comprised of spanning trees for each SCC. More...
 
-Forest const & reverse_spanning_forest () const
 
- - - - - - - - - - - - - - - - -

-Constructors and destructor

 ActionDigraph (TIntType nr_ndes=0, TIntType dgree=0)
 Constructor. More...
 
ActionDigraph (ActionDigraph const &)=default
 
ActionDigraph (ActionDigraph &&)=default
 
-ActionDigraphoperator= (ActionDigraph const &)=default
 
-ActionDigraphoperator= (ActionDigraph &&)=default
 
~ActionDigraph ()=default
 
-static ActionDigraph random (TIntType nr_ndes, TIntType dgree, std::mt19937 mt=std::mt19937())
 
-

Detailed Description

-

template<typename TIntType>
-class libsemigroups::ActionDigraph< TIntType >

- -

Class for out-regular digraphs.

-

This class represents out-regular digraphs. If the digraph has n nodes, they are represented by the numbers {0, ..., n - 1}.

-

These graphs are principally designed to be used those associated to the action of a semigroup. The template parameter TIntType should be an unsigned integer type, which is the type of nodes in the digraph.

-

Member Typedef Documentation

- -

◆ const_iterator_edges

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::const_iterator_edges = typename internal::RecVec<TIntType>::const_iterator
-
- -

Alias for the type of an iterator pointing to the out-edges of a node in a digraph.

- -
-
- -

◆ const_iterator_nodes

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::const_iterator_nodes = typename IntegralRange<TIntType>::const_iterator
-
- -

Alias for the type of an iterator pointing to the nodes of a digraph.

- -
-
- -

◆ const_iterator_scc

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::const_iterator_scc = typename std::vector<TIntType>::const_iterator
-
- -

Alias for the type of an iterator pointing to the nodes in a strongly connected component of a digraph.

- -
-
- -

◆ const_iterator_scc_roots

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::const_iterator_scc_roots = internal::iterator_base<std::vector<TIntType>, node_type const*, node_type const&, node_type, iterator_methods_scc_roots>
-
- -

Alias for the type of an iterator pointing to the roots of a strongly connected components of a digraph.

- -
-
- -

◆ const_iterator_sccs

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::const_iterator_sccs = typename std::vector<std::vector<TIntType> >::const_iterator
-
- -

Alias for the type of an iterator pointing to the strongly connected components of a digraph.

- -
-
- -

◆ label_type

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::label_type = TIntType
-
- -

Alias for the type of edge labels in a digraph.

- -
-
- -

◆ node_type

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::node_type = TIntType
-
- -

Alias for the type of nodes in a digraph.

- -
-
- -

◆ scc_index_type

- -
-
-
-template<typename TIntType>
- - - - -
using libsemigroups::ActionDigraph< TIntType >::scc_index_type = TIntType
-
- -

Alias for the type of an index in a strongly connected component of a digraph.

- -
-
-

Constructor & Destructor Documentation

- -

◆ ActionDigraph()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::ActionDigraph< TIntType >::ActionDigraph (TIntType nr_ndes = 0,
TIntType dgree = 0 
)
-
-inlineexplicit
-
- -

Constructor.

-

Constructs an ActionDigraph instance with nr_ndes nodes and out-degree dgree.

- -
-
-

Member Function Documentation

- -

◆ add_edge()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void libsemigroups::ActionDigraph< TIntType >::add_edge (node_type i,
node_type j,
label_type lbl 
)
-
-inline
-
- -

Add an edge from i to j labelled lbl.

-

If i and j are nodes in this, and lbl is in the range [0, out_degree()), then this method adds an edge edge from i to j labelled lbl.

-
Iterator validity This function modifies the object defined by this, any iterators, pointers or references pointing into this are invalidated by a call to this function.
-
Exceptions
- - -
Throwsa LibsemigroupsException if i, j, or lbl is not valid.
-
-
- -
-
- -

◆ add_nodes()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - - -
void libsemigroups::ActionDigraph< TIntType >::add_nodes (size_t nr)
-
-inline
-
- -

Adds nr nodes to this.

-
Iterator validity This function modifies the object defined by this, any iterators, pointers or references pointing into this are invalidated by a call to this function.
-
Exceptions This function guarantees not to throw a LibsemigroupsException. If an exception is thrown, this is guaranteed not to be modified.
- -
-
- -

◆ add_to_out_degree()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - - -
void libsemigroups::ActionDigraph< TIntType >::add_to_out_degree (size_t nr)
-
-inline
-
- -

Adds nr to the out-degree of this.

-
Iterator validity This function modifies the object defined by this, any iterators, pointers or references pointing into this are invalidated by a call to this function.
-
Exceptions This function guarantees not to throw a LibsemigroupsException. If an exception is thrown, this is guaranteed not to be modified.
- -
-
- -

◆ neighbor()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - - - - - - - - - - - - -
TIntType libsemigroups::ActionDigraph< TIntType >::neighbor (node_type v,
label_type lbl 
) const
-
-inline
-
- -

Returns the node adjacent to v via the edge labelled lbl. If there is no such node, then Libsemigroups::UNDEFINED is returned.

-
Exceptions
- - -
Throwsa LibsemigroupsException if v or lbl is not valid.
-
-
- -
-
- -

◆ nr_edges()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - -
size_t libsemigroups::ActionDigraph< TIntType >::nr_edges () const
-
-inlinenoexcept
-
- -

Returns the number of edges of this.

-

Returns the total number of edges of this

- -
-
- -

◆ nr_nodes()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - -
TIntType libsemigroups::ActionDigraph< TIntType >::nr_nodes () const
-
-inlinenoexcept
-
- -

Returns the number of nodes of this.

- -
-
- -

◆ nr_scc()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - -
TIntType libsemigroups::ActionDigraph< TIntType >::nr_scc () const
-
-inline
-
- -

Returns the number of strongly connected components in this.

-

Every node in this lies in a strongly connected component (SCC). This function returns the id number of the SCC containing node.

- -
-
- -

◆ out_degree()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - -
TIntType libsemigroups::ActionDigraph< TIntType >::out_degree () const
-
-inlinenoexcept
-
- -

Returns the out-degree of this.

- -
-
- -

◆ reserve()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::ActionDigraph< TIntType >::reserve (TIntType nr_ndes,
TIntType out_dgree 
) const
-
-inlinenoexcept
-
- -

Reserve capacity.

-

Ensures that this has capacity for nr_ndes nodes each with out_dgree out-edges.

-
Iterator validity This function modifies the object defined by this, any iterators, pointers or references pointing into this are invalidated by a call to this function.
-
Exceptions This function guarantees not to throw a LibsemigroupsException. If an exception is thrown, this is guaranteed not to be modified.
- -
-
- -

◆ scc_id()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - - -
TIntType libsemigroups::ActionDigraph< TIntType >::scc_id (node_type nd) const
-
-inline
-
- -

Returns the id of the strongly connected component of a node.

-

Every node in this lies in a strongly connected component (SCC). This function returns the id number of the SCC containing node.

- -
-
- -

◆ spanning_forest()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - -
Forest const& libsemigroups::ActionDigraph< TIntType >::spanning_forest () const
-
-inline
-
- -

Returns a Forest comprised of spanning trees for each SCC.

-

This function returns a Forest which contains the nodes of this, where the forest contains a spanning tree for each strongly connected component, rooted on the minimum element index of that component.

- -
-
- -

◆ validate()

- -
-
-
-template<typename TIntType>
- - - - - -
- - - - - - - -
bool libsemigroups::ActionDigraph< TIntType >::validate () const
-
-inlinenoexcept
-
- -

Check every node has exactly out_degree() out-edges.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_b_mat8-members.html b/classlibsemigroups_1_1_b_mat8-members.html deleted file mode 100644 index 31fc42d55..000000000 --- a/classlibsemigroups_1_1_b_mat8-members.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::BMat8 Member List
-
-
- -

This is the complete list of members for libsemigroups::BMat8, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - -
BMat8()=defaultlibsemigroups::BMat8
BMat8(uint64_t mat)libsemigroups::BMat8inlineexplicit
BMat8(std::vector< std::vector< bool >> const &mat)libsemigroups::BMat8explicit
BMat8(BMat8 const &)=defaultlibsemigroups::BMat8
BMat8(BMat8 &&)=defaultlibsemigroups::BMat8
one()libsemigroups::BMat8inlinestatic
operator!=(BMat8 const &that) constlibsemigroups::BMat8inline
operator()(size_t i, size_t j) constlibsemigroups::BMat8inline
operator*(BMat8 const &that) constlibsemigroups::BMat8inline
operator<(BMat8 const &that) constlibsemigroups::BMat8inline
operator<<(std::ostringstream &os, BMat8 const &bm)libsemigroups::BMat8friend
operator<<(std::ostream &os, BMat8 const &bm)libsemigroups::BMat8friend
operator=(BMat8 const &)=defaultlibsemigroups::BMat8
operator=(BMat8 &&)=defaultlibsemigroups::BMat8
operator==(BMat8 const &that) constlibsemigroups::BMat8inline
operator>(BMat8 const &that) constlibsemigroups::BMat8inline
random()libsemigroups::BMat8static
random(size_t dim)libsemigroups::BMat8static
set(size_t i, size_t j, bool val)libsemigroups::BMat8inline
swap(BMat8 &that) (defined in libsemigroups::BMat8)libsemigroups::BMat8inline
to_int() constlibsemigroups::BMat8inline
transpose() constlibsemigroups::BMat8inline
~BMat8()=defaultlibsemigroups::BMat8
- - - - diff --git a/classlibsemigroups_1_1_b_mat8.html b/classlibsemigroups_1_1_b_mat8.html deleted file mode 100644 index 69d9e47f7..000000000 --- a/classlibsemigroups_1_1_b_mat8.html +++ /dev/null @@ -1,862 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::BMat8 Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Static Public Member Functions | -Friends | -List of all members
-
-
libsemigroups::BMat8 Class Reference
-
-
- -

Class for fast boolean matrices of dimension up to 8 x 8. - More...

- -

#include <bmat8.hpp>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BMat8 ()=default
 A default constructor. More...
 
 BMat8 (uint64_t mat)
 A constructor. More...
 
 BMat8 (std::vector< std::vector< bool >> const &mat)
 A constructor. More...
 
 BMat8 (BMat8 const &)=default
 A constructor. More...
 
 BMat8 (BMat8 &&)=default
 A constructor. More...
 
 ~BMat8 ()=default
 A default destructor. More...
 
bool operator!= (BMat8 const &that) const
 Returns true if this does not equal that. More...
 
bool operator() (size_t i, size_t j) const
 Returns the entry in the (i, j)th position. More...
 
BMat8 operator* (BMat8 const &that) const
 Returns the matrix product of this and that. More...
 
bool operator< (BMat8 const &that) const
 Returns true if this is less than that. More...
 
BMat8operator= (BMat8 const &)=default
 A constructor. More...
 
BMat8operator= (BMat8 &&)=default
 A constructor. More...
 
bool operator== (BMat8 const &that) const
 Returns true if this equals that. More...
 
bool operator> (BMat8 const &that) const
 Returns true if this is greater than that. More...
 
void set (size_t i, size_t j, bool val)
 Sets the (i, j)th position to val. More...
 
-void swap (BMat8 &that)
 
uint64_t to_int () const
 Returns the integer representation of this. More...
 
BMat8 transpose () const
 Returns the transpose of this. More...
 
- - - - - - - - - - -

-Static Public Member Functions

static BMat8 one ()
 Returns the identity BMat8. More...
 
static BMat8 random ()
 Returns a random BMat8. More...
 
static BMat8 random (size_t dim)
 Returns a random square BMat8 up to dimension dim. More...
 
- - - - - - - -

-Friends

std::ostringstream & operator<< (std::ostringstream &os, BMat8 const &bm)
 Insertion operator. More...
 
std::ostream & operator<< (std::ostream &os, BMat8 const &bm)
 Insertion operator. More...
 
-

Detailed Description

-

Class for fast boolean matrices of dimension up to 8 x 8.

-

The methods for these small matrices over the boolean semiring are more optimised than the generic methods for boolean matrices. Note that all BMat8 are represented internally as an 8 x 8 matrix; any entries not defined by the user are taken to be 0. This does not affect the results of any calculations.

-

BMat8 is a trivial class.

-

Constructor & Destructor Documentation

- -

◆ BMat8() [1/5]

- -
-
- - - - - -
- - - - - - - -
libsemigroups::BMat8::BMat8 ()
-
-default
-
- -

A default constructor.

-

This constructor gives no guarantees on what the matrix will contain.

- -
-
- -

◆ BMat8() [2/5]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::BMat8::BMat8 (uint64_t mat)
-
-inlineexplicit
-
- -

A constructor.

-

This constructor initializes a BMat8 to have rows equal to the 8 chunks, of 8 bits each, of the binary representation of mat.

- -
-
- -

◆ BMat8() [3/5]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::BMat8::BMat8 (std::vector< std::vector< bool >> const & mat)
-
-explicit
-
- -

A constructor.

-

This constructor initializes a matrix where the rows of the matrix are the vectors in mat.

- -
-
- -

◆ BMat8() [4/5]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::BMat8::BMat8 (BMat8 const & )
-
-default
-
- -

A constructor.

-

This is the copy constructor.

- -
-
- -

◆ BMat8() [5/5]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::BMat8::BMat8 (BMat8 && )
-
-default
-
- -

A constructor.

-

This is the move constructor.

- -
-
- -

◆ ~BMat8()

- -
-
- - - - - -
- - - - - - - -
libsemigroups::BMat8::~BMat8 ()
-
-default
-
- -

A default destructor.

- -
-
-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
static BMat8 libsemigroups::BMat8::one ()
-
-inlinestatic
-
- -

Returns the identity BMat8.

-

This method returns the 8 x 8 BMat8 with 1s on the main diagonal.

- -
-
- -

◆ operator!=()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::BMat8::operator!= (BMat8 const & that) const
-
-inline
-
- -

Returns true if this does not equal that.

-

This method checks the mathematical inequality of two BMat8 objects.

- -
-
- -

◆ operator()()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::BMat8::operator() (size_t i,
size_t j 
) const
-
-inline
-
- -

Returns the entry in the (i, j)th position.

-

This method returns the entry in the (i, j)th position. Note that since all matrices are internally represented as 8 x 8, it is possible to access entries that you might not believe exist.

- -
-
- -

◆ operator*()

- -
-
- - - - - -
- - - - - - - - -
BMat8 libsemigroups::BMat8::operator* (BMat8 const & that) const
-
-inline
-
- -

Returns the matrix product of this and that.

-

This method returns the standard matrix product (over the boolean semiring) of two BMat8 objects. Uses the technique given here.

- -
-
- -

◆ operator<()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::BMat8::operator< (BMat8 const & that) const
-
-inline
-
- -

Returns true if this is less than that.

-

This method checks whether a BMat8 objects is less than another. We order by the results of to_int() for each matrix.

- -
-
- -

◆ operator=() [1/2]

- -
-
- - - - - -
- - - - - - - - -
BMat8& libsemigroups::BMat8::operator= (BMat8 const & )
-
-default
-
- -

A constructor.

-

This is the copy assignement constructor.

- -
-
- -

◆ operator=() [2/2]

- -
-
- - - - - -
- - - - - - - - -
BMat8& libsemigroups::BMat8::operator= (BMat8 && )
-
-default
-
- -

A constructor.

-

This is the move assignment constructor.

- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::BMat8::operator== (BMat8 const & that) const
-
-inline
-
- -

Returns true if this equals that.

-

This method checks the mathematical equality of two BMat8 objects.

- -
-
- -

◆ operator>()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::BMat8::operator> (BMat8 const & that) const
-
-inline
-
- -

Returns true if this is greater than that.

-

This method checks whether a BMat8 objects is greater than another. We order by the results of to_int() for each matrix.

- -
-
- -

◆ random() [1/2]

- -
-
- - - - - -
- - - - - - - -
static BMat8 libsemigroups::BMat8::random ()
-
-static
-
- -

Returns a random BMat8.

-

This method returns a BMat8 chosen at random.

- -
-
- -

◆ random() [2/2]

- -
-
- - - - - -
- - - - - - - - -
static BMat8 libsemigroups::BMat8::random (size_t dim)
-
-static
-
- -

Returns a random square BMat8 up to dimension dim.

-

This method returns a BMat8 chosen at random, where only the top-left dim x dim entries may be non-zero.

- -
-
- -

◆ set()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void libsemigroups::BMat8::set (size_t i,
size_t j,
bool val 
)
-
-inline
-
- -

Sets the (i, j)th position to val.

-

This method sets the (i, j)th entry of this to val. Uses the bit twiddle for setting bits found here.

- -
-
- -

◆ to_int()

- -
-
- - - - - -
- - - - - - - -
uint64_t libsemigroups::BMat8::to_int () const
-
-inline
-
- -

Returns the integer representation of this.

-

Returns an unsigned integer obtained by interpreting an 8 x 8 BMat8 as a sequence of 64 bits (reading rows left to right, from top to bottom) and then this sequence as an unsigned int.

- -
-
- -

◆ transpose()

- -
-
- - - - - -
- - - - - - - -
BMat8 libsemigroups::BMat8::transpose () const
-
-inline
-
- -

Returns the transpose of this.

-

Returns the standard matrix transpose of a BMat8. Uses the technique found in Knuth AoCP Vol. 4 Fasc. 1a, p. 15.

- -
-
-

Friends And Related Function Documentation

- -

◆ operator<< [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
std::ostringstream& operator<< (std::ostringstream & os,
BMat8 const & bm 
)
-
-friend
-
- -

Insertion operator.

-

This method allows BMat8 objects to be inserted into an ostringstream

- -
-
- -

◆ operator<< [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
std::ostream& operator<< (std::ostream & os,
BMat8 const & bm 
)
-
-friend
-
- -

Insertion operator.

-

This method allows BMat8 objects to be inserted into a ostream.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_bipartition-members.html b/classlibsemigroups_1_1_bipartition-members.html deleted file mode 100644 index 91e5e1147..000000000 --- a/classlibsemigroups_1_1_bipartition-members.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Bipartition Member List
-
-
- -

This is the complete list of members for libsemigroups::Bipartition, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inline
begin() constlibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inline
Bipartition(size_t degree)libsemigroups::Bipartitioninlineexplicit
Bipartition(std::vector< u_int32_t > *blocks)libsemigroups::Bipartitioninlineexplicit
Bipartition(std::vector< u_int32_t > const &blocks)libsemigroups::Bipartitioninlineexplicit
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< u_int32_t, Bipartition >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inline
cend() constlibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inline
complexity() const overridelibsemigroups::Bipartitionvirtual
const_nr_blocks() constlibsemigroups::Bipartition
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlinevirtual
degree() const overridelibsemigroups::Bipartitionvirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inline
ElementWithVectorData(std::vector< u_int32_t > *vector)libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlineexplicit
ElementWithVectorData(std::vector< u_int32_t > const &vector)libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::Bipartitionvirtual
is_transverse_block(size_t index)libsemigroups::Bipartition
left_blocks()libsemigroups::Bipartition
NOT_RWSE enum valuelibsemigroups::Element
nr_blocks()libsemigroups::Bipartition
nr_left_blocks()libsemigroups::Bipartition
nr_right_blocks()libsemigroups::Bipartition
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inline
rank()libsemigroups::Bipartition
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlinevirtual
redefine(Element const *x, Element const *y, size_t const &thread_id) overridelibsemigroups::Bipartitionvirtual
ElementWithVectorDataDefaultHash< u_int32_t, Bipartition >::redefine(Element const *x, Element const *y)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
right_blocks()libsemigroups::Bipartition
RWSE enum valuelibsemigroups::Element
set_nr_blocks(size_t nr_blocks)libsemigroups::Bipartitioninline
set_nr_left_blocks(size_t nr_left_blocks)libsemigroups::Bipartitioninline
set_rank(size_t rank)libsemigroups::Bipartitioninline
swap(Element *x) overridelibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlinevirtual
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_bipartition.html b/classlibsemigroups_1_1_bipartition.html deleted file mode 100644 index 941559994..000000000 --- a/classlibsemigroups_1_1_bipartition.html +++ /dev/null @@ -1,749 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Bipartition Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::Bipartition Class Reference
-
-
- -

Class for bipartitions. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::Bipartition:
-
-
Inheritance graph
- - - - - - -
-
-Collaboration diagram for libsemigroups::Bipartition:
-
-
Collaboration graph
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Bipartition (size_t degree)
 A constructor. More...
 
 Bipartition (std::vector< u_int32_t > *blocks)
 A constructor. More...
 
 Bipartition (std::vector< u_int32_t > const &blocks)
 A constructor. More...
 
size_t complexity () const override
 Returns the approximate time complexity of multiplication. More...
 
u_int32_t const_nr_blocks () const
 Returns the number of blocks in a bipartition. More...
 
size_t degree () const override
 Returns the degree of the bipartition. More...
 
Elementidentity () const override
 Returns an identity bipartition. More...
 
bool is_transverse_block (size_t index)
 Returns true if the block with index index is transverse. More...
 
Blocksleft_blocks ()
 Return the left blocks of a bipartition. More...
 
u_int32_t nr_blocks ()
 Returns the number of blocks in a bipartition. More...
 
u_int32_t nr_left_blocks ()
 Returns the number of blocks containing a positive integer. More...
 
u_int32_t nr_right_blocks ()
 Returns the number of blocks containing a negative integer. More...
 
size_t rank ()
 Returns the number of transverse blocks. More...
 
void redefine (Element const *x, Element const *y, size_t const &thread_id) override
 Multiply x and y and stores the result in this. More...
 
Blocksright_blocks ()
 Return the left blocks of a bipartition. More...
 
void set_nr_blocks (size_t nr_blocks)
 Set the cached number of blocks. More...
 
void set_nr_left_blocks (size_t nr_left_blocks)
 Set the cached number of left blocks. More...
 
void set_rank (size_t rank)
 Set the cached rank. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< u_int32_t > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< u_int32_t > const &vector)
 A constructor. More...
 
u_int32_t at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< u_int32_t >::iterator begin () const
 Returns an iterator. More...
 
std::vector< u_int32_t >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< u_int32_t >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< u_int32_t >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
u_int32_t operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< u_int32_t, Bipartition >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >
std::vector< u_int32_t > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

Class for bipartitions.

-

A bipartition is a partition of the set \(\{0, ..., 2n - 1\}\) for some integer \(n\); see the Semigroups package for GAP documentation for more details. The Bipartition class is more complex (i.e. has more methods) than strictly required by the algorithms for a Semigroup object because the extra methods are used in the GAP package Semigroups package for GAP.

-

Constructor & Destructor Documentation

- -

◆ Bipartition() [1/3]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Bipartition::Bipartition (size_t degree)
-
-inlineexplicit
-
- -

A constructor.

-

Constructs a uninitialised bipartition of degree degree.

- -
-
- -

◆ Bipartition() [2/3]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Bipartition::Bipartition (std::vector< u_int32_t > * blocks)
-
-inlineexplicit
-
- -

A constructor.

-

The parameter blocks must have length 2n for some positive integer n, consist of non-negative integers, and have the property that if i, i > 0, occurs in blocks, then i - 1 occurs earlier in blocks. None of this is checked.

-

The parameter blocks is not copied, and should be deleted using ElementWithVectorData::really_delete.

- -
-
- -

◆ Bipartition() [3/3]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Bipartition::Bipartition (std::vector< u_int32_t > const & blocks)
-
-inlineexplicit
-
- -

A constructor.

-

The parameter blocks must have length 2n for some positive integer n, consist of non-negative integers, and have the property that if i, i > 0, occurs in blocks, then i - 1 occurs earlier in blocks. None of this is checked.

-

The parameter blocks is not copied, and should be deleted using ElementWithVectorData::really_delete.

- -
-
-

Member Function Documentation

- -

◆ complexity()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Bipartition::complexity () const
-
-overridevirtual
-
- -

Returns the approximate time complexity of multiplication.

-

In the case of a Bipartition of degree n the value 2n ^ 2 is returned.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ const_nr_blocks()

- -
-
- - - - - - - -
u_int32_t libsemigroups::Bipartition::const_nr_blocks () const
-
- -

Returns the number of blocks in a bipartition.

-

This method differs for Bipartition::nr_blocks in that the number of blocks is not cached if it has not been previously computed.

- -
-
- -

◆ degree()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Bipartition::degree () const
-
-overridevirtual
-
- -

Returns the degree of the bipartition.

-

A bipartition is of degree n if it is a partition of \(\{0, \ldots, 2n - 1\}\).

- -

Implements libsemigroups::Element.

- -
-
- -

◆ identity()

- -
-
- - - - - -
- - - - - - - -
Element * libsemigroups::Bipartition::identity () const
-
-overridevirtual
-
- -

Returns an identity bipartition.

-

The identity bipartition of degree \(n\) has blocks \(\{i, -i\}\) for all \(i\in \{0, \ldots, n - 1\}\). This method returns a new identity bipartition of degree equal to the degree of this.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ is_transverse_block()

- -
-
- - - - - - - - -
bool libsemigroups::Bipartition::is_transverse_block (size_t index)
-
- -

Returns true if the block with index index is transverse.

-

A block of a biparition is transverse if it contains integers less than and greater than \(n\), which is the degree of the bipartition. This method asserts that the parameter index is less than the number of blocks in the bipartition.

- -
-
- -

◆ left_blocks()

- -
-
- - - - - - - -
Blocks * libsemigroups::Bipartition::left_blocks ()
-
- -

Return the left blocks of a bipartition.

-

The left blocks of a bipartition is the partition of \(\{0, \ldots, n - 1\}\) induced by the bipartition. This method returns a Blocks object representing this partition.

- -
-
- -

◆ nr_blocks()

- -
-
- - - - - - - -
u_int32_t libsemigroups::Bipartition::nr_blocks ()
-
- -

Returns the number of blocks in a bipartition.

-

This value is cached the first time it is computed.

- -
-
- -

◆ nr_left_blocks()

- -
-
- - - - - - - -
u_int32_t libsemigroups::Bipartition::nr_left_blocks ()
-
- -

Returns the number of blocks containing a positive integer.

-

The left blocks of a bipartition is the partition of \(\{0, \ldots, n - 1\}\) induced by the bipartition. This method returns the number of blocks in this partition.

- -
-
- -

◆ nr_right_blocks()

- -
-
- - - - - - - -
u_int32_t libsemigroups::Bipartition::nr_right_blocks ()
-
- -

Returns the number of blocks containing a negative integer.

-

The right blocks of a bipartition is the partition of \(\{n, \ldots, 2n - 1\}\) induced by the bipartition. This method returns the number of blocks in this partition.

- -
-
- -

◆ rank()

- -
-
- - - - - - - -
size_t libsemigroups::Bipartition::rank ()
-
- -

Returns the number of transverse blocks.

-

The rank of a bipartition is the number of blocks containing both positive and negative values. This value is cached after it is first computed.

- -
-
- -

◆ redefine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void libsemigroups::Bipartition::redefine (Element const * x,
Element const * y,
size_t const & thread_id 
)
-
-overridevirtual
-
- -

Multiply x and y and stores the result in this.

-

This method redefines this to be the product (as defined at the top of this page) of the parameters x and y. This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this.

-

The parameter thread_id is required since some temporary storage is required to find the product of x and y. Note that if different threads call this method with the same value of thread_id then bad things will happen.

- -

Reimplemented from libsemigroups::Element.

- -
-
- -

◆ right_blocks()

- -
-
- - - - - - - -
Blocks * libsemigroups::Bipartition::right_blocks ()
-
- -

Return the left blocks of a bipartition.

-

The right blocks of a bipartition is the partition of \(\{n, \ldots, 2n - 1\}\) induced by the bipartition. This method returns a Blocks object representing this partition.

- -
-
- -

◆ set_nr_blocks()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Bipartition::set_nr_blocks (size_t nr_blocks)
-
-inline
-
- -

Set the cached number of blocks.

-

This method sets the cached value of the number of blocks of this to nr_blocks. It asserts that either there is no existing cached value or nr_blocks equals the existing cached value.

- -
-
- -

◆ set_nr_left_blocks()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Bipartition::set_nr_left_blocks (size_t nr_left_blocks)
-
-inline
-
- -

Set the cached number of left blocks.

-

This method sets the cached value of the number of left blocks of this to nr_left_blocks. It asserts that either there is no existing cached value or nr_left_blocks equals the existing cached value.

- -
-
- -

◆ set_rank()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Bipartition::set_rank (size_t rank)
-
-inline
-
- -

Set the cached rank.

-

This method sets the cached value of the rank of this to rank. It asserts that either there is no existing cached value or rank equals the existing cached value.

- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_bipartition.png b/classlibsemigroups_1_1_bipartition.png deleted file mode 100644 index 592b36c22..000000000 Binary files a/classlibsemigroups_1_1_bipartition.png and /dev/null differ diff --git a/classlibsemigroups_1_1_bipartition__coll__graph.map b/classlibsemigroups_1_1_bipartition__coll__graph.map deleted file mode 100644 index 870092faa..000000000 --- a/classlibsemigroups_1_1_bipartition__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/classlibsemigroups_1_1_bipartition__coll__graph.md5 b/classlibsemigroups_1_1_bipartition__coll__graph.md5 deleted file mode 100644 index f1c0067ee..000000000 --- a/classlibsemigroups_1_1_bipartition__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -95b9bbb96dd6b7b9219ec82205134fdc \ No newline at end of file diff --git a/classlibsemigroups_1_1_bipartition__coll__graph.png b/classlibsemigroups_1_1_bipartition__coll__graph.png deleted file mode 100644 index 9fb359858..000000000 Binary files a/classlibsemigroups_1_1_bipartition__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_bipartition__inherit__graph.map b/classlibsemigroups_1_1_bipartition__inherit__graph.map deleted file mode 100644 index 870092faa..000000000 --- a/classlibsemigroups_1_1_bipartition__inherit__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/classlibsemigroups_1_1_bipartition__inherit__graph.md5 b/classlibsemigroups_1_1_bipartition__inherit__graph.md5 deleted file mode 100644 index 4da10f082..000000000 --- a/classlibsemigroups_1_1_bipartition__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -42199343194ccc5b394580817e814f3e \ No newline at end of file diff --git a/classlibsemigroups_1_1_bipartition__inherit__graph.png b/classlibsemigroups_1_1_bipartition__inherit__graph.png deleted file mode 100644 index 9fb359858..000000000 Binary files a/classlibsemigroups_1_1_bipartition__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_blocks-members.html b/classlibsemigroups_1_1_blocks-members.html deleted file mode 100644 index d3c36973e..000000000 --- a/classlibsemigroups_1_1_blocks-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Blocks Member List
-
-
- -

This is the complete list of members for libsemigroups::Blocks, including all inherited members.

- - - - - - - - - - - - - - - - - - -
block(size_t pos) constlibsemigroups::Blocksinline
Blocks()libsemigroups::Blocksinline
Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup)libsemigroups::Blocksinline
Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup, u_int32_t nr_blocks)libsemigroups::Blocksinline
Blocks(Blocks const &copy)libsemigroups::Blocks
cbegin() constlibsemigroups::Blocksinline
cend() constlibsemigroups::Blocksinline
degree() constlibsemigroups::Blocksinline
hash_value() constlibsemigroups::Blocks
is_transverse_block(size_t index) constlibsemigroups::Blocksinline
lookup() constlibsemigroups::Blocksinline
nr_blocks() constlibsemigroups::Blocksinline
operator<(const Blocks &that) constlibsemigroups::Blocks
operator=(Blocks const &copy)=deletelibsemigroups::Blocks
operator==(const Blocks &that) constlibsemigroups::Blocks
rank()libsemigroups::Blocks
~Blocks()libsemigroups::Blocksinline
- - - - diff --git a/classlibsemigroups_1_1_blocks.html b/classlibsemigroups_1_1_blocks.html deleted file mode 100644 index 76ff20077..000000000 --- a/classlibsemigroups_1_1_blocks.html +++ /dev/null @@ -1,632 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Blocks Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::Blocks Class Reference
-
-
- -

Class for signed partitions of the set \(\{0, \ldots, n - 1\}\). - More...

- -

#include <blocks.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Blocks ()
 A constructor. More...
 
 Blocks (std::vector< u_int32_t > *blocks, std::vector< bool > *lookup)
 A constructor. More...
 
 Blocks (std::vector< u_int32_t > *blocks, std::vector< bool > *lookup, u_int32_t nr_blocks)
 A constructor. More...
 
 Blocks (Blocks const &copy)
 Copy constructor. More...
 
 ~Blocks ()
 Default destructor. More...
 
u_int32_t block (size_t pos) const
 Returns the index of the block containing pos. More...
 
std::vector< u_int32_t >::const_iterator cbegin () const
 Returns a const_iterator pointing to the index of the first block. More...
 
std::vector< u_int32_t >::const_iterator cend () const
 Returns a const_iterator referring to past-the-end of the last block. More...
 
u_int32_t degree () const
 Returns the degree of a Blocks object. More...
 
size_t hash_value () const
 Returns a hash value for a this. More...
 
bool is_transverse_block (size_t index) const
 Returns true if the block with index index is transverse. More...
 
std::vector< bool > const * lookup () const
 Returns a pointer to the lookup table for block indices. More...
 
u_int32_t nr_blocks () const
 Returns the number of blocks in the Blocks object. More...
 
bool operator< (const Blocks &that) const
 Returns true if this is less than that. More...
 
Blocksoperator= (Blocks const &copy)=delete
 The assignment operator is deleted for Blocks to avoid unintended copying. More...
 
bool operator== (const Blocks &that) const
 Returns true if this equals that. More...
 
u_int32_t rank ()
 Returns the number of signed (transverse) blocks in this. More...
 
-

Detailed Description

-

Class for signed partitions of the set \(\{0, \ldots, n - 1\}\).

-

It is possible to associate to every Bipartition a pair of blocks, Bipartition::left_blocks and Bipartition::right_blocks, which determine the Green's \(\mathscr{L}\)- and \(\mathscr{R}\)-classes of the Bipartition in the monoid of all bipartitions. This is the purpose of this class.

-

The Blocks class is not currently used by any of the methods for the Semigroup class but the extra methods are used in the GAP package Semigroups package for GAP.

-

Constructor & Destructor Documentation

- -

◆ Blocks() [1/4]

- -
-
- - - - - -
- - - - - - - -
libsemigroups::Blocks::Blocks ()
-
-inline
-
- -

A constructor.

-

Constructs a blocks object of size 0.

- -
-
- -

◆ Blocks() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::Blocks::Blocks (std::vector< u_int32_t > * blocks,
std::vector< bool > * lookup 
)
-
-inline
-
- -

A constructor.

-

The parameter blocks must be non-empty, consist of non-negative integers, and have the property that if some positive \(i\) occurs in blocks, then \(i - 1\) occurs earlier in blocks. None of this is checked. The parameter blocks is not copied, and is deleted by the destructor Blocks::~Blocks.

-

The parameter lookup must have length equal to the number of different values in blocks (or one more than the maximum value in the list); this is equal to the number of blocks in the partition. A value true in position \(i\) indicates that the \(i\)th block is signed (transverse) and false that it is unsigned.

- -
-
- -

◆ Blocks() [3/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
libsemigroups::Blocks::Blocks (std::vector< u_int32_t > * blocks,
std::vector< bool > * lookup,
u_int32_t nr_blocks 
)
-
-inline
-
- -

A constructor.

-

The parameter blocks must have length \(n\) for some integer \(n > 0\), consist of non-negative integers, and have the property that if \(i\), \(i > 0\) occurs in blocks, then \(i - 1\) occurs earlier in blocks. None of this is checked. The parameter blocks is not copied, and is deleted by the destructor Blocks::~Blocks.

-

The parameter lookup must have length equal to the number of different values in blocks (or one more than the maximum value in the list); this is equal to the number of blocks in the partition. A value true in position \(i\) indicates that the \(i\)th block is signed (transverse) and false that it is unsigned.

-

The parameter nr_blocks must be the number of blocks (i.e. one more than the maximum value in blocks).

-

This constructor is provided for the situation where the number of blocks in blocks is known a priori and so does not need to be calculated in the constructor.

- -
-
- -

◆ Blocks() [4/4]

- -
-
- - - - - - - - -
libsemigroups::Blocks::Blocks (Blocks const & copy)
-
- -

Copy constructor.

-

Copies all the information in copy and returns a new instance of Blocks.

- -
-
- -

◆ ~Blocks()

- -
-
- - - - - -
- - - - - - - -
libsemigroups::Blocks::~Blocks ()
-
-inline
-
- -

Default destructor.

-

Deletes the blocks and lookup provided at construction time.

- -
-
-

Member Function Documentation

- -

◆ block()

- -
-
- - - - - -
- - - - - - - - -
u_int32_t libsemigroups::Blocks::block (size_t pos) const
-
-inline
-
- -

Returns the index of the block containing pos.

-

This method asserts that pos is valid, i.e. that it is less than the degree of this.

- -
-
- -

◆ cbegin()

- -
-
- - - - - -
- - - - - - - -
std::vector<u_int32_t>::const_iterator libsemigroups::Blocks::cbegin () const
-
-inline
-
- -

Returns a const_iterator pointing to the index of the first block.

-

This method asserts that degree is not 0.

- -
-
- -

◆ cend()

- -
-
- - - - - -
- - - - - - - -
std::vector<u_int32_t>::const_iterator libsemigroups::Blocks::cend () const
-
-inline
-
- -

Returns a const_iterator referring to past-the-end of the last block.

-

This method asserts that degree is not 0.

- -
-
- -

◆ degree()

- -
-
- - - - - -
- - - - - - - -
u_int32_t libsemigroups::Blocks::degree () const
-
-inline
-
- -

Returns the degree of a Blocks object.

-

The degree of a Blocks object is the size of the set of which it is a partition.

- -
-
- -

◆ hash_value()

- -
-
- - - - - - - -
size_t libsemigroups::Blocks::hash_value () const
-
- -

Returns a hash value for a this.

-

This method returns a hash value for an instance of Blocks. This value is recomputed every time this method is called.

- -
-
- -

◆ is_transverse_block()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::Blocks::is_transverse_block (size_t index) const
-
-inline
-
- -

Returns true if the block with index index is transverse.

-

This method returns true if the block with index index is a transverse (or signed) block and it returns false if it is not transverse (or unsigned). This method asserts that the parameter index is valid, i.e. that it is less than the degree of this.

- -
-
- -

◆ lookup()

- -
-
- - - - - -
- - - - - - - -
std::vector<bool> const* libsemigroups::Blocks::lookup () const
-
-inline
-
- -

Returns a pointer to the lookup table for block indices.

-

The vector pointed to by the return value of this method has value true in position i if the i th block of this is a transverse block; the entry in position i is false otherwise.

- -
-
- -

◆ nr_blocks()

- -
-
- - - - - -
- - - - - - - -
u_int32_t libsemigroups::Blocks::nr_blocks () const
-
-inline
-
- -

Returns the number of blocks in the Blocks object.

-

This method returns the number of parts in the partition that instances of this class represent.

- -
-
- -

◆ operator<()

- -
-
- - - - - - - - -
bool libsemigroups::Blocks::operator< (const Blocksthat) const
-
- -

Returns true if this is less than that.

-

This operator defines a total order on the set of all Blocks objects (including those of different degree).

- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Blocks& libsemigroups::Blocks::operator= (Blocks const & copy)
-
-delete
-
- -

The assignment operator is deleted for Blocks to avoid unintended copying.

- -
-
- -

◆ operator==()

- -
-
- - - - - - - - -
bool libsemigroups::Blocks::operator== (const Blocksthat) const
-
- -

Returns true if this equals that.

-

Two Blocks objects are equal if and only if their underlying signed partitions are equal. It is ok to compare blocks of different degree with this operator.

- -
-
- -

◆ rank()

- -
-
- - - - - - - -
u_int32_t libsemigroups::Blocks::rank ()
-
- -

Returns the number of signed (transverse) blocks in this.

-

Equivalently, this method returns the number of true values in Blocks::lookup().

- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_boolean_mat-members.html b/classlibsemigroups_1_1_boolean_mat-members.html deleted file mode 100644 index 43379814e..000000000 --- a/classlibsemigroups_1_1_boolean_mat-members.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::BooleanMat Member List
-
-
- -

This is the complete list of members for libsemigroups::BooleanMat, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< bool, BooleanMat >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< bool, BooleanMat >inline
begin() constlibsemigroups::ElementWithVectorData< bool, BooleanMat >inline
BooleanMat(std::vector< bool > *matrix)libsemigroups::BooleanMatinlineexplicit
BooleanMat(std::vector< std::vector< bool >> const &matrix)libsemigroups::BooleanMatinlineexplicit
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< bool, BooleanMat >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< bool, BooleanMat >inline
cend() constlibsemigroups::ElementWithVectorData< bool, BooleanMat >inline
complexity() const overridelibsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< bool, BooleanMat >inlinevirtual
degree() const overridelibsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< bool, BooleanMat >inline
ElementWithVectorData(std::vector< bool > *vector)libsemigroups::ElementWithVectorData< bool, BooleanMat >inlineexplicit
ElementWithVectorData(std::vector< bool > const &vector)libsemigroups::ElementWithVectorData< bool, BooleanMat >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< bool, BooleanMat >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inlinevirtual
MatrixOverSemiringBase(std::vector< bool > *matrix, Semiring< bool > const *semiring)libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inline
MatrixOverSemiringBase(std::vector< std::vector< bool >> const &matrix, Semiring< bool > const *semiring)libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inline
MatrixOverSemiringBase(std::vector< bool > *matrix)libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inlineexplicitprotected
MatrixOverSemiringBase< bool, BooleanMat > (defined in libsemigroups::BooleanMat)libsemigroups::BooleanMatfriend
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< bool, BooleanMat >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< bool, BooleanMat >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< bool, BooleanMat >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< bool, BooleanMat >inlinevirtual
redefine(Element const *x, Element const *y) finallibsemigroups::BooleanMatvirtual
ElementWithVectorDataDefaultHash< bool, BooleanMat >::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
semiring() constlibsemigroups::MatrixOverSemiringBase< bool, BooleanMat >inline
swap(Element *x) overridelibsemigroups::ElementWithVectorData< bool, BooleanMat >inlinevirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< bool, BooleanMat >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_boolean_mat.html b/classlibsemigroups_1_1_boolean_mat.html deleted file mode 100644 index 66ef932ba..000000000 --- a/classlibsemigroups_1_1_boolean_mat.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::BooleanMat Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Friends | -List of all members
-
-
libsemigroups::BooleanMat Class Reference
-
-
- -

Matrices over the boolean semiring. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::BooleanMat:
-
-
Inheritance graph
- - - - - - - -
-
-Collaboration diagram for libsemigroups::BooleanMat:
-
-
Collaboration graph
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BooleanMat (std::vector< bool > *matrix)
 A constructor. More...
 
 BooleanMat (std::vector< std::vector< bool >> const &matrix)
 A constructor. More...
 
void redefine (Element const *x, Element const *y) final
 Multiplies x and y and stores the result in this. More...
 
- Public Member Functions inherited from libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >
 MatrixOverSemiringBase (std::vector< bool > *matrix, Semiring< bool > const *semiring)
 A constructor. More...
 
 MatrixOverSemiringBase (std::vector< std::vector< bool >> const &matrix, Semiring< bool > const *semiring)
 A constructor. More...
 
size_t complexity () const override
 Returns the approximate time complexity of multiplying two matrices. More...
 
size_t degree () const override
 Returns the dimension of the matrix. More...
 
Elementidentity () const override
 Returns the identity matrix with dimension of this. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
Semiring< bool > const * semiring () const
 Returns a pointer to the Semiring over which the matrix is defined. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< bool, BooleanMat >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< bool > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< bool > const &vector)
 A constructor. More...
 
bool at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< bool >::iterator begin () const
 Returns an iterator. More...
 
std::vector< bool >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< bool >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< bool >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
bool operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - -

-Friends

-class MatrixOverSemiringBase< bool, BooleanMat >
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Protected Member Functions inherited from libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >
 MatrixOverSemiringBase (std::vector< bool > *matrix)
 Constructs a MatrixOverSemiringBase with whose underlying semiring is not defined. The underlying semiring must be set by any class deriving from this one. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< bool, BooleanMat >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< bool, BooleanMat >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< bool, BooleanMat >
std::vector< bool > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

Matrices over the boolean semiring.

-

A boolean matrix is a square matrix over the boolean semiring, under the usual multiplication of matrices.

-

Every boolean matrix is defined over a single static copy of the boolean semiring.

-

Constructor & Destructor Documentation

- -

◆ BooleanMat() [1/2]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::BooleanMat::BooleanMat (std::vector< bool > * matrix)
-
-inlineexplicit
-
- -

A constructor.

-

Constructs a boolean matrix defined by matrix, matrix is not copied, and should be deleted using ElementWithVectorData::really_delete.

-

The parameter matrix should be a vector of boolean values of length \(n ^ 2\) for some integer \(n\), so that the value in position \(ni + j\) is the entry in row \(i\) and column \(j\) of the constructed matrix.

- -
-
- -

◆ BooleanMat() [2/2]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::BooleanMat::BooleanMat (std::vector< std::vector< bool >> const & matrix)
-
-inlineexplicit
-
- -

A constructor.

-

Constructs a boolean matrix defined by matrix, which is copied into the constructed boolean matrix; see BooleanMat::BooleanMat for more details.

- -
-
-

Member Function Documentation

- -

◆ redefine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::BooleanMat::redefine (Element const * x,
Element const * y 
)
-
-finalvirtual
-
- -

Multiplies x and y and stores the result in this.

-

This method asserts that the dimensions of x, y, and this, are all equal, and that neither x nor y equals this.

- -

Reimplemented from libsemigroups::Element.

- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_boolean_mat.png b/classlibsemigroups_1_1_boolean_mat.png deleted file mode 100644 index 3a23d6578..000000000 Binary files a/classlibsemigroups_1_1_boolean_mat.png and /dev/null differ diff --git a/classlibsemigroups_1_1_boolean_mat__coll__graph.map b/classlibsemigroups_1_1_boolean_mat__coll__graph.map deleted file mode 100644 index cd52fd112..000000000 --- a/classlibsemigroups_1_1_boolean_mat__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_boolean_mat__coll__graph.md5 b/classlibsemigroups_1_1_boolean_mat__coll__graph.md5 deleted file mode 100644 index 35e463fff..000000000 --- a/classlibsemigroups_1_1_boolean_mat__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -b090d9553cf3e8ab9a3280e49c5ecba8 \ No newline at end of file diff --git a/classlibsemigroups_1_1_boolean_mat__coll__graph.png b/classlibsemigroups_1_1_boolean_mat__coll__graph.png deleted file mode 100644 index f8dc85b87..000000000 Binary files a/classlibsemigroups_1_1_boolean_mat__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_boolean_mat__inherit__graph.map b/classlibsemigroups_1_1_boolean_mat__inherit__graph.map deleted file mode 100644 index cd52fd112..000000000 --- a/classlibsemigroups_1_1_boolean_mat__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_boolean_mat__inherit__graph.md5 b/classlibsemigroups_1_1_boolean_mat__inherit__graph.md5 deleted file mode 100644 index 04031127e..000000000 --- a/classlibsemigroups_1_1_boolean_mat__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -678975a25099661898531c3a757fe514 \ No newline at end of file diff --git a/classlibsemigroups_1_1_boolean_mat__inherit__graph.png b/classlibsemigroups_1_1_boolean_mat__inherit__graph.png deleted file mode 100644 index f8dc85b87..000000000 Binary files a/classlibsemigroups_1_1_boolean_mat__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_boolean_semiring-members.html b/classlibsemigroups_1_1_boolean_semiring-members.html deleted file mode 100644 index 98b65319d..000000000 --- a/classlibsemigroups_1_1_boolean_semiring-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::BooleanSemiring Member List
-
-
- -

This is the complete list of members for libsemigroups::BooleanSemiring, including all inherited members.

- - - - - - - - - - -
BooleanSemiring() (defined in libsemigroups::BooleanSemiring)libsemigroups::BooleanSemiringinline
INFTYlibsemigroups::Semiring< bool >static
MINUS_INFTYlibsemigroups::Semiring< bool >static
one() const overridelibsemigroups::BooleanSemiringinlinevirtual
plus(bool x, bool y) const overridelibsemigroups::BooleanSemiringinlinevirtual
prod(bool x, bool y) const overridelibsemigroups::BooleanSemiringinlinevirtual
UNDEFINEDlibsemigroups::Semiring< bool >static
zero() const overridelibsemigroups::BooleanSemiringinlinevirtual
~Semiring()libsemigroups::Semiring< bool >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_boolean_semiring.html b/classlibsemigroups_1_1_boolean_semiring.html deleted file mode 100644 index e889a36a9..000000000 --- a/classlibsemigroups_1_1_boolean_semiring.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::BooleanSemiring Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::BooleanSemiring Class Reference
-
-
- -

The usual Boolean semiring. - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::BooleanSemiring:
-
-
Inheritance graph
- - - - -
-
-Collaboration diagram for libsemigroups::BooleanSemiring:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

bool one () const override
 Returns the integer 1. More...
 
bool plus (bool x, bool y) const override
 Returns the sum \(x + y\). More...
 
bool prod (bool x, bool y) const override
 Returns the product \(xy\). More...
 
bool zero () const override
 Returns the integer 0. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< bool >
virtual ~Semiring ()
 A default destructor. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< bool >
static const bool INFTY
 Value representing \(\infty\). More...
 
static const bool MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const bool UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

The usual Boolean semiring.

-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
bool libsemigroups::BooleanSemiring::one () const
-
-inlineoverridevirtual
-
- -

Returns the integer 1.

- -

Implements libsemigroups::Semiring< bool >.

- -
-
- -

◆ plus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::BooleanSemiring::plus (bool x,
bool y 
) const
-
-inlineoverridevirtual
-
- -

Returns the sum \(x + y\).

- -

Implements libsemigroups::Semiring< bool >.

- -
-
- -

◆ prod()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::BooleanSemiring::prod (bool x,
bool y 
) const
-
-inlineoverridevirtual
-
- -

Returns the product \(xy\).

- -

Implements libsemigroups::Semiring< bool >.

- -
-
- -

◆ zero()

- -
-
- - - - - -
- - - - - - - -
bool libsemigroups::BooleanSemiring::zero () const
-
-inlineoverridevirtual
-
- -

Returns the integer 0.

- -

Implements libsemigroups::Semiring< bool >.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_boolean_semiring.png b/classlibsemigroups_1_1_boolean_semiring.png deleted file mode 100644 index c4e533154..000000000 Binary files a/classlibsemigroups_1_1_boolean_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_boolean_semiring__coll__graph.map b/classlibsemigroups_1_1_boolean_semiring__coll__graph.map deleted file mode 100644 index 31625d3b3..000000000 --- a/classlibsemigroups_1_1_boolean_semiring__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_boolean_semiring__coll__graph.md5 b/classlibsemigroups_1_1_boolean_semiring__coll__graph.md5 deleted file mode 100644 index 389696aa9..000000000 --- a/classlibsemigroups_1_1_boolean_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ee79f97d7df7400b4de96bb6dcc536c4 \ No newline at end of file diff --git a/classlibsemigroups_1_1_boolean_semiring__coll__graph.png b/classlibsemigroups_1_1_boolean_semiring__coll__graph.png deleted file mode 100644 index 6613a651f..000000000 Binary files a/classlibsemigroups_1_1_boolean_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_boolean_semiring__inherit__graph.map b/classlibsemigroups_1_1_boolean_semiring__inherit__graph.map deleted file mode 100644 index 31625d3b3..000000000 --- a/classlibsemigroups_1_1_boolean_semiring__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_boolean_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_boolean_semiring__inherit__graph.md5 deleted file mode 100644 index 4e46faa7c..000000000 --- a/classlibsemigroups_1_1_boolean_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -9aa29948b3a6e45a8c462632083d068f \ No newline at end of file diff --git a/classlibsemigroups_1_1_boolean_semiring__inherit__graph.png b/classlibsemigroups_1_1_boolean_semiring__inherit__graph.png deleted file mode 100644 index 6613a651f..000000000 Binary files a/classlibsemigroups_1_1_boolean_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_congruence-members.html b/classlibsemigroups_1_1_congruence-members.html deleted file mode 100644 index a040a2355..000000000 --- a/classlibsemigroups_1_1_congruence-members.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Congruence Member List
-
-
- -

This is the complete list of members for libsemigroups::Congruence, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - -
class_index_t typedeflibsemigroups::Congruence
Congruence(std::string type, size_t nrgens, std::vector< relation_t > const &relations, std::vector< relation_t > const &extra)libsemigroups::Congruence
Congruence(std::string type, Semigroup *semigroup, std::vector< relation_t > const &genpairs)libsemigroups::Congruence
extra() constlibsemigroups::Congruenceinline
force_kbfp()libsemigroups::Congruence
force_kbp()libsemigroups::Congruence
force_p()libsemigroups::Congruence
force_tc()libsemigroups::Congruence
force_tc_prefill()libsemigroups::Congruence
is_done() constlibsemigroups::Congruenceinline
is_obviously_infinite()libsemigroups::Congruence
nontrivial_classes()libsemigroups::Congruence
nr_classes()libsemigroups::Congruenceinline
relations()libsemigroups::Congruenceinline
set_max_threads(size_t nr_threads)libsemigroups::Congruenceinline
set_pack(size_t val)libsemigroups::Congruenceinline
set_prefill(RecVec< class_index_t > const &table)libsemigroups::Congruenceinline
set_relations(std::vector< relation_t > const &relations)libsemigroups::Congruenceinline
set_report(bool val) constlibsemigroups::Congruenceinline
set_report_interval(size_t val)libsemigroups::Congruenceinline
test_equals(word_t const &w1, word_t const &w2)libsemigroups::Congruenceinline
test_less_than(word_t const &w1, word_t const &w2)libsemigroups::Congruenceinline
word_to_class_index(word_t const &word)libsemigroups::Congruenceinline
~Congruence()libsemigroups::Congruenceinline
- - - - diff --git a/classlibsemigroups_1_1_congruence.html b/classlibsemigroups_1_1_congruence.html deleted file mode 100644 index 13a1cf900..000000000 --- a/classlibsemigroups_1_1_congruence.html +++ /dev/null @@ -1,892 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Congruence Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -Public Member Functions | -List of all members
-
-
libsemigroups::Congruence Class Reference
-
-
- -

Class for congruence on a semigroup or fintely presented semigroup. - More...

- -

#include <cong.h>

- - - - - -

-Public Types

typedef size_t class_index_t
 Type for indices of congruence classes in a Congruence object. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Congruence (std::string type, size_t nrgens, std::vector< relation_t > const &relations, std::vector< relation_t > const &extra)
 Constructor for congruences over a finitely presented semigroup. More...
 
 Congruence (std::string type, Semigroup *semigroup, std::vector< relation_t > const &genpairs)
 Constructor for congruences over a Semigroup object. More...
 
 ~Congruence ()
 A default destructor. More...
 
std::vector< relation_t > const & extra () const
 Returns the vector of extra relations (or equivalently, generating pairs) used to define the congruence. More...
 
void force_kbfp ()
 Use the Knuth-Bendix algorithm on a rewriting system RWS with rules obtained from Congruence::relations and Congruence::extra, followed by the Froidure-Pin algorithm on the resulting semigroup. More...
 
void force_kbp ()
 Use the Knuth-Bendix algorithm on a rewriting system RWS with rules obtained from Congruence::relations followed by an elementary orbit on pairs method on the resulting semigroup. More...
 
void force_p ()
 Use an elementary orbit algorithm which enumerates pairs of Element objects that are related in this. More...
 
void force_tc ()
 Use the Todd-Coxeter algorithm. More...
 
void force_tc_prefill ()
 Use the Todd-Coxeter algorithm after prefilling the table. More...
 
bool is_done () const
 Returns true if the structure of the congruence is known. More...
 
bool is_obviously_infinite ()
 This method tries to quickly determine whether or not the Congruence has infinitely many classes. More...
 
Partition< word_t > * nontrivial_classes ()
 Returns the non-trivial classes of the congruence. More...
 
size_t nr_classes ()
 Returns the number of congruences classes of this. More...
 
std::vector< relation_t > const & relations ()
 Returns the vector of relations used to define the semigroup over which the congruence is defined. More...
 
void set_max_threads (size_t nr_threads)
 Set the maximum number of threads for a Congruence over a Semigroup. More...
 
void set_pack (size_t val)
 Set the maximum number of active cosets in Todd-Coxeter before entering packing phase. More...
 
void set_prefill (RecVec< class_index_t > const &table)
 Specify a partial coset table for the Todd-Coxeter algorithm. More...
 
void set_relations (std::vector< relation_t > const &relations)
 Define the relations defining the semigroup over which this is defined. More...
 
void set_report (bool val) const
 Turn reporting on or off. More...
 
void set_report_interval (size_t val)
 Sets how often the core methods of Congruence report. More...
 
bool test_equals (word_t const &w1, word_t const &w2)
 Returns true if the words w1 and w2 belong to the same congruence class. More...
 
bool test_less_than (word_t const &w1, word_t const &w2)
 Returns true if the congruence class of w1 is less than that of w2. More...
 
class_index_t word_to_class_index (word_t const &word)
 Returns the index of the congruence class corresponding to word. More...
 
-

Detailed Description

-

Class for congruence on a semigroup or fintely presented semigroup.

-

This class represents a congruence on a semigroup defined either as an instance of a Semigroup object or as a finitely presented semigroup defined by generators and relations.

-

The structure of a Congruence is determined by running several different methods concurrently until one method returns an answer. The number of different threads used can be controlled, in part, by the value passed to Congruence::set_max_threads. The use of multiple threads to find the structure of a Congruence can cause the return values of certain methods to differ for different instances of mathematically equal objects.

-

This class and its implemented methods are somewhat rudimentary in the current version of libsemigroups.

-

Member Typedef Documentation

- -

◆ class_index_t

- -
-
- - - - -
typedef size_t libsemigroups::Congruence::class_index_t
-
- -

Type for indices of congruence classes in a Congruence object.

- -
-
-

Constructor & Destructor Documentation

- -

◆ Congruence() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
libsemigroups::Congruence::Congruence (std::string type,
size_t nrgens,
std::vector< relation_t > const & relations,
std::vector< relation_t > const & extra 
)
-
- -

Constructor for congruences over a finitely presented semigroup.

-

The parameters are as follows:

-
    -
  • type: a std::string describing the type of congruence, must be one of "left", "right", or "twosided".
  • -
  • nrgens: the number of generators.
  • -
  • relations: the defining relations of the semigroup over which the congruence being constructed is defined. Every relation_t in this parameter must consist of positive integers less than nrgens.
  • -
  • extra: additional relations corresponding to the generating pairs of the congruence being constructed. Every relation_t in this parameter must consist of positive integers less than nrgens.
  • -
-

This constructor returns an instance of a Congruence object whose type is described by the string type. The congruence is defined over the semigroup defined by nrgens generators and the relations relations and is the least congruence containing the generating pairs in extra.

-

For example, to compute a congruence over the free semigroup the parameter relations should be empty, and the relations defining the congruence to be constructed should be passed as the parameter extra. To compute a congruence over a finitely presented semigroup the relations defining the fintely presented semigroup must be passed as the parameter relations and the relations defining the congruence to be constructed should be passed as the parameter extra.

- -
-
- -

◆ Congruence() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
libsemigroups::Congruence::Congruence (std::string type,
Semigroupsemigroup,
std::vector< relation_t > const & genpairs 
)
-
- -

Constructor for congruences over a Semigroup object.

-

The parameters are as follows:

-
    -
  • type: a std::string describing the type of congruence, must be one of "left", "right", or "twosided".
  • -
  • semigroup: a pointer to an instance of Semigroup. It is the responsibility of the caller to delete semigroup.
  • -
  • genpairs: additional relations corresponding to the generating pairs of the congruence being constructed. Every relation_t in this parameter must consist of positive integers less than the number of generators of semigroup (Semigroup::nrgens()).
  • -
-

This constructor returns an instance of a Congruence object whose type is described by the string type. The congruence is defined over the Semigroup semigroup and is the least congruence containing the generating pairs in extra.

- -
-
- -

◆ ~Congruence()

- -
-
- - - - - -
- - - - - - - -
libsemigroups::Congruence::~Congruence ()
-
-inline
-
- -

A default destructor.

-

The caller is responsible for deleting the semigroup used to construct this, if any.

- -
-
-

Member Function Documentation

- -

◆ extra()

- -
-
- - - - - -
- - - - - - - -
std::vector<relation_t> const& libsemigroups::Congruence::extra () const
-
-inline
-
- -

Returns the vector of extra relations (or equivalently, generating pairs) used to define the congruence.

- -
-
- -

◆ force_kbfp()

- -
-
- - - - - - - -
void libsemigroups::Congruence::force_kbfp ()
-
- -

Use the Knuth-Bendix algorithm on a rewriting system RWS with rules obtained from Congruence::relations and Congruence::extra, followed by the Froidure-Pin algorithm on the resulting semigroup.

-

This method forces the use of the Knuth-Bendix algorithm to compute the congruence defined by the generators, Congruence::relations, and Congruence::extra of this followed by the Froidure-Pin algorithm on the resulting semigroup. The resulting semigroup consists of RWSE's and is enumerated using Semigroup::enumerate.

-

At present the Knuth-Bendix algorithm can only be applied to two-sided congruences, and this method asserts that this is a two-sided congruence.

-
Warning
Any existing data for the congruence is deleted by this method, and may have to be recomputed. The return values and runtimes of other methods applied to this may also be affected.
-
-The Knuth-Bendix Algorithm may never terminate when applied to a finitely presented semigroup.
- -
-
- -

◆ force_kbp()

- -
-
- - - - - - - -
void libsemigroups::Congruence::force_kbp ()
-
- -

Use the Knuth-Bendix algorithm on a rewriting system RWS with rules obtained from Congruence::relations followed by an elementary orbit on pairs method on the resulting semigroup.

-

This method forces the use of the Knuth-Bendix algorithm to compute the congruence defined by the generators and relations of this followed by an elementary orbit algorithm which enumerates pairs of Element objects of that semigroup which are related in this. Knuth-Bendix is applied to a rewriting system obtained from Congruence::relations.

-

This method only applies to a congruence over a finitely presented semigroups, and does not apply to a congruence defined using a concrete Semigroup object.

-

Note that this algorithm can be applied to left, right, and two-sided congruences (unlike KBFP).

-
Warning
Any existing data for the congruence is deleted by this method, and may have to be recomputed. The return values and runtimes of other methods applied to this may also be affected.
-
-The Knuth-Bendix Algorithm may never terminate when applied to a finitely presented semigroup. Even if Knuth-Bendix completes the other algorithm that this method forces a Congruence to use will only terminate if there are finitely many pairs of elements related by this. The worst case space complexity of these algorithms is the square of the size of the semigroup over which this is defined.
- -
-
- -

◆ force_p()

- -
-
- - - - - - - -
void libsemigroups::Congruence::force_p ()
-
- -

Use an elementary orbit algorithm which enumerates pairs of Element objects that are related in this.

-

The method forced by this is unlikely to terminate, or to be faster than the other methods, unless there are a relatively few pairs of elements related by the congruence.

-

This method only applies to a congruence created using a Semigroup object, and does not apply to finitely presented semigroups.

-
Warning
Any existing data for the congruence is deleted by this method, and may have to be recomputed. The return values and runtimes of other methods applied to this may also be affected.
-
-The worst case space complexity of these algorithms is the square of the size of the semigroup over which this is defined.
- -
-
- -

◆ force_tc()

- -
-
- - - - - - - -
void libsemigroups::Congruence::force_tc ()
-
- -

Use the Todd-Coxeter algorithm.

-

This methods forces the use of the Todd-Coxeter algorithm to compute the congruence. The implementation is based on one by Goetz Pfeiffer in GAP.

-
Warning
Any existing data for the congruence is deleted by this method, and may have to be recomputed. The return values and runtimes of other methods applied to this may also be affected.
-
-The Todd-Coxeter Algorithm may never terminate when applied to a finitely presented semigroup.
- -
-
- -

◆ force_tc_prefill()

- -
-
- - - - - - - -
void libsemigroups::Congruence::force_tc_prefill ()
-
- -

Use the Todd-Coxeter algorithm after prefilling the table.

-

This methods forces the use of the Todd-Coxeter algorithm to compute the congruence.

-

When applied to a congruence defined over a Semigroup, this method differs from Congruence::force_tc in that the so-called coset table used in the Todd-Coxeter algorithm is initialised to contain the right (or left) Cayley graph of the semigroup over which this is defined.

-

If this is not defined over a Semigroup (i.e. it is defined over a finitely presented semigroup), then this method does the same as force_tc.

-
Warning
Any existing data for the congruence is deleted by this method, and may have to be recomputed. The return values and runtimes of other methods applied to this may also be affected.
-
-The Todd-Coxeter Algorithm may never terminate when applied to a finitely presented semigroup.
- -
-
- -

◆ is_done()

- -
-
- - - - - -
- - - - - - - -
bool libsemigroups::Congruence::is_done () const
-
-inline
-
- -

Returns true if the structure of the congruence is known.

- -
-
- -

◆ is_obviously_infinite()

- -
-
- - - - - - - -
bool libsemigroups::Congruence::is_obviously_infinite ()
-
- -

This method tries to quickly determine whether or not the Congruence has infinitely many classes.

-

If true is returned, then there are infinitely many classes in the congruence, but if false is returned, then the method could not determine whether or not there are infinitely many classes.

- -
-
- -

◆ nontrivial_classes()

- -
-
- - - - - - - -
Partition< word_t > * libsemigroups::Congruence::nontrivial_classes ()
-
- -

Returns the non-trivial classes of the congruence.

-

The elements in these classes are represented as words in the generators of the semigroup over which the congruence is defined.

-
Warning
If this has infinitely many non-trivial congruence classes, then this method will only terminate when it can no longer allocate memory.
- -
-
- -

◆ nr_classes()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Congruence::nr_classes ()
-
-inline
-
- -

Returns the number of congruences classes of this.

-

This method is non-const because it may fully compute a data structure for the congruence.

-
Warning
The problem of determining the number of classes of a congruence over a finitely presented semigroup is undecidable in general, and this method may never terminate.
- -
-
- -

◆ relations()

- -
-
- - - - - -
- - - - - - - -
std::vector<relation_t> const& libsemigroups::Congruence::relations ()
-
-inline
-
- -

Returns the vector of relations used to define the semigroup over which the congruence is defined.

-

This method is non-const since if the congruence is defined over a Semigroup object, then we may have to compute and store its relations.

- -
-
- -

◆ set_max_threads()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Congruence::set_max_threads (size_t nr_threads)
-
-inline
-
- -

Set the maximum number of threads for a Congruence over a Semigroup.

-

This method sets the maximum number of threads to be used by any method of a Congruence object which is defined over a Semigroup. The number of threads is limited to the maximum of 1 and the minimum of nr_threads and the number of threads supported by the hardware.

-

If the congruence is not defined over a Semigroup, then the number of threads is not limited by this method.

- -
-
- -

◆ set_pack()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Congruence::set_pack (size_t val)
-
-inline
-
- -

Set the maximum number of active cosets in Todd-Coxeter before entering packing phase.

-

This method only has any effect if used after Congruence::force_tc.

- -
-
- -

◆ set_prefill()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Congruence::set_prefill (RecVec< class_index_t > const & table)
-
-inline
-
- -

Specify a partial coset table for the Todd-Coxeter algorithm.

-

The parameter table should be a partial coset table for use in the Todd-Coxeter algorithm:

-
    -
  • table should have RecVec::nr_cols equal to the number of generators of the semigroup over which this is defined
  • -
  • every entry in table must be less than the number of rows in table.
  • -
-

For example, table can represent the right Cayley graph of a finite semigroup.

-

If this method is called after anything has been computed about the congruence, it has no effect.

- -
-
- -

◆ set_relations()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Congruence::set_relations (std::vector< relation_t > const & relations)
-
-inline
-
- -

Define the relations defining the semigroup over which this is defined.

-

This method allows the relations of the semigroup over which the congruence is defined to be specified. This method asserts that the relations have not previously been specified.

- -
-
- -

◆ set_report()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Congruence::set_report (bool val) const
-
-inline
-
- -

Turn reporting on or off.

-

If val is true, then some methods for a Congruence object may report information about the progress of the computation.

- -
-
- -

◆ set_report_interval()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Congruence::set_report_interval (size_t val)
-
-inline
-
- -

Sets how often the core methods of Congruence report.

-

The smaller this value, the more often information will be reported.

- -
-
- -

◆ test_equals()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::Congruence::test_equals (word_t const & w1,
word_t const & w2 
)
-
-inline
-
- -

Returns true if the words w1 and w2 belong to the same congruence class.

-

The parameters w1 and w2 must be libsemigroups::word_t's consisting of indices of generators of the semigroup over which this is defined.

-
Warning
The problem of determining the return value of this method is undecidable in general, and this method may never terminate.
- -
-
- -

◆ test_less_than()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::Congruence::test_less_than (word_t const & w1,
word_t const & w2 
)
-
-inline
-
- -

Returns true if the congruence class of w1 is less than that of w2.

-

This method returns true if the congruence class of w1 is less than the class of w2 in a total ordering of congruence classes.

-

The parameters w1 and w2 should be libsemigroups::word_t's consisting of indices of the generators of the semigroup over which this is defined.

-
Warning
The method for finding the structure of a congruence is non-deterministic, and the total order of congruences classes may vary between different instances of the same congruence.
-
-The problem of determining the return value of this method is undecidable in general, and this method may never terminate.
- -
-
- -

◆ word_to_class_index()

- -
-
- - - - - -
- - - - - - - - -
class_index_t libsemigroups::Congruence::word_to_class_index (word_t const & word)
-
-inline
-
- -

Returns the index of the congruence class corresponding to word.

-

The parameter word must be a libsemigroups::word_t consisting of indices of the generators of the semigroup over which this is defined.

-

If this is defined over a semigroup with generators \(A\), then Congruence::word_to_class_index defines a surjective function from the set of all words over \(A\) to either \(\{0, 1, \ldots, n - 1\}\), where \(n\) is the number of classes, or to the non-negative integers \(\{0, 1, \ldots\}\) if this has infinitely many classes.

-
Warning
The method for finding the structure of a congruence is non-deterministic, and the return value of this method may vary between different instances of the same congruence.
- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_element-members.html b/classlibsemigroups_1_1_element-members.html deleted file mode 100644 index 2e82414f6..000000000 --- a/classlibsemigroups_1_1_element-members.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Element Member List
-
-
- -

This is the complete list of members for libsemigroups::Element, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - -
cache_hash_value() const =0libsemigroups::Elementprotectedpure virtual
complexity() const =0libsemigroups::Elementpure virtual
copy(Element const *x)=0libsemigroups::Elementpure virtual
degree() const =0libsemigroups::Elementpure virtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
elm_t enum namelibsemigroups::Element
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const =0libsemigroups::Elementpure virtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(const Element &that) const =0libsemigroups::Elementpure virtual
operator==(const Element &that) const =0libsemigroups::Elementpure virtual
really_copy(size_t increase_deg_by=0) const =0libsemigroups::Elementpure virtual
really_delete()=0libsemigroups::Elementpure virtual
redefine(Element const *x, Element const *y)libsemigroups::Elementinlinevirtual
redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x)=0libsemigroups::Elementpure virtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_element.html b/classlibsemigroups_1_1_element.html deleted file mode 100644 index 36e524f83..000000000 --- a/classlibsemigroups_1_1_element.html +++ /dev/null @@ -1,819 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Element Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Classes | -Public Types | -Public Member Functions | -Protected Member Functions | -Static Protected Attributes | -List of all members
-
-
libsemigroups::Element Class Referenceabstract
-
-
- -

Abstract base class for semigroup elements. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::Element:
-
-
Inheritance graph
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -

-Classes

struct  Equal
 Provides a call operator for comparing Elements via pointers. More...
 
struct  Hash
 Provides a call operator returning a hash value for an Element via a pointer. More...
 
- - - - -

-Public Types

enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
virtual size_t complexity () const =0
 Returns the approximate time complexity of multiplying two Element objects in a given subclass. More...
 
virtual void copy (Element const *x)=0
 Copy another Element into this. More...
 
virtual size_t degree () const =0
 Returns the degree of an Element. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual Elementidentity () const =0
 Returns a new copy of the identity element. More...
 
virtual bool operator< (const Element &that) const =0
 Returns true if this is less than that. More...
 
virtual bool operator== (const Element &that) const =0
 Returns true if this equals that. More...
 
virtual Elementreally_copy (size_t increase_deg_by=0) const =0
 Returns a new element completely independent of this. More...
 
virtual void really_delete ()=0
 Deletes the defining data of an Element. More...
 
virtual void redefine (Element const *x, Element const *y)
 Multiplies x and y and stores the result in this. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
virtual void swap (Element *x)=0
 Swap another Element with this. More...
 
- - - - - - - -

-Protected Member Functions

virtual void cache_hash_value () const =0
 Calculate and cache a hash value. More...
 
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- - - - -

-Static Protected Attributes

static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

Abstract base class for semigroup elements.

-

The Semigroup class consists of Element objects. Every derived class of Element implements the deleted methods of Element, which are used by the Semigroup class.

-

Member Enumeration Documentation

- -

◆ elm_t

- -
-
- -

This enum contains some different types of Element.

-

This exists so that the type of a subclass of Element can be determined from a pointer to the base class. Currently, it is only necessary to distiguish RWSE objects from other Element objects and so there are only two values.

- - - -
Enumerator
RWSE 

Type for Element objects arising from a rewriting system RWS.

-
NOT_RWSE 

Type for Element objects not arising from a rewriting system RWS.

-
- -
-
-

Constructor & Destructor Documentation

- -

◆ Element()

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Element::Element (elm_t type = Element::elm_t::NOT_RWSE)
-
-inlineexplicit
-
- -

A constructor.

-

The parameter type should be the type elm_t of the element being created (defaults to libsemigroups::Element::NOT_RWSE).

- -
-
- -

◆ ~Element()

- -
-
- - - - - -
- - - - - - - -
virtual libsemigroups::Element::~Element ()
-
-inlinevirtual
-
- -

A default destructor.

-

This does not properly delete the underlying data of the object, this should be done using Element::really_delete.

- -
-
-

Member Function Documentation

- -

◆ cache_hash_value()

- -
-
- - - - - -
- - - - - - - -
virtual void libsemigroups::Element::cache_hash_value () const
-
-protectedpure virtual
-
-
- -

◆ complexity()

- -
-
- - - - - -
- - - - - - - -
virtual size_t libsemigroups::Element::complexity () const
-
-pure virtual
-
- -

Returns the approximate time complexity of multiplying two Element objects in a given subclass.

-

This method returns an integer which represents the approximate time complexity of multiplying two objects in the same subclass of Element which have the same Element::degree. For example, the approximate time complexity of multiplying two \(3\times 3\) matrices over a common semiring is \(O(3 ^ 3)\), and 27 is returned by MatrixOverSemiring::complexity.

-

The returned value is used in, for example, Semigroup::fast_product and Semigroup::nridempotents to decide if it is better to multiply elements or follow a path in the Cayley graph.

- -

Implemented in libsemigroups::PBR, libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >, libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >, libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >, libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >, libsemigroups::Bipartition, libsemigroups::PartialTransformation< TValueType, TSubclass >, libsemigroups::PartialTransformation< T, Transformation< T > >, libsemigroups::PartialTransformation< T, PartialPerm< T > >, and libsemigroups::RWSE.

- -
-
- -

◆ copy()

- -
-
- - - - - -
- - - - - - - - -
virtual void libsemigroups::Element::copy (Element const * x)
-
-pure virtual
-
-
- -

◆ degree()

- -
-
- - - - - -
- - - - - - - -
virtual size_t libsemigroups::Element::degree () const
-
-pure virtual
-
- -

Returns the degree of an Element.

-

This method returns an integer which represents the size of the element, and is used to determine whether or not two elements are compatible for multiplication. For example, two Transformation objects of different degrees cannot be multiplied, and a Bipartition of degree 10 cannot be an element of a monoid of bipartitions of degree 3.

-

See the relevant subclass for the particular meaning of the return value of this method for each subclass.

- -

Implemented in libsemigroups::PBR, libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >, libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >, libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >, libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >, libsemigroups::Bipartition, libsemigroups::PartialTransformation< TValueType, TSubclass >, libsemigroups::PartialTransformation< T, Transformation< T > >, libsemigroups::PartialTransformation< T, PartialPerm< T > >, and libsemigroups::RWSE.

- -
-
- -

◆ get_type()

- -
-
- - - - - -
- - - - - - - -
elm_t libsemigroups::Element::get_type () const
-
-inline
-
- -

Returns the type libsemigroups::Element::elm_t of an Element object.

- -
-
- -

◆ hash_value()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Element::hash_value () const
-
-inline
-
- -

Return the hash value of an Element.

-

This method returns a hash value for an object in a subclass of Element. This value is only computed the first time this method is called.

- -
-
- -

◆ identity()

- -
-
- - - - - -
- - - - - - - -
virtual Element* libsemigroups::Element::identity () const
-
-pure virtual
-
-
- -

◆ operator<()

- -
-
- - - - - -
- - - - - - - - -
virtual bool libsemigroups::Element::operator< (const Elementthat) const
-
-pure virtual
-
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
virtual bool libsemigroups::Element::operator== (const Elementthat) const
-
-pure virtual
-
-
- -

◆ really_copy()

- -
-
- - - - - -
- - - - - - - - -
virtual Element* libsemigroups::Element::really_copy (size_t increase_deg_by = 0) const
-
-pure virtual
-
- -

Returns a new element completely independent of this.

-

If increase_deg_by is non-zero, then the degree (the size of the container) of the defining data of this will be increased by this amount.

-

This method really copies an Element. To minimise the amount of copying when Element objects are inserted in a std::unordered_map and other containers, an Element behaves somewhat like a pointer, in that the actual data in an Element is only copied when this method is called. Otherwise, if an Element is copied, then its defining data is only stored once.

-
See also
Element::really_delete.
- -

Implemented in libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >, libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >, libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >, libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >, libsemigroups::PartialPerm< T >, libsemigroups::Transformation< T >, libsemigroups::ElementWithVectorData< TValueType, TSubclass >, libsemigroups::ElementWithVectorData< bool, BooleanMat >, libsemigroups::ElementWithVectorData< T, Transformation< T > >, libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >, libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >, libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >, libsemigroups::ElementWithVectorData< T, PartialPerm< T > >, libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >, and libsemigroups::RWSE.

- -
-
- -

◆ really_delete()

- -
-
- - - - - -
- - - - - - - -
virtual void libsemigroups::Element::really_delete ()
-
-pure virtual
-
- -

Deletes the defining data of an Element.

-

This method really deletes an Element. To minimise the amount of copying when Elements are inserted in an std::unordered_map or other containers, an Element behaves somewhat like a pointer, in that the actual data in an Element is only deleted when this method is called. Otherwise, if an Element is deleted, then its defining data is not deleted, since it may be contained in several copies of the Element.

-
See also
Element::really_copy.
- -

Implemented in libsemigroups::ElementWithVectorData< TValueType, TSubclass >, libsemigroups::ElementWithVectorData< bool, BooleanMat >, libsemigroups::ElementWithVectorData< T, Transformation< T > >, libsemigroups::ElementWithVectorData< u_int32_t, Bipartition >, libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >, libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >, libsemigroups::ElementWithVectorData< T, PartialPerm< T > >, libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >, and libsemigroups::RWSE.

- -
-
- -

◆ redefine() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
virtual void libsemigroups::Element::redefine (Element const * x,
Element const * y 
)
-
-inlinevirtual
-
- -

Multiplies x and y and stores the result in this.

-

Redefine this to be the product of x and y. This is in-place multiplication to avoid allocation of memory for products which do not need to be stored for future use.

-

The implementation of this method in the Element base class simply calls the 3 parameter version with third parameter 0. Any subclass of Element can implement either a two or three parameter version of this method and the base class method implements the other method.

- -

Reimplemented in libsemigroups::BooleanMat, libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >, libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >, libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >, libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >, libsemigroups::PartialPerm< T >, libsemigroups::Transformation< T >, and libsemigroups::RWSE.

- -
-
- -

◆ redefine() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
virtual void libsemigroups::Element::redefine (Element const * x,
Element const * y,
size_t const & thread_id 
)
-
-inlinevirtual
-
- -

Multiplies x and y and stores the result in this.

-

Redefine this to be the product of x and y. This is in-place multiplication to avoid allocation of memory for products which do not need to be stored for future use.

-

The implementation of this method in the Element base class simply calls the 2 parameter version and ignores the third parameter thread_id. Any subclass of Element can implement either a two or three parameter version of this method and the base class method implements the other method.

-

The parameter thread_id is required in some derived classes of Element because some temporary storage is required to find the product of x and y.

-

Note that if different threads call this method on a derived class of Element where static temporary storage is used in the redefine method with the same value of thread_id, then bad things may happen.

- -

Reimplemented in libsemigroups::PBR, and libsemigroups::Bipartition.

- -
-
- -

◆ reset_hash_value()

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::Element::reset_hash_value () const
-
-inlineprotected
-
- -

Reset the cached value used by Element::hash_value.

-

This method is used to reset the cached hash value to libsemigroups::Element::UNDEFINED. This is required after running Element::redefine, Element::copy, or any other method that changes the defining data of this.

- -
-
- -

◆ swap()

- -
-
- - - - - -
- - - - - - - - -
virtual void libsemigroups::Element::swap (Elementx)
-
-pure virtual
-
-
-

Member Data Documentation

- -

◆ UNDEFINED

- -
-
- - - - - -
- - - - -
size_t const libsemigroups::Element::UNDEFINED = std::numeric_limits<size_t>::max()
-
-staticprotected
-
- -

UNDEFINED value.

-

This variable is used to indicate that a value is undefined. For example, the cached hash value of an Element is initially set to this value.

- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_element.png b/classlibsemigroups_1_1_element.png deleted file mode 100644 index 251a7c10d..000000000 Binary files a/classlibsemigroups_1_1_element.png and /dev/null differ diff --git a/classlibsemigroups_1_1_element__inherit__graph.map b/classlibsemigroups_1_1_element__inherit__graph.map deleted file mode 100644 index d1b99ed69..000000000 --- a/classlibsemigroups_1_1_element__inherit__graph.map +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/classlibsemigroups_1_1_element__inherit__graph.md5 b/classlibsemigroups_1_1_element__inherit__graph.md5 deleted file mode 100644 index 71ffb6dde..000000000 --- a/classlibsemigroups_1_1_element__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -f7c0ac385e1beaff28e9dc8faa7b2aba \ No newline at end of file diff --git a/classlibsemigroups_1_1_element__inherit__graph.png b/classlibsemigroups_1_1_element__inherit__graph.png deleted file mode 100644 index 358f32dc3..000000000 Binary files a/classlibsemigroups_1_1_element__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_element_with_vector_data-members.html b/classlibsemigroups_1_1_element_with_vector_data-members.html deleted file mode 100644 index ff68e5aaa..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::ElementWithVectorData< TValueType, TSubclass > Member List
-
-
- -

This is the complete list of members for libsemigroups::ElementWithVectorData< TValueType, TSubclass >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< TValueType, TSubclass >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
begin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cache_hash_value() const =0libsemigroups::Elementprotectedpure virtual
cbegin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cend() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
complexity() const =0libsemigroups::Elementpure virtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
degree() const =0libsemigroups::Elementpure virtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
ElementWithVectorData(std::vector< TValueType > *vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
ElementWithVectorData(std::vector< TValueType > const &vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const =0libsemigroups::Elementpure virtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
redefine(Element const *x, Element const *y)libsemigroups::Elementinlinevirtual
redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data.html b/classlibsemigroups_1_1_element_with_vector_data.html deleted file mode 100644 index fc76663cf..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data.html +++ /dev/null @@ -1,774 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::ElementWithVectorData< TValueType, TSubclass > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Static Protected Member Functions | -Protected Attributes | -List of all members
-
-
libsemigroups::ElementWithVectorData< TValueType, TSubclass > Class Template Reference
-
-
- -

Abstract base class for elements using a vector to store their defining data. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::ElementWithVectorData< TValueType, TSubclass >:
-
-
Inheritance graph
- - - - - - - -
-
-Collaboration diagram for libsemigroups::ElementWithVectorData< TValueType, TSubclass >:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > const &vector)
 A constructor. More...
 
TValueType at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< TValueType >::iterator begin () const
 Returns an iterator. More...
 
std::vector< TValueType >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< TValueType >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< TValueType >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
TValueType operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
virtual size_t complexity () const =0
 Returns the approximate time complexity of multiplying two Element objects in a given subclass. More...
 
virtual size_t degree () const =0
 Returns the degree of an Element. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual Elementidentity () const =0
 Returns a new copy of the identity element. More...
 
virtual void redefine (Element const *x, Element const *y)
 Multiplies x and y and stores the result in this. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - - - -

-Static Protected Member Functions

template<typename T >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- - - - -

-Protected Attributes

std::vector< TValueType > * _vector
 The vector containing the defining data of this. More...
 
- - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Protected Member Functions inherited from libsemigroups::Element
virtual void cache_hash_value () const =0
 Calculate and cache a hash value. More...
 
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename TValueType, class TSubclass>
-class libsemigroups::ElementWithVectorData< TValueType, TSubclass >

- -

Abstract base class for elements using a vector to store their defining data.

-

The template parameter TValueType is the type entries in the vector containing the defining data.

-

The template parameter TSubclass is the subclass of ElementWithVectorData used by certain methods to construct new instances of subclasses of ElementWithVectorData.

-

For example, Transformation<u_int128_t> is a subclass of ElementWithVectorData<u_int128_t, Transformation<u_int128_t>> so that when the identity method in this class is called it returns a Transformation and not an ElementWithVectorData.

-

Constructor & Destructor Documentation

- -

◆ ElementWithVectorData() [1/3]

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
libsemigroups::ElementWithVectorData< TValueType, TSubclass >::ElementWithVectorData ()
-
-inline
-
- -

A constructor.

-

Returns an object with an uninitialised vector.

- -
-
- -

◆ ElementWithVectorData() [2/3]

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
libsemigroups::ElementWithVectorData< TValueType, TSubclass >::ElementWithVectorData (std::vector< TValueType > * vector)
-
-inlineexplicit
-
- -

A constructor.

-

The parameter vector should be a pointer to defining data of the element.

-

Returns an object whose defining data is stored in vector, which is not copied, and is deleted using Element::really_delete.

- -
-
- -

◆ ElementWithVectorData() [3/3]

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
libsemigroups::ElementWithVectorData< TValueType, TSubclass >::ElementWithVectorData (std::vector< TValueType > const & vector)
-
-inlineexplicit
-
- -

A constructor.

-

The parameter vector should be a const reference to defining data of the element.

-

Returns an object whose defining data is a copy of vector.

- -
-
-

Member Function Documentation

- -

◆ at()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
TValueType libsemigroups::ElementWithVectorData< TValueType, TSubclass >::at (size_t pos) const
-
-inline
-
- -

Returns the pos entry in the vector containing the defining data.

-

This method returns the pos entry in the vector used to construct this.

- -
-
- -

◆ begin()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
std::vector<TValueType>::iterator libsemigroups::ElementWithVectorData< TValueType, TSubclass >::begin () const
-
-inline
-
- -

Returns an iterator.

-

This method returns an iterator pointing at the first entry in the vector that is the underlying defining data of this.

- -
-
- -

◆ cbegin()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
std::vector<TValueType>::iterator libsemigroups::ElementWithVectorData< TValueType, TSubclass >::cbegin () const
-
-inline
-
- -

Returns a const iterator.

-

This method returns a const_iterator pointing at the first entry in the vector that is the underlying defining data of this.

- -
-
- -

◆ cend()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
std::vector<TValueType>::iterator libsemigroups::ElementWithVectorData< TValueType, TSubclass >::cend () const
-
-inline
-
- -

Returns a const iterator.

-

This method returns a const iterator referring to the past-the-end element of the vector that is the underlying defining data of this.

- -
-
- -

◆ copy()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
void libsemigroups::ElementWithVectorData< TValueType, TSubclass >::copy (Element const * x)
-
-inlineoverridevirtual
-
- -

Copy another Element into this.

-

This method copies x into this by changing this in-place. This method asserts that the degrees of this and x are equal and then replaces the underlying vector of this with the underlying vector of x. Any method overriding this one must define _hash_value correctly or call Element::reset_hash_value on this.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ end()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
std::vector<TValueType>::iterator libsemigroups::ElementWithVectorData< TValueType, TSubclass >::end () const
-
-inline
-
- -

Returns an iterator.

-

This method returns an iterator referring to the past-the-end element of the vector that is the underlying defining data of this.

- -
-
- -

◆ operator<()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
bool libsemigroups::ElementWithVectorData< TValueType, TSubclass >::operator< (Element const & that) const
-
-inlineoverridevirtual
-
- -

Returns true if this is less than that.

-

This method defines a total order on the set of objects in ElementWithVectorData of a given Element::degree, which is the short-lex order.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ operator==()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
bool libsemigroups::ElementWithVectorData< TValueType, TSubclass >::operator== (Element const & that) const
-
-inlineoverridevirtual
-
- -

Returns true if this equals that.

-

This method checks that the underlying vectors of this and that are equal.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ operator[]()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
TValueType libsemigroups::ElementWithVectorData< TValueType, TSubclass >::operator[] (size_t pos) const
-
-inline
-
- -

Returns the pos entry in the vector containing the defining data.

-

This method returns the pos entry in the vector used to construct this. No checks are performed that pos in within the bounds of this vector.

- -
-
- -

◆ really_copy()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
Element* libsemigroups::ElementWithVectorData< TValueType, TSubclass >::really_copy (size_t increase_deg_by = 0) const
-
-inlineoverridevirtual
-
- -

Returns a pointer to a copy of this.

-

The size of the vector containing the defining data of this will be increased by increase_deg_by. If increase_deg_by is not 0, then this method must be overridden by any subclass of ElementWithVectorData since there is no way of knowing how a subclass is defined by the data in the vector.

- -

Implements libsemigroups::Element.

- -

Reimplemented in libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >, libsemigroups::MatrixOverSemiringBase< bool, BooleanMat >, libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >, and libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >.

- -
-
- -

◆ really_delete()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
void libsemigroups::ElementWithVectorData< TValueType, TSubclass >::really_delete ()
-
-inlineoverridevirtual
-
- -

Deletes the defining data of an ElementWithVectorData.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ swap()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
void libsemigroups::ElementWithVectorData< TValueType, TSubclass >::swap (Elementx)
-
-inlineoverridevirtual
-
- -

Swap another Element with this.

-

This method swaps the defining data of x and this. This method asserts that the degrees of this and x are equal and then swaps the underlying vector of this with the underlying vector of x. Any method overriding should swap the hash_value of this and x, or call Element::reset_hash_value on this and x.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ vector_hash()

- -
-
-
-template<typename TValueType, class TSubclass>
-
-template<typename T >
- - - - - -
- - - - - - - - -
static size_t libsemigroups::ElementWithVectorData< TValueType, TSubclass >::vector_hash (std::vector< T > const * vec)
-
-inlinestaticprotected
-
- -

Returns a hash value for a vector provided there is a specialization of std::hash for the template type T.

- -
-
-

Member Data Documentation

- -

◆ _vector

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - -
std::vector<TValueType>* libsemigroups::ElementWithVectorData< TValueType, TSubclass >::_vector
-
-protected
-
- -

The vector containing the defining data of this.

-

The actual data defining of this is stored in _vector.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data.png b/classlibsemigroups_1_1_element_with_vector_data.png deleted file mode 100644 index f7f3e80e6..000000000 Binary files a/classlibsemigroups_1_1_element_with_vector_data.png and /dev/null differ diff --git a/classlibsemigroups_1_1_element_with_vector_data__coll__graph.map b/classlibsemigroups_1_1_element_with_vector_data__coll__graph.map deleted file mode 100644 index bd877c3db..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data__coll__graph.md5 b/classlibsemigroups_1_1_element_with_vector_data__coll__graph.md5 deleted file mode 100644 index b2b9e683c..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -5a676f13e88cc94d5f1ad6e8c9a96c4c \ No newline at end of file diff --git a/classlibsemigroups_1_1_element_with_vector_data__coll__graph.png b/classlibsemigroups_1_1_element_with_vector_data__coll__graph.png deleted file mode 100644 index 19eed780b..000000000 Binary files a/classlibsemigroups_1_1_element_with_vector_data__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.map b/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.map deleted file mode 100644 index b4e4501b0..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.md5 b/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.md5 deleted file mode 100644 index 1e7728121..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -937b54920e594ef01fe94ee77a9aecc3 \ No newline at end of file diff --git a/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.png b/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.png deleted file mode 100644 index 775cffdc1..000000000 Binary files a/classlibsemigroups_1_1_element_with_vector_data__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash-members.html b/classlibsemigroups_1_1_element_with_vector_data_default_hash-members.html deleted file mode 100644 index 3d45e1178..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data_default_hash-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass > Member List
-
-
- -

This is the complete list of members for libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< TValueType, TSubclass >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
begin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cend() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
complexity() const =0libsemigroups::Elementpure virtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
degree() const =0libsemigroups::Elementpure virtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
ElementWithVectorData(std::vector< TValueType > *vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
ElementWithVectorData(std::vector< TValueType > const &vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const =0libsemigroups::Elementpure virtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
redefine(Element const *x, Element const *y)libsemigroups::Elementinlinevirtual
redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash.html b/classlibsemigroups_1_1_element_with_vector_data_default_hash.html deleted file mode 100644 index 2c5e0a722..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data_default_hash.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Protected Member Functions | -List of all members
-
-
libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass > Class Template Reference
-
-
- -

Abstract base class for elements using a vector to store their defining data and the default hash function for that underlying vector. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >:
-
-
Inheritance graph
- - - - - - - -
-
-Collaboration diagram for libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >:
-
-
Collaboration graph
- - - - - -
- - - - - - - - - -

-Protected Member Functions

void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > const &vector)
 A constructor. More...
 
TValueType at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< TValueType >::iterator begin () const
 Returns an iterator. More...
 
std::vector< TValueType >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< TValueType >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< TValueType >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
TValueType operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
virtual size_t complexity () const =0
 Returns the approximate time complexity of multiplying two Element objects in a given subclass. More...
 
virtual size_t degree () const =0
 Returns the degree of an Element. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual Elementidentity () const =0
 Returns a new copy of the identity element. More...
 
virtual void redefine (Element const *x, Element const *y)
 Multiplies x and y and stores the result in this. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
template<typename T >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
std::vector< TValueType > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename TValueType, class TSubclass>
-class libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >

- -

Abstract base class for elements using a vector to store their defining data and the default hash function for that underlying vector.

-

This class is almost the same as ElementWithVectorData, except that it also implements a method for cache_hash_value, which uses ElementWithVectorData::vector_hash.

-

Member Function Documentation

- -

◆ cache_hash_value()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
void libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >::cache_hash_value () const
-
-inlineoverrideprotectedvirtual
-
- -

This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class.

- -

Implements libsemigroups::Element.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash.png b/classlibsemigroups_1_1_element_with_vector_data_default_hash.png deleted file mode 100644 index e822f89d9..000000000 Binary files a/classlibsemigroups_1_1_element_with_vector_data_default_hash.png and /dev/null differ diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.map b/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.map deleted file mode 100644 index e658fdd6b..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.md5 b/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.md5 deleted file mode 100644 index 70fa9a4fb..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -06ddfa878af63930fc8d14abc552d088 \ No newline at end of file diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.png b/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.png deleted file mode 100644 index cb20be8ba..000000000 Binary files a/classlibsemigroups_1_1_element_with_vector_data_default_hash__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.map b/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.map deleted file mode 100644 index e59c64617..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.md5 b/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.md5 deleted file mode 100644 index 684d27c9b..000000000 --- a/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -95db1cb3640e891fcbdfa3f2fa295862 \ No newline at end of file diff --git a/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.png b/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.png deleted file mode 100644 index be6bbd75a..000000000 Binary files a/classlibsemigroups_1_1_element_with_vector_data_default_hash__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_froidure_pin-members.html b/classlibsemigroups_1_1_froidure_pin-members.html deleted file mode 100644 index 2ed8ee117..000000000 --- a/classlibsemigroups_1_1_froidure_pin-members.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits > Member List
-
-
- -

This is the complete list of members for libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_degree (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_duplicate_gens (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_elements (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_enumerate_order (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_final (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_first (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_found_one (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_gens (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_id (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_idempotents (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_idempotents_found (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_is_idempotent (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_left (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_length (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_lenindex (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_letter_to_pos (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_map (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_mtx (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >mutable
_nr (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_nr_rules (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_nrgens (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_pos (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_pos_one (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_prefix (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_reduced (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_relation_gen (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_relation_pos (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_right (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_settings (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_sorted (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_suffix (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
_tmp_product (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >mutable
_wordlen (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
add_generator(element_type const &)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
add_generators(TCollection const &) (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
add_generators(std::initializer_list< const_element_type >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
at(element_index_type)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
batch_size() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
begin() constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
cayley_graph_type typedef (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
cbegin() constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
cbegin_idempotents()libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
cbegin_sorted()libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
cend() constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
cend_idempotents()libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
cend_sorted()libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
closure(TCollection const &coll)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
closure(std::initializer_list< const_element_type >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
concurrency_threshold() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_element_type typedef (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_iterator typedeflibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_iterator_idempotents typedeflibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_iterator_sorted typedeflibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_pointer typedef (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_reference typedef (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_reverse_iterator typedeflibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_reverse_iterator_idempotents typedeflibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
const_reverse_iterator_sorted typedeflibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
contains(const_reference)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
copy_add_generators(TCollection const &) constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
copy_closure(TCollection const &)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
crbegin() constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
crbegin_sorted()libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
crend() constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
crend_sorted()libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
current_max_word_length() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
current_nr_rules() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
current_position(const_reference x) constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
current_size() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
degree() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
element_index_type typedef (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
element_type typedef (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
end() constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
enumerate(size_t=LIMIT_MAX) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
equal_to(word_type const &, word_type const &) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
factorisation(word_type &, element_index_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
factorisation(element_index_type pos) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
factorisation(const_reference)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
factorisation(KBE const &x)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
fast_product(element_index_type, element_index_type) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
final_letter(element_index_type pos) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
first_letter(element_index_type pos) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
FroidurePin(std::vector< element_type > const *)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >explicit
FroidurePin(std::vector< element_type > const &)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >explicit
FroidurePin(std::initializer_list< element_type >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >explicit
FroidurePin(FroidurePin const &)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
generator(letter_type) constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
is_idempotent(element_index_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
is_monoid() override (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
left(element_index_type, letter_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
length_const(element_index_type) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
length_non_const(element_index_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
letter_to_pos(letter_type) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
max_threads() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
minimal_factorisation(word_type &, element_index_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
minimal_factorisation(element_index_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
minimal_factorisation(const_reference)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
next_relation(word_type &relation) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
nr_generators() const noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
nr_idempotents() overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
nr_rules() overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
operator=(FroidurePin const &semigroup)=deletelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
operator[](element_index_type) constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
position(const_reference)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
position_to_sorted_position(element_index_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
prefix(element_index_type pos) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
product_by_reduction(element_index_type, element_index_type) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
reserve(size_t) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
reset_next_relation() noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
right(element_index_type, letter_type) overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
run() override (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
run(size_t) (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
set_batch_size(size_t) noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
set_concurrency_threshold(size_t) noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
set_max_threads(size_t) noexcept overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
size() overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
size_type typedef (defined in libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
sorted_at(element_index_type)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
sorted_position(const_reference)libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
suffix(element_index_type pos) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
word_to_element(word_type const &) constlibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
word_to_pos(word_type const &) const overridelibsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
~FroidurePin()libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
~FroidurePinBase() (defined in libsemigroups::FroidurePinBase)libsemigroups::FroidurePinBaseinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_froidure_pin.html b/classlibsemigroups_1_1_froidure_pin.html deleted file mode 100644 index fa1e2a181..000000000 --- a/classlibsemigroups_1_1_froidure_pin.html +++ /dev/null @@ -1,2703 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -Public Member Functions | -Public Attributes | -List of all members
-
-
libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits > Class Template Reference
-
-
- -

Class for semigroups generated by instances of Element. - More...

- -

#include <froidure-pin.hpp>

- -

Inherits TTraits, and libsemigroups::FroidurePinBase.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-using cayley_graph_type = internal::RecVec< element_index_type >
 
-using const_element_type = typename TTraits::const_element_type
 
using const_iterator = internal::iterator_base< internal_element_type, const_pointer, const_reference, element_type, iterator_methods >
 A type for const iterators through the elements of this, in the order they were enumerated (i.e. in short-lex order of the minimum word in the generators of this equal to any given element). More...
 
using const_iterator_idempotents = const_iterator_pair_first
 A type for const iterators through the idempotents of this, in short-lex order. More...
 
using const_iterator_sorted = const_iterator_pair_first
 A type for const iterators through the elements of this, sorted according to TTraits::less. More...
 
-using const_pointer = typename TTraits::const_pointer
 
-using const_reference = typename TTraits::const_reference
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 A type for const reverse iterators through the elements of this, in the reverse order of enumeration. More...
 
using const_reverse_iterator_idempotents = const_reverse_iterator_pair_first
 A type for reverse const iterators through the idempotents of this, in short-lex order. More...
 
using const_reverse_iterator_sorted = const_reverse_iterator_pair_first
 A type for const reverse iterators through the elements of this, sorted according to TTraits::less. More...
 
-using element_index_type = FroidurePinBase::element_index_type
 
-using element_type = typename TTraits::element_type
 
-using size_type = FroidurePinBase::size_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 FroidurePin (std::vector< element_type > const *)
 Construct from generators. More...
 
 FroidurePin (std::vector< element_type > const &)
 Construct from generators. More...
 
 FroidurePin (std::initializer_list< element_type >)
 Construct from generators. More...
 
 FroidurePin (FroidurePin const &)
 Copy constructor. More...
 
 ~FroidurePin ()
 A default destructor. More...
 
void add_generator (element_type const &)
 Add copies of the generators coll to the generators of this. More...
 
-template<class TCollection >
void add_generators (TCollection const &)
 
void add_generators (std::initializer_list< const_element_type >)
 Add copies of the generators coll to the generators of this. More...
 
const_reference at (element_index_type)
 Returns the element of the semigroup in position pos, or a nullptr if there is no such element. More...
 
size_t batch_size () const noexcept override
 Returns the current value of the batch size. This is the minimum number of elements enumerated in any call to FroidurePin::enumerate. More...
 
const_iterator begin () const
 Returns a const iterator pointing to the first element of the semigroup. More...
 
const_iterator cbegin () const
 Returns a const iterator pointing to the first element of the semigroup. More...
 
const_iterator_idempotents cbegin_idempotents ()
 Returns a const iterator pointing at the first idempotent in the semigroup. More...
 
const_iterator_sorted cbegin_sorted ()
 Returns a const iterator pointing to the first element of the semigroup when the elements are sorted by Element::operator<. More...
 
const_iterator cend () const
 Returns a const iterator pointing to one past the last currently known element of the semigroup. More...
 
const_iterator_idempotents cend_idempotents ()
 Returns a const iterator referring to past the end of the last idempotent in the semigroup. More...
 
const_iterator_sorted cend_sorted ()
 Returns a const iterator pointing to one past the last element of the semigroup when the elements are sorted by Element::operator<. More...
 
template<class TCollection >
void closure (TCollection const &coll)
 Add copies of the non-redundant generators in coll to the generators of this. More...
 
void closure (std::initializer_list< const_element_type >)
 Add copies of the non-redundant generators in coll to the generators of this. More...
 
size_t concurrency_threshold () const noexcept override
 Returns the current value of. More...
 
bool contains (const_reference)
 Returns true if x is an element of this and false if it is not. More...
 
template<class TCollection >
FroidurePincopy_add_generators (TCollection const &) const
 Returns a new semigroup generated by this and coll. More...
 
template<class TCollection >
FroidurePincopy_closure (TCollection const &)
 Returns a new semigroup generated by this and copies of the non-redundant elements of coll. More...
 
const_reverse_iterator crbegin () const
 Returns a const reverse iterator pointing to the last currently known element of the semigroup. More...
 
const_reverse_iterator_sorted crbegin_sorted ()
 Returns a const iterator pointing to the last element of the semigroup when the elements are sorted by Element::operator<. More...
 
const_reverse_iterator crend () const
 Returns a const reverse iterator pointing to one before the first element of the semigroup. More...
 
const_reverse_iterator_sorted crend_sorted ()
 Returns a const iterator pointing to one before the first element of the semigroup when the elements are sorted by Element::operator<. More...
 
size_t current_max_word_length () const noexcept override
 Returns the maximum length of a word in the generators so far computed. More...
 
size_t current_nr_rules () const noexcept override
 Returns the number of relations in the presentation for the semigroup that have been found so far. More...
 
element_index_type current_position (const_reference x) const
 Returns the position of the element x in the semigroup if it is already known to belong to the semigroup. More...
 
size_t current_size () const noexcept override
 Returns the number of elements in the semigroup that have been enumerated so far. More...
 
size_t degree () const noexcept override
 Returns the degree of any (and all) Element's in the semigroup. More...
 
const_iterator end () const
 Returns a const iterator pointing to one past the last currently known element of the semigroup. More...
 
void enumerate (size_t=LIMIT_MAX) override
 Enumerate the semigroup until limit elements are found or killed is true. More...
 
bool equal_to (word_type const &, word_type const &) const override
 Returns true if the parameters represent the same element of the semigroup and false otherwise. More...
 
template<>
word_type factorisation (KBE const &x)
 Returns a libsemigroups::word_type which evaluates to x. More...
 
void factorisation (word_type &, element_index_type) override
 Changes word in-place to contain a word in the generators equal to the pos element of the semigroup. More...
 
word_type factorisation (element_index_type pos) override
 Returns a libsemigroups::word_type which evaluates to the Element in position pos of this. More...
 
word_type factorisation (const_reference)
 Returns a libsemigroups::word_type which evaluates to x. More...
 
element_index_type fast_product (element_index_type, element_index_type) const override
 Returns the position in this of the product of this->at(i) and this->at(j). More...
 
letter_type final_letter (element_index_type pos) const override
 Returns the last letter of the element in position pos. More...
 
letter_type first_letter (element_index_type pos) const override
 Returns the first letter of the element in position pos. More...
 
const_reference generator (letter_type) const
 Returns a const reference to the generator with index pos. More...
 
bool is_idempotent (element_index_type) override
 Returns true if the element in position pos is an idempotent and false if it is not. More...
 
-bool is_monoid () override
 
element_index_type left (element_index_type, letter_type) override
 Returns the index of the product of the generator with index j and the element in position i. More...
 
size_t length_const (element_index_type) const override
 Returns the length of the element in position pos of the semigroup. More...
 
size_t length_non_const (element_index_type) override
 Returns the length of the element in position pos of the semigroup. More...
 
element_index_type letter_to_pos (letter_type) const override
 Returns the position in this of the generator with index i. More...
 
size_t max_threads () const noexcept override
 Returns the current value of. More...
 
void minimal_factorisation (word_type &, element_index_type) override
 Changes word in-place to contain a minimal word with respect to the short-lex ordering in the generators equal to the pos element of the semigroup. More...
 
word_type minimal_factorisation (element_index_type) override
 Returns a minimal libsemigroups::word_type which evaluates to the Element in position pos of this. More...
 
word_type minimal_factorisation (const_reference)
 Returns a minimal libsemigroups::word_type which evaluates to x. More...
 
void next_relation (word_type &relation) override
 This method changes relation in-place to contain the next relation of the presentation defining this. More...
 
size_t nr_generators () const noexcept override
 Returns the number of generators of the semigroup. More...
 
size_t nr_idempotents () override
 Returns the total number of idempotents in the semigroup. More...
 
size_t nr_rules () override
 Returns the total number of relations in the presentation defining the semigroup. More...
 
FroidurePinoperator= (FroidurePin const &semigroup)=delete
 Deleted. More...
 
const_reference operator[] (element_index_type) const
 Returns the element of the semigroup in position pos. More...
 
element_index_type position (const_reference)
 Returns the position of x in this, or FroidurePin::UNDEFINED if x is not an element of this. More...
 
element_index_type position_to_sorted_position (element_index_type) override
 Returns the position of this->at(pos) in the sorted array of elements of the semigroup, or FroidurePin::UNDEFINED if pos is greater than the size of the semigroup. More...
 
element_index_type prefix (element_index_type pos) const override
 Returns the position of the prefix of the element x in position pos (of the semigroup) of length one less than the length of x. More...
 
element_index_type product_by_reduction (element_index_type, element_index_type) const override
 Returns the position in this of the product of this->at(i) and this->at(j) by following a path in the Cayley graph. More...
 
void reserve (size_t) override
 Requests that the capacity (i.e. number of elements) of the semigroup be at least enough to contain n elements. More...
 
void reset_next_relation () noexcept override
 This method resets FroidurePin::next_relation so that when it is next called the resulting relation is the first one. More...
 
element_index_type right (element_index_type, letter_type) override
 Returns the index of the product of the element in position i with the generator with index j. More...
 
-void run () override
 
-void run (size_t)
 
void set_batch_size (size_t) noexcept override
 Set a new value for the batch size. More...
 
void set_concurrency_threshold (size_t) noexcept override
 Returns the current value of. More...
 
void set_max_threads (size_t) noexcept override
 Set the maximum number of threads that any method of an instance of FroidurePin can use. More...
 
size_t size () override
 Returns the size of the semigroup. More...
 
const_reference sorted_at (element_index_type)
 Returns the element of the semigroup in position pos of the sorted array of elements, or nullptr in pos is not valid (i.e. too big). More...
 
element_index_type sorted_position (const_reference)
 Returns the position of x in the sorted array of elements of the semigroup, or FroidurePin::UNDEFINED if x is not an element of this. More...
 
element_index_type suffix (element_index_type pos) const override
 Returns the position of the suffix of the element x in position pos (of the semigroup) of length one less than the length of x. More...
 
element_type word_to_element (word_type const &) const
 Returns a copy of the element of this represented by the word w. More...
 
element_index_type word_to_pos (word_type const &) const override
 Returns the position in the semigroup corresponding to the element represented by the word w. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Attributes

-size_t _degree
 
-std::vector< std::pair< letter_type, letter_type > > _duplicate_gens
 
-std::vector< internal_element_type > _elements
 
-std::vector< element_index_type > _enumerate_order
 
-std::vector< letter_type_final
 
-std::vector< letter_type_first
 
-bool _found_one
 
-std::vector< internal_element_type > _gens
 
-internal_element_type _id
 
-std::vector< internal_idempotent_pair > _idempotents
 
-bool _idempotents_found
 
-std::vector< bool > _is_idempotent
 
-cayley_graph_type _left
 
-std::vector< size_type > _length
 
-std::vector< enumerate_index_type > _lenindex
 
-std::vector< element_index_type > _letter_to_pos
 
-std::unordered_map< internal_const_element_type, element_index_type, internal_hash, internal_equal_to > _map
 
-std::mutex _mtx
 
-size_type _nr
 
-size_t _nr_rules
 
-letter_type _nrgens
 
-enumerate_index_type _pos
 
-element_index_type _pos_one
 
-std::vector< element_index_type > _prefix
 
-internal::RecVec< bool > _reduced
 
-letter_type _relation_gen
 
-enumerate_index_type _relation_pos
 
-cayley_graph_type _right
 
-struct libsemigroups::FroidurePin::Settings _settings
 
-std::vector< std::pair< internal_element_type, element_index_type > > _sorted
 
-std::vector< element_index_type > _suffix
 
-internal_element_type _tmp_product
 
-size_t _wordlen
 
-

Detailed Description

-

template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
-class libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >

- -

Class for semigroups generated by instances of Element.

-

FroidurePins are defined by a generating set, and the main method here is FroidurePin::enumerate, which implements the Froidure-Pin Algorithm. When the enumeration of the semigroup is complete, the size, the left and right Cayley graphs are determined, and a confluent terminating presentation for the semigroup is known.

-

Member Typedef Documentation

- -

◆ const_iterator

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - -
using libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::const_iterator = internal::iterator_base<internal_element_type, const_pointer, const_reference, element_type, iterator_methods>
-
- -

A type for const iterators through the elements of this, in the order they were enumerated (i.e. in short-lex order of the minimum word in the generators of this equal to any given element).

-
See also
const_reverse_iterator.
- -
-
- -

◆ const_iterator_idempotents

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - -
using libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::const_iterator_idempotents = const_iterator_pair_first
-
- -

A type for const iterators through the idempotents of this, in short-lex order.

-
See also
const_iterator.
- -
-
- -

◆ const_iterator_sorted

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - -
using libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::const_iterator_sorted = const_iterator_pair_first
-
- -

A type for const iterators through the elements of this, sorted according to TTraits::less.

-
See also
const_reverse_iterator_sorted.
- -
-
- -

◆ const_reverse_iterator

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - -
using libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::const_reverse_iterator = std::reverse_iterator<const_iterator>
-
- -

A type for const reverse iterators through the elements of this, in the reverse order of enumeration.

-
See also
const_iterator.
- -
-
- -

◆ const_reverse_iterator_idempotents

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - -
using libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::const_reverse_iterator_idempotents = const_reverse_iterator_pair_first
-
- -

A type for reverse const iterators through the idempotents of this, in short-lex order.

-
See also
const_iterator_idempotents.
- -
-
- -

◆ const_reverse_iterator_sorted

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - -
using libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::const_reverse_iterator_sorted = const_reverse_iterator_pair_first
-
- -

A type for const reverse iterators through the elements of this, sorted according to TTraits::less.

-
See also
const_iterator_sorted.
- -
-
-

Constructor & Destructor Documentation

- -

◆ FroidurePin() [1/4]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::FroidurePin (std::vector< element_type > const * )
-
-explicit
-
- -

Construct from generators.

-

This is the default constructor for a semigroup generated by gens. The generators gens must all be of the same derived subclass of the Element base class. Additionally, gens must satisfy the following:

-
    -
  1. there must be at least one generator
  2. -
  3. the generators must have equal degree Element::degree if either of these points is not satisfied, then a LIBSEMIGROUPS_EXCEPTION will be thrown.
  4. -
-

There can be duplicate generators and although they do not count as distinct elements, they do count as distinct generators. In other words, the generators of the semigroup are precisely (a copy of) gens in the same order they occur in gens.

-

The generators gens are copied by the constructor, and so it is the responsibility of the caller to delete gens.

- -
-
- -

◆ FroidurePin() [2/4]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::FroidurePin (std::vector< element_type > const & )
-
-explicit
-
- -

Construct from generators.

-

This constructor simply calls the above constructor with a pointer to gens.

- -
-
- -

◆ FroidurePin() [3/4]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::FroidurePin (std::initializer_list< element_type > )
-
-explicit
-
- -

Construct from generators.

-

This constructor simply constructs a vector from gens and calls the above constructor.

- -
-
- -

◆ FroidurePin() [4/4]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::FroidurePin (FroidurePin< TElementType, TElementHash, TElementEqual, TTraits > const & )
-
- -

Copy constructor.

-

Constructs a new FroidurePin which is an exact copy of copy. No enumeration is triggered for either copy or of the newly constructed semigroup.

- -
-
- -

◆ ~FroidurePin()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::~FroidurePin ()
-
- -

A default destructor.

- -
-
-

Member Function Documentation

- -

◆ add_generator()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::add_generator (element_type const & )
-
- -

Add copies of the generators coll to the generators of this.

-

This method can be used to add new generators to the existing semigroup in such a way that any previously enumerated data is preserved and not recomputed, or copied. This can be faster than recomputing the semigroup generated by the old generators and the new generators in the parameter coll.

-

This method changes the semigroup in-place, thereby invalidating possibly previously known data about the semigroup, such as the left or right Cayley graphs, number of idempotents, and so on.

-

Every generator in coll is added regardless of whether or not it is already a generator or element of the semigroup (it may belong to the semigroup but just not be known to belong). If coll is empty, then the semigroup is left unchanged. The order the generators is added is also the order they occur in the parameter coll.

-

The semigroup is returned in a state where all of the previously enumerated elements which had been multiplied by all of the old generators, have now been multiplied by all of the old and new generators. This means that after this method is called the semigroup might contain many more elements than before (whether it is fully enumerating or not). It can also be the case that the new generators are the only new elements, unlike, say, in the case of non-trivial groups.

-

The elements of the argument coll are copied into the semigroup, and should be deleted by the caller. If an element in coll has a degree different to this->degree(), a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ add_generators()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::add_generators (std::initializer_list< const_element_type > )
-
- -

Add copies of the generators coll to the generators of this.

-

See FroidurePin::add_generators for more details.

- -
-
- -

◆ at()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
const_reference libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::at (element_index_type )
-
- -

Returns the element of the semigroup in position pos, or a nullptr if there is no such element.

-

This method attempts to enumerate the semigroup until at least pos + 1 elements have been found. If pos is greater than FroidurePin::size, then this method returns nullptr.

- -
-
- -

◆ batch_size()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::batch_size () const
-
-overridenoexcept
-
- -

Returns the current value of the batch size. This is the minimum number of elements enumerated in any call to FroidurePin::enumerate.

- -
-
- -

◆ begin()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::begin () const
-
- -

Returns a const iterator pointing to the first element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ cbegin()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::cbegin () const
-
- -

Returns a const iterator pointing to the first element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ cbegin_idempotents()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator_idempotents libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::cbegin_idempotents ()
-
- -

Returns a const iterator pointing at the first idempotent in the semigroup.

-

If the returned iterator is incremented, then it points to the second idempotent in the semigroup (if it exists), and every subsequent increment points to the next idempotent.

-

This method involves fully enumerating the semigroup, if it is not already fully enumerated.

- -
-
- -

◆ cbegin_sorted()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator_sorted libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::cbegin_sorted ()
-
- -

Returns a const iterator pointing to the first element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ cend()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::cend () const
-
- -

Returns a const iterator pointing to one past the last currently known element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ cend_idempotents()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator_idempotents libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::cend_idempotents ()
-
- -

Returns a const iterator referring to past the end of the last idempotent in the semigroup.

-

This method involves fully enumerating the semigroup, if it is not already fully enumerated.

- -
-
- -

◆ cend_sorted()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator_sorted libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::cend_sorted ()
-
- -

Returns a const iterator pointing to one past the last element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ closure() [1/2]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
-
-template<class TCollection >
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::closure (TCollection const & coll)
-
- -

Add copies of the non-redundant generators in coll to the generators of this.

-

This method can be used to add new generators to an existing semigroup in such a way that any previously enumerated data is preserved and not recomputed, or copied. This can be faster than recomputing the semigroup generated by the old generators and the new in coll.

-

This method differs from FroidurePin::add_generators in that it tries to add the new generators one by one, and only adds those generators that are not products of existing generators (including any new generators from coll that were added before). The generators are added in the order they occur in coll.

-

This method changes the semigroup in-place, thereby invalidating possibly previously known data about the semigroup, such as the left or right Cayley graphs, or number of idempotents, for example.

-

The elements the parameter coll are copied into the semigroup, and should be deleted by the caller. If an element in coll has a degree different to this->degree(), a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ closure() [2/2]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::closure (std::initializer_list< const_element_type > )
-
- -

Add copies of the non-redundant generators in coll to the generators of this.

-

See FroidurePin::closure for more details.

- -
-
- -

◆ concurrency_threshold()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::concurrency_threshold () const
-
-overridenoexcept
-
- -

Returns the current value of.

- -
-
- -

◆ contains()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
bool libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::contains (const_reference )
-
- -

Returns true if x is an element of this and false if it is not.

-

This method can be used to check if the element x is an element of the semigroup. The semigroup is enumerated in batches until x is found or the semigroup is fully enumerated but x was not found (see FroidurePin::set_batch_size).

- -
-
- -

◆ copy_add_generators()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
-
-template<class TCollection >
- - - - - - - - -
FroidurePin* libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::copy_add_generators (TCollection const & ) const
-
- -

Returns a new semigroup generated by this and coll.

-

This method is equivalent to copying this using FroidurePin::FroidurePin(const FroidurePin& copy) and then calling FroidurePin::add_generators on the copy, but this method avoids copying the parts of this that are immediately invalidated by FroidurePin::add_generators.

-

The elements the argument coll are copied into the semigroup, and should be deleted by the caller. If an element in coll has a degree different to this->degree(), a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ copy_closure()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
-
-template<class TCollection >
- - - - - - - - -
FroidurePin* libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::copy_closure (TCollection const & )
-
- -

Returns a new semigroup generated by this and copies of the non-redundant elements of coll.

-

This method is equivalent to copying this and then calling FroidurePin::closure on the copy with coll, but this method avoids copying the parts of this that are immediately invalidated by FroidurePin::closure.

-

The elements the argument coll are copied into the semigroup, and should be deleted by the caller. If an element in coll has a degree different to this->degree(), a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ crbegin()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_reverse_iterator libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::crbegin () const
-
- -

Returns a const reverse iterator pointing to the last currently known element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ crbegin_sorted()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_reverse_iterator_sorted libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::crbegin_sorted ()
-
- -

Returns a const iterator pointing to the last element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ crend()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_reverse_iterator libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::crend () const
-
- -

Returns a const reverse iterator pointing to one before the first element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ crend_sorted()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_reverse_iterator_sorted libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::crend_sorted ()
-
- -

Returns a const iterator pointing to one before the first element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ current_max_word_length()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::current_max_word_length () const
-
-overridenoexcept
-
- -

Returns the maximum length of a word in the generators so far computed.

-

Every elements of the semigroup can be expressed as a product of the generators. The elements of the semigroup are enumerated in the short-lex order induced by the order of the generators (as passed to FroidurePin::FroidurePin). This method returns the length of the longest word in the generators that has so far been enumerated.

- -
-
- -

◆ current_nr_rules()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::current_nr_rules () const
-
-overridenoexcept
-
- -

Returns the number of relations in the presentation for the semigroup that have been found so far.

-

This is only the actual number of relations in a presentation defining the semigroup if the semigroup is fully enumerated.

- -
-
- -

◆ current_position()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::current_position (const_reference x) const
-
- -

Returns the position of the element x in the semigroup if it is already known to belong to the semigroup.

-

This method finds the position of the element x in the semigroup if it is already known to belong to the semigroup, and libsemigroups::FroidurePin::UNDEFINED if not. If the semigroup is not fully enumerated, then this method may return libsemigroups::FroidurePin::UNDEFINED when x is in the semigroup, but this is not yet known.

-
See also
FroidurePin::position and FroidurePin::sorted_position.
- -
-
- -

◆ current_size()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::current_size () const
-
-overridenoexcept
-
- -

Returns the number of elements in the semigroup that have been enumerated so far.

-

This is only the actual size of the semigroup if the semigroup is fully enumerated.

- -
-
- -

◆ degree()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::degree () const
-
-overridenoexcept
-
- -

Returns the degree of any (and all) Element's in the semigroup.

- -
-
- -

◆ end()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - -
const_iterator libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::end () const
-
- -

Returns a const iterator pointing to one past the last currently known element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the FroidurePin class.

- -
-
- -

◆ enumerate()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::enumerate (size_t  = LIMIT_MAX)
-
-override
-
- -

Enumerate the semigroup until limit elements are found or killed is true.

-

This is the main method of the FroidurePin class, where the Froidure-Pin Algorithm is implemented.

-

If the semigroup is already fully enumerated, or the number of elements previously enumerated exceeds limit, then calling this method does nothing. Otherwise, enumerate attempts to find at least the maximum of limit and FroidurePin::batch_size elements of the semigroup. If killed is set to true (usually by another process), then the enumeration is terminated as soon as possible. It is possible to resume enumeration at some later point after any call to this method, even if it has been killed.

-

If the semigroup is fully enumerated, then it knows its left and right Cayley graphs, and a minimal factorisation of every element (in terms of its generating set). All of the elements are stored in memory until the object is destroyed.

-

The parameter limit defaults to FroidurePin::LIMIT_MAX.

- -
-
- -

◆ equal_to()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::equal_to (word_type const & ,
word_type const &  
) const
-
-override
-
- -

Returns true if the parameters represent the same element of the semigroup and false otherwise.

- -
-
- -

◆ factorisation() [1/4]

- -
-
-
-template<>
- - - - - - - - -
word_type libsemigroups::FroidurePin< KBE, internal::hash< KBE >, internal::equal_to< KBE >, TraitsHashEqual< KBE, internal::hash< KBE >, internal::equal_to< KBE > > >::factorisation (KBE const & x)
-
- -

Returns a libsemigroups::word_type which evaluates to x.

-

Specialises the factorisation method for FroidurePin's of KBE's so that it just returns the word inside the KBE.

- -
-
- -

◆ factorisation() [2/4]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::factorisation (word_type,
element_index_type  
)
-
-override
-
- -

Changes word in-place to contain a word in the generators equal to the pos element of the semigroup.

-

The key difference between this method and FroidurePin::minimal_factorisation(word_type& word, element_index_type pos), is that the resulting factorisation may not be minimal. If pos is greater than the size of the semigroup, then a LIBSEMIGROUPS_EXCEPTION is thrown.

- -
-
- -

◆ factorisation() [3/4]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
word_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::factorisation (element_index_type pos)
-
-override
-
- -

Returns a libsemigroups::word_type which evaluates to the Element in position pos of this.

-

The key difference between this method and FroidurePin::minimal_factorisation(element_index_type pos), is that the resulting factorisation may not be minimal. If pos is greater than the size of the semigroup, then a LIBSEMIGROUPS_EXCEPTION is thrown.

- -
-
- -

◆ factorisation() [4/4]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
word_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::factorisation (const_reference )
-
- -

Returns a libsemigroups::word_type which evaluates to x.

-

The key difference between this method and FroidurePin::minimal_factorisation(const_reference x), is that the resulting factorisation may not be minimal. If pos is greater than the size of the semigroup, then a LIBSEMIGROUPS_EXCEPTION is thrown.

- -
-
- -

◆ fast_product()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::fast_product (element_index_type ,
element_index_type  
) const
-
-override
-
- -

Returns the position in this of the product of this->at(i) and this->at(j).

-

The values i and j must be less than FroidurePin::current_size, or a LIBSEMIGROUPS_EXCEPTION will be thrown. This method either:

-
    -
  • follows the path in the right or left Cayley graph from i to j, whichever is shorter using FroidurePin::product_by_reduction; or
  • -
  • multiplies the elements in postions i and j together;
  • -
-

whichever is better. The method used is determined by comparing Element::complexity and the FroidurePin::length_const of i and j.

-

For example, if the Element::complexity of the multiplication is linear and this is a semigroup of transformations of degree 20, and the shortest paths in the left and right Cayley graphs from i to j are of length 100 and 1131, then it better to just product the transformations together.

- -
-
- -

◆ final_letter()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
letter_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::final_letter (element_index_type pos) const
-
-override
-
- -

Returns the last letter of the element in position pos.

-

This method returns the final letter of the element in position pos of the semigroup, which is the index of the generator corresponding to the final letter of the element.

-

Note that FroidurePin::gens[FroidurePin::final_letter(pos)] is only equal to FroidurePin::at(FroidurePin::final_letter(pos)) if there are no duplicate generators.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, or a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ first_letter()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
letter_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::first_letter (element_index_type pos) const
-
-override
-
- -

Returns the first letter of the element in position pos.

-

This method returns the first letter of the element in position pos of the semigroup, which is the index of the generator corresponding to the first letter of the element.

-

Note that FroidurePin::gens[FroidurePin::first_letter(pos)] is only equal to FroidurePin::at(FroidurePin::first_letter(pos)) if there are no duplicate generators.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, or a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ generator()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
const_reference libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::generator (letter_type ) const
-
- -

Returns a const reference to the generator with index pos.

-

If pos is not less than FroidurePin::nr_generators(), a LIBSEMIGROUPS_EXCEPTION will be thrown. Note that FroidurePin::gens(pos) is in general in general not in position pos in the semigroup, i.e. is not equal to FroidurePin::at(pos).

- -
-
- -

◆ is_idempotent()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
bool libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::is_idempotent (element_index_type )
-
-override
-
- -

Returns true if the element in position pos is an idempotent and false if it is not.

-

The parameter pos must be a valid position of an element of the semigroup, or a LIBSEMIGROUPS_EXCEPTION will be thrown. This method involves fully enumerating the semigroup, if it is not already fully enumerated.

- -
-
- -

◆ left()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::left (element_index_type ,
letter_type  
)
-
-override
-
- -

Returns the index of the product of the generator with index j and the element in position i.

-

This method fully enumerates the semigroup.

- -
-
- -

◆ length_const()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::length_const (element_index_type ) const
-
-override
-
- -

Returns the length of the element in position pos of the semigroup.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, or a LIBSEMIGROUPS_EXCEPTION will be thrown. This method causes no enumeration of the semigroup.

- -
-
- -

◆ length_non_const()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::length_non_const (element_index_type )
-
-override
-
- -

Returns the length of the element in position pos of the semigroup.

-

The parameter pos must be a valid position of an element of the semigroup, or a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ letter_to_pos()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::letter_to_pos (letter_type ) const
-
-override
-
- -

Returns the position in this of the generator with index i.

-

If i is not a valid generator index, a LIBSEMIGROUPS_EXCEPTION will be thrown. In many cases letter_to_pos(i) will equal i, examples of when this will not be the case are:

-
    -
  • there are duplicate generators;
  • -
  • FroidurePin::add_generators was called after the semigroup was already partially enumerated.
  • -
- -
-
- -

◆ max_threads()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::max_threads () const
-
-overridenoexcept
-
- -

Returns the current value of.

- -
-
- -

◆ minimal_factorisation() [1/3]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::minimal_factorisation (word_type,
element_index_type  
)
-
-override
-
- -

Changes word in-place to contain a minimal word with respect to the short-lex ordering in the generators equal to the pos element of the semigroup.

-

If pos is less than the size of this semigroup, then this method changes its first parameter word in-place by first clearing it and then to contain a minimal factorization of the element in position pos of the semigroup with respect to the generators of the semigroup. This method enumerates the semigroup until at least the pos element is known. If pos is greater than the size of the semigroup, then a LIBSEMIGROUPS_EXCEPTION is thrown.

- -
-
- -

◆ minimal_factorisation() [2/3]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
word_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::minimal_factorisation (element_index_type )
-
-override
-
- -

Returns a minimal libsemigroups::word_type which evaluates to the Element in position pos of this.

-

This is the same as the two-argument method for FroidurePin::minimal_factorisation, but it returns a pointer to the factorisation instead of modifying an argument in-place. If pos is greater than the size of the semigroup, then a LIBSEMIGROUPS_EXCEPTION is thrown.

- -
-
- -

◆ minimal_factorisation() [3/3]

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
word_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::minimal_factorisation (const_reference )
-
- -

Returns a minimal libsemigroups::word_type which evaluates to x.

-

This is the same as the method taking a FroidurePin::element_index_type, but it factorises an Element instead of using the position of an element. If pos is greater than the size of the semigroup, then a LIBSEMIGROUPS_EXCEPTION is thrown.

- -
-
- -

◆ next_relation()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::next_relation (word_typerelation)
-
-override
-
- -

This method changes relation in-place to contain the next relation of the presentation defining this.

-

This method changes relation in-place so that one of the following holds:

-
    -
  • relation is a vector consisting of a libsemigroups::letter_type and a libsemigroups::letter_type such that FroidurePin::gens(relation[0]) == FroidurePin::gens(relation[1]), i.e. if the semigroup was defined with duplicate generators;
  • -
  • relation is a vector consisting of a libsemigroups::element_index_type, libsemigroups::letter_type, and libsemigroups::element_index_type such that
    this[relation[0]] * FroidurePin::gens(relation[1]) ==
    this[relation[2]]
  • -
  • relation is empty if there are no more relations.
  • -
-

FroidurePin::next_relation is guaranteed to output all relations of length 2 before any relations of length 3. If called repeatedly after FroidurePin::reset_next_relation, and until relation is empty, the values placed in relation correspond to a length-reducing confluent rewriting system that defines the semigroup.

-

This method can be used in conjunction with FroidurePin::factorisation to obtain a presentation defining the semigroup.

-
See also
FroidurePin::reset_next_relation.
- -
-
- -

◆ nr_generators()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::nr_generators () const
-
-overridenoexcept
-
- -

Returns the number of generators of the semigroup.

- -
-
- -

◆ nr_idempotents()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::nr_idempotents ()
-
-override
-
- -

Returns the total number of idempotents in the semigroup.

-

This method involves fully enumerating the semigroup, if it is not already fully enumerated. The value of the positions, and number, of idempotents is stored after they are first computed.

- -
-
- -

◆ nr_rules()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::nr_rules ()
-
-override
-
- -

Returns the total number of relations in the presentation defining the semigroup.

-
See also
FroidurePin::next_relation.
- -
-
- -

◆ operator=()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
FroidurePin& libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::operator= (FroidurePin< TElementType, TElementHash, TElementEqual, TTraits > const & semigroup)
-
-delete
-
- -

Deleted.

-

The FroidurePin class does not support an assignment contructor to avoid accidental copying. An object in FroidurePin may use many gigabytes of memory and might be extremely expensive to copy. A copy constructor is provided in case such a copy should it be required anyway.

- -
-
- -

◆ operator[]()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
const_reference libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::operator[] (element_index_type ) const
-
- -

Returns the element of the semigroup in position pos.

-

This method performs no checks on its argument, and performs no enumeration of the semigroup.

- -
-
- -

◆ position()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::position (const_reference )
-
- -

Returns the position of x in this, or FroidurePin::UNDEFINED if x is not an element of this.

-

This method can be used to find the FroidurePin::element_index_type position of the element x if it belongs to the semigroup. The semigroup is enumerated in batches until x is found or the semigroup is fully enumerated but x was not found (see FroidurePin::set_batch_size).

- -
-
- -

◆ position_to_sorted_position()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::position_to_sorted_position (element_index_type )
-
-override
-
- -

Returns the position of this->at(pos) in the sorted array of elements of the semigroup, or FroidurePin::UNDEFINED if pos is greater than the size of the semigroup.

- -
-
- -

◆ prefix()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::prefix (element_index_type pos) const
-
-override
-
- -

Returns the position of the prefix of the element x in position pos (of the semigroup) of length one less than the length of x.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, or a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ product_by_reduction()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::product_by_reduction (element_index_type ,
element_index_type  
) const
-
-override
-
- -

Returns the position in this of the product of this->at(i) and this->at(j) by following a path in the Cayley graph.

-

The values i and j must be less than FroidurePin::current_size, or a LIBSEMIGROUPS_EXCEPTION will be thrown. This method returns the position FroidurePin::element_index_type in the semigroup of the product of this->at(i) and this->at(j) elements by following the path in the right Cayley graph from i labelled by the word this->minimal_factorisation(j) or, if this->minimal_factorisation(i) is shorter, by following the path in the left Cayley graph from j labelled by this->minimal_factorisation(i).

- -
-
- -

◆ reserve()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::reserve (size_t )
-
-override
-
- -

Requests that the capacity (i.e. number of elements) of the semigroup be at least enough to contain n elements.

-

The parameter n is also used to initialise certain data members, if you know a good upper bound for the size of your semigroup, then it is a good idea to call this method with that upper bound as an argument, this can significantly improve the performance of the FroidurePin::enumerate method, and consequently every other method too.

- -
-
- -

◆ reset_next_relation()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::reset_next_relation ()
-
-overridenoexcept
-
- -

This method resets FroidurePin::next_relation so that when it is next called the resulting relation is the first one.

-

After a call to this function, the next call to FroidurePin::next_relation will return the first relation of the presentation defining the semigroup.

- -
-
- -

◆ right()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::right (element_index_type ,
letter_type  
)
-
-override
-
- -

Returns the index of the product of the element in position i with the generator with index j.

-

This method fully enumerates the semigroup.

- -
-
- -

◆ set_batch_size()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::set_batch_size (size_t )
-
-overridenoexcept
-
- -

Set a new value for the batch size.

-

The batch size is the number of new elements to be found by any call to FroidurePin::enumerate. A call to enumerate returns between 0 and approximately the batch size.

-

The default value of the batch size is 8192.

-

This is used by, for example, FroidurePin::position so that it is possible to find the position of an element without fully enumerating the semigroup.

- -
-
- -

◆ set_concurrency_threshold()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::set_concurrency_threshold (size_t )
-
-overridenoexcept
-
- -

Returns the current value of.

- -
-
- -

◆ set_max_threads()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
void libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::set_max_threads (size_t )
-
-overridenoexcept
-
- -

Set the maximum number of threads that any method of an instance of FroidurePin can use.

-

This method sets the maximum number of threads to be used by any method of a FroidurePin object. The number of threads is limited to the maximum of 1 and the minimum of nr_threads and the number of threads supported by the hardware.

- -
-
- -

◆ size()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - -
size_t libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::size ()
-
-override
-
- -

Returns the size of the semigroup.

- -
-
- -

◆ sorted_at()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
const_reference libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::sorted_at (element_index_type )
-
- -

Returns the element of the semigroup in position pos of the sorted array of elements, or nullptr in pos is not valid (i.e. too big).

-

This method fully enumerates the semigroup.

- -
-
- -

◆ sorted_position()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::sorted_position (const_reference )
-
- -

Returns the position of x in the sorted array of elements of the semigroup, or FroidurePin::UNDEFINED if x is not an element of this.

- -
-
- -

◆ suffix()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::suffix (element_index_type pos) const
-
-override
-
- -

Returns the position of the suffix of the element x in position pos (of the semigroup) of length one less than the length of x.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, or a LIBSEMIGROUPS_EXCEPTION will be thrown.

- -
-
- -

◆ word_to_element()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - - - - -
element_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::word_to_element (word_type const & ) const
-
- -

Returns a copy of the element of this represented by the word w.

-

The parameter w must consist of non-negative integers less than FroidurePin::nrgens, or a LIBSEMIGROUPS_EXCEPTION will be thrown. This method returns a copy of the element of this obtained by evaluating w. This is equivalent to finding the product x of the generators FroidurePin::gens(w[i]).

-

A copy is returned instead of a reference, because the element of this corresponding to w may not yet have been enumerated.

-
See also
FroidurePin::word_to_pos.
- -
-
- -

◆ word_to_pos()

- -
-
-
-template<typename TElementType = Element const*, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>, class TTraits = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
- - - - - -
- - - - - - - - -
element_index_type libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >::word_to_pos (word_type const & ) const
-
-override
-
- -

Returns the position in the semigroup corresponding to the element represented by the word w.

-

The parameter w must consist of non-negative integers less than FroidurePin::nr_generators, or a LibsemigroupsException will be thrown. This method returns the position in this of the element obtained by evaluating w. This method does not perform any enumeration of the semigroup, and will return UNDEFINED if the position of the element of this corresponding to w cannot be determined.

-

This is equivalent to finding the product x of the generators FroidurePin::gens(w[i]) and then calling FroidurePin::position_current with argument x.

-
See also
FroidurePin::word_to_element.
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_integers-members.html b/classlibsemigroups_1_1_integers-members.html deleted file mode 100644 index 480c2e89f..000000000 --- a/classlibsemigroups_1_1_integers-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Integers Member List
-
-
- -

This is the complete list of members for libsemigroups::Integers, including all inherited members.

- - - - - - - - - - -
INFTYlibsemigroups::Semiring< int64_t >static
Integers() (defined in libsemigroups::Integers)libsemigroups::Integersinline
MINUS_INFTYlibsemigroups::Semiring< int64_t >static
one() const overridelibsemigroups::Integersinlinevirtual
plus(int64_t x, int64_t y) const overridelibsemigroups::Integersinlinevirtual
prod(int64_t x, int64_t y) const overridelibsemigroups::Integersinlinevirtual
UNDEFINEDlibsemigroups::Semiring< int64_t >static
zero() const overridelibsemigroups::Integersinlinevirtual
~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_integers.html b/classlibsemigroups_1_1_integers.html deleted file mode 100644 index 1e0379b79..000000000 --- a/classlibsemigroups_1_1_integers.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Integers Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::Integers Class Reference
-
-
- -

The usual ring of integers. - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::Integers:
-
-
Inheritance graph
- - - - -
-
-Collaboration diagram for libsemigroups::Integers:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

int64_t one () const override
 Returns the integer 1. More...
 
int64_t plus (int64_t x, int64_t y) const override
 Returns the sum \(x + y\). More...
 
int64_t prod (int64_t x, int64_t y) const override
 Returns the product \(xy\). More...
 
int64_t zero () const override
 Returns the integer 0. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< int64_t >
virtual ~Semiring ()
 A default destructor. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< int64_t >
static const int64_t INFTY
 Value representing \(\infty\). More...
 
static const int64_t MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const int64_t UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

The usual ring of integers.

-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::Integers::one () const
-
-inlineoverridevirtual
-
- -

Returns the integer 1.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ plus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::Integers::plus (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns the sum \(x + y\).

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ prod()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::Integers::prod (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns the product \(xy\).

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ zero()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::Integers::zero () const
-
-inlineoverridevirtual
-
- -

Returns the integer 0.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_integers.png b/classlibsemigroups_1_1_integers.png deleted file mode 100644 index 40fda21e5..000000000 Binary files a/classlibsemigroups_1_1_integers.png and /dev/null differ diff --git a/classlibsemigroups_1_1_integers__coll__graph.map b/classlibsemigroups_1_1_integers__coll__graph.map deleted file mode 100644 index 6ffd2f239..000000000 --- a/classlibsemigroups_1_1_integers__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_integers__coll__graph.md5 b/classlibsemigroups_1_1_integers__coll__graph.md5 deleted file mode 100644 index 5e55e9bc2..000000000 --- a/classlibsemigroups_1_1_integers__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -2d69ebc7ef141707ca1d1eb6f8f30a73 \ No newline at end of file diff --git a/classlibsemigroups_1_1_integers__coll__graph.png b/classlibsemigroups_1_1_integers__coll__graph.png deleted file mode 100644 index e282538b1..000000000 Binary files a/classlibsemigroups_1_1_integers__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_integers__inherit__graph.map b/classlibsemigroups_1_1_integers__inherit__graph.map deleted file mode 100644 index 6ffd2f239..000000000 --- a/classlibsemigroups_1_1_integers__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_integers__inherit__graph.md5 b/classlibsemigroups_1_1_integers__inherit__graph.md5 deleted file mode 100644 index 774e1aeb1..000000000 --- a/classlibsemigroups_1_1_integers__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1a4c93de45aa31d8a8d0bd5072ee7204 \ No newline at end of file diff --git a/classlibsemigroups_1_1_integers__inherit__graph.png b/classlibsemigroups_1_1_integers__inherit__graph.png deleted file mode 100644 index e282538b1..000000000 Binary files a/classlibsemigroups_1_1_integers__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_k_b_e-members.html b/classlibsemigroups_1_1_k_b_e-members.html deleted file mode 100644 index 37d453b7b..000000000 --- a/classlibsemigroups_1_1_k_b_e-members.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::KBE Member List
-
-
- -

This is the complete list of members for libsemigroups::KBE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_hash_valuelibsemigroups::Elementmutableprotected
cache_hash_value() const overridelibsemigroups::KBEvirtual
complexity() const overridelibsemigroups::KBEvirtual
degree() const overridelibsemigroups::KBEvirtual
Element()libsemigroups::Element
Element(size_t)libsemigroups::Elementexplicit
hash_value() constlibsemigroups::Elementinline
heap_copy() const overridelibsemigroups::KBEvirtual
heap_identity() const overridelibsemigroups::KBEvirtual
identity() constlibsemigroups::KBE
increase_degree_by(size_t)libsemigroups::Elementvirtual
KBE()=defaultlibsemigroups::KBE
KBE(KnuthBendix *)libsemigroups::KBEexplicit
KBE(KnuthBendix *, internal_string_type const &)libsemigroups::KBE
KBE(KnuthBendix *, letter_type const &)libsemigroups::KBE
KBE(KnuthBendix &, letter_type const &)libsemigroups::KBE
KBE(KnuthBendix *, word_type const &)libsemigroups::KBE
KBE(KnuthBendix &, word_type const &)libsemigroups::KBE
KBE(KBE const &)=defaultlibsemigroups::KBE
operator std::string() const (defined in libsemigroups::KBE)libsemigroups::KBE
operator word_type() const (defined in libsemigroups::KBE)libsemigroups::KBE
operator!=(Element const &that) constlibsemigroups::Element
operator<(Element const &) const overridelibsemigroups::KBEvirtual
operator<=(Element const &that) constlibsemigroups::Element
operator==(Element const &) const overridelibsemigroups::KBEvirtual
operator>(Element const &that) constlibsemigroups::Element
operator>=(Element const &that) constlibsemigroups::Element
redefine(Element const &, Element const &, size_t=0) overridelibsemigroups::KBEvirtual
libsemigroups::Element::redefine(Element const &, Element const &)libsemigroups::Elementvirtual
libsemigroups::Element::redefine(Element const *, Element const *)libsemigroups::Element
libsemigroups::Element::redefine(Element const *, Element const *, size_t)libsemigroups::Element
reset_hash_value() constlibsemigroups::Elementprotected
swap(Element &) overridelibsemigroups::KBEvirtual
~Element()=defaultlibsemigroups::Elementvirtual
- - - - diff --git a/classlibsemigroups_1_1_k_b_e.html b/classlibsemigroups_1_1_k_b_e.html deleted file mode 100644 index fcffbc543..000000000 --- a/classlibsemigroups_1_1_k_b_e.html +++ /dev/null @@ -1,786 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::KBE Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::KBE Class Reference
-
-
- -

Subclass of Element that wraps an libsemigroups::internal_string_type. - More...

- -

#include <kbe.hpp>

-
-Inheritance diagram for libsemigroups::KBE:
-
-
Inheritance graph
- - - -
[legend]
-
-Collaboration diagram for libsemigroups::KBE:
-
-
Collaboration graph
- - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 KBE ()=default
 Constructor. More...
 
 KBE (KnuthBendix *)
 Constructor from a rewriting system and a word. More...
 
 KBE (KnuthBendix *, internal_string_type const &)
 Constructor from a rewriting system and a word. More...
 
 KBE (KnuthBendix *, letter_type const &)
 Constructor from a rewriting system and a letter. More...
 
 KBE (KnuthBendix &, letter_type const &)
 Constructor from a rewriting system and a letter. More...
 
 KBE (KnuthBendix *, word_type const &)
 Constructor from a rewriting system and a word. More...
 
 KBE (KnuthBendix &, word_type const &)
 Constructor from a rewriting system and a word. More...
 
 KBE (KBE const &)=default
 A copy constructor. More...
 
void cache_hash_value () const override
 Calculates a hash value for this object which is cached. More...
 
size_t complexity () const override
 Returns the approximate time complexity of multiplying two KBE's. More...
 
size_t degree () const override
 Returns the degree of an KBE. More...
 
KBEheap_copy () const override
 Returns an independent copy of this. More...
 
KBEheap_identity () const override
 Returns a new copy of the identity KBE. More...
 
KBE identity () const
 Return the identity KBE. More...
 
operator std::string () const
 
operator word_type () const
 
bool operator< (Element const &) const override
 Returns true if this is less than that and false if it is not. More...
 
bool operator== (Element const &) const override
 Returns true if this equals that. More...
 
void redefine (Element const &, Element const &, size_t=0) override
 Multiply x and y and stores the result in this. More...
 
void swap (Element &) override
 Copy x into this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element ()
 A constructor. More...
 
 Element (size_t)
 A constructor. More...
 
virtual ~Element ()=default
 A default destructor. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void increase_degree_by (size_t)
 Increases the degree of this by deg. This does not make sense for all subclasses of Element. More...
 
bool operator!= (Element const &that) const
 Returns true if this is not equal to that. More...
 
bool operator<= (Element const &that) const
 Returns true if this is less than or equal to that. More...
 
bool operator> (Element const &that) const
 Returns true if this is greater than that. More...
 
bool operator>= (Element const &that) const
 Returns true if this is less than or equal to that. More...
 
virtual void redefine (Element const &, Element const &)
 Multiplies x and y and stores the result in this. More...
 
void redefine (Element const *, Element const *)
 Multiplies x and y and stores the result in this. More...
 
void redefine (Element const *, Element const *, size_t)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - - -

-Additional Inherited Members

- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Protected Attributes inherited from libsemigroups::Element
size_t _hash_value
 This data member holds a cached version of the hash value of an Element. It is stored here if it is ever computed. It is invalidated by libsemigroups::Element::redefine and sometimes by libsemigroups::Element::really_copy, and potentially any other non-const data member of Element or any of its subclasses. More...
 
-

Detailed Description

-

Subclass of Element that wraps an libsemigroups::internal_string_type.

-

This class is used to wrap libsemigroups::internal_string_type into an Element so that it is possible to use them as generators for a FroidurePin object.

-

Constructor & Destructor Documentation

- -

◆ KBE() [1/8]

- -
-
- - - - - -
- - - - - - - -
libsemigroups::KBE::KBE ()
-
-default
-
- -

Constructor.

-

Constructs a KBE which does not represent a word or have an associated rewriting system.

- -
-
- -

◆ KBE() [2/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::KBE::KBE (KnuthBendix)
-
-explicit
-
- -

Constructor from a rewriting system and a word.

-

Constructs a KBE which represents the empty word, where multiplication with other KBE's is defined with respect to the rewriting system kb.

-

The rewriting system kb is not copied, and it is the responsibility of the caller to delete it.

- -
-
- -

◆ KBE() [3/8]

- -
-
- - - - - - - - - - - - - - - - - - -
libsemigroups::KBE::KBE (KnuthBendix,
internal_string_type const &  
)
-
- -

Constructor from a rewriting system and a word.

-

Constructs a KBE which is essentially the word w, whose multiplication with other KBE's is defined with respect to the rewriting system kb.

-

The rewriting system kb is not copied, and it is the responsibility of the caller to delete it.

- -
-
- -

◆ KBE() [4/8]

- -
-
- - - - - - - - - - - - - - - - - - -
libsemigroups::KBE::KBE (KnuthBendix,
letter_type const &  
)
-
- -

Constructor from a rewriting system and a letter.

-

Calls KBE::KBE with KnuthBendix::uint_to_kb_word of a.

- -
-
- -

◆ KBE() [5/8]

- -
-
- - - - - - - - - - - - - - - - - - -
libsemigroups::KBE::KBE (KnuthBendix,
letter_type const &  
)
-
- -

Constructor from a rewriting system and a letter.

-

Calls KBE::KBE with KnuthBendix::uint_to_kb_word of a.

- -
-
- -

◆ KBE() [6/8]

- -
-
- - - - - - - - - - - - - - - - - - -
libsemigroups::KBE::KBE (KnuthBendix,
word_type const &  
)
-
- -

Constructor from a rewriting system and a word.

-

Calls KBE::KBE with KnuthBendix::word_to_kb_word of w.

- -
-
- -

◆ KBE() [7/8]

- -
-
- - - - - - - - - - - - - - - - - - -
libsemigroups::KBE::KBE (KnuthBendix,
word_type const &  
)
-
- -

Constructor from a rewriting system and a word.

-

Calls KBE::KBE with KnuthBendix::word_to_kb_word of w.

- -
-
- -

◆ KBE() [8/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::KBE::KBE (KBE const & )
-
-default
-
- -

A copy constructor.

- -
-
-

Member Function Documentation

- -

◆ cache_hash_value()

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::KBE::cache_hash_value () const
-
-overridevirtual
-
- -

Calculates a hash value for this object which is cached.

-
See also
Element::hash_value and Element::cache_hash_value.
- -

Implements libsemigroups::Element.

- -
-
- -

◆ complexity()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::KBE::complexity () const
-
-overridevirtual
-
- -

Returns the approximate time complexity of multiplying two KBE's.

-
See also
Element::complexity.
-

Returns KBE::LIMIT_MAX since the complexity of multiplying words in a rewriting system is higher than the cost of tracing a path in the left or right Cayley graph of a FroidurePin.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ degree()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::KBE::degree () const
-
-overridevirtual
-
- -

Returns the degree of an KBE.

-
See also
Element::degree.
-

Returns the integer 0 since the notion of degree is not really meaningful in this context.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ heap_copy()

- -
-
- - - - - -
- - - - - - - -
KBE* libsemigroups::KBE::heap_copy () const
-
-overridevirtual
-
- -

Returns an independent copy of this.

-

Returns a pointer to a copy of this, which is not linked to this in memory.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ heap_identity()

- -
-
- - - - - -
- - - - - - - -
KBE* libsemigroups::KBE::heap_identity () const
-
-overridevirtual
-
- -

Returns a new copy of the identity KBE.

-

Returns a pointer to a copy of this->identity(), which is not linked to any other copy in memory.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ identity()

- -
-
- - - - - - - -
KBE libsemigroups::KBE::identity () const
-
- -

Return the identity KBE.

-
See also
Element::identity.
-

Returns a new KBE wrapping the empty word and over the same rewriting system as this.

- -
-
- -

◆ operator<()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::KBE::operator< (Element const & ) const
-
-overridevirtual
-
- -

Returns true if this is less than that and false if it is not.

-

This defines a total order on KBEs that is the short-lex order on all words.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::KBE::operator== (Element const & ) const
-
-overridevirtual
-
- -

Returns true if this equals that.

-

This method checks the mathematical equality of two KBE, in other words whether or not they represent that the same reduced word of the rewriting system they are defined over.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ redefine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void libsemigroups::KBE::redefine (Element const & ,
Element const & ,
size_t  = 0 
)
-
-overridevirtual
-
- -

Multiply x and y and stores the result in this.

-

Redefine this to be a reduced word with respect to the rewriting system of x and y which is equivalent to the concatenation of x and y. This method asserts that x and y have the same rewriting system.

-

The parameter thread_id is required since some temporary storage is required to find the product of x and y. Note that if different threads call this method with the same value of thread_id then bad things will happen.

- -

Reimplemented from libsemigroups::Element.

- -
-
- -

◆ swap()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::KBE::swap (Element)
-
-overridevirtual
-
- -

Copy x into this.

-

This method copies the KBE pointed to by x into this by changing this in-place.

- -

Implements libsemigroups::Element.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_k_b_e__coll__graph.map b/classlibsemigroups_1_1_k_b_e__coll__graph.map deleted file mode 100644 index bbdebcf8f..000000000 --- a/classlibsemigroups_1_1_k_b_e__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/classlibsemigroups_1_1_k_b_e__coll__graph.md5 b/classlibsemigroups_1_1_k_b_e__coll__graph.md5 deleted file mode 100644 index 5b9e06289..000000000 --- a/classlibsemigroups_1_1_k_b_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -0b8b9d7b905f3b37a78431bc09062f41 \ No newline at end of file diff --git a/classlibsemigroups_1_1_k_b_e__coll__graph.png b/classlibsemigroups_1_1_k_b_e__coll__graph.png deleted file mode 100644 index 42080ff7f..000000000 Binary files a/classlibsemigroups_1_1_k_b_e__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_k_b_e__inherit__graph.map b/classlibsemigroups_1_1_k_b_e__inherit__graph.map deleted file mode 100644 index bbdebcf8f..000000000 --- a/classlibsemigroups_1_1_k_b_e__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/classlibsemigroups_1_1_k_b_e__inherit__graph.md5 b/classlibsemigroups_1_1_k_b_e__inherit__graph.md5 deleted file mode 100644 index d39831632..000000000 --- a/classlibsemigroups_1_1_k_b_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -cc0a84ce225fa8bed44d06a5c2a714ed \ No newline at end of file diff --git a/classlibsemigroups_1_1_k_b_e__inherit__graph.png b/classlibsemigroups_1_1_k_b_e__inherit__graph.png deleted file mode 100644 index 42080ff7f..000000000 Binary files a/classlibsemigroups_1_1_k_b_e__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_matrix_over_semiring-members.html b/classlibsemigroups_1_1_matrix_over_semiring-members.html deleted file mode 100644 index affbb7993..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring-members.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::MatrixOverSemiring< TValueType > Member List
-
-
- -

This is the complete list of members for libsemigroups::MatrixOverSemiring< TValueType >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inline
begin() constlibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inline
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< TValueType, MatrixOverSemiring< TValueType > >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inline
cend() constlibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inline
complexity() const overridelibsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
degree() const overridelibsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inline
ElementWithVectorData(std::vector< TValueType > *vector)libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlineexplicit
ElementWithVectorData(std::vector< TValueType > const &vector)libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlineexplicit
ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > > (defined in libsemigroups::MatrixOverSemiring< TValueType >)libsemigroups::MatrixOverSemiring< TValueType >friend
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
MatrixOverSemiringBase(std::vector< TValueType > *matrix, Semiring< TValueType > const *semiring)libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inline
MatrixOverSemiringBase(std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inline
MatrixOverSemiringBase(std::vector< TValueType > *matrix)libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inlineexplicitprotected
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
redefine(Element const *x, Element const *y) overridelibsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
ElementWithVectorDataDefaultHash< TValueType, MatrixOverSemiring< TValueType > >::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
semiring() constlibsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >inline
swap(Element *x) overridelibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlinevirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring.html b/classlibsemigroups_1_1_matrix_over_semiring.html deleted file mode 100644 index aa25b6a38..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::MatrixOverSemiring< TValueType > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Friends | -List of all members
-
-
libsemigroups::MatrixOverSemiring< TValueType > Class Template Reference
-
-
- -

Matrices over a semiring. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::MatrixOverSemiring< TValueType >:
-
-
Inheritance graph
- - - - - - - -
-
-Collaboration diagram for libsemigroups::MatrixOverSemiring< TValueType >:
-
-
Collaboration graph
- - - - - - - -
- - - - -

-Friends

-class ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Public Member Functions inherited from libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >
 MatrixOverSemiringBase (std::vector< TValueType > *matrix, Semiring< TValueType > const *semiring)
 A constructor. More...
 
 MatrixOverSemiringBase (std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)
 A constructor. More...
 
size_t complexity () const override
 Returns the approximate time complexity of multiplying two matrices. More...
 
size_t degree () const override
 Returns the dimension of the matrix. More...
 
Elementidentity () const override
 Returns the identity matrix with dimension of this. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
Semiring< TValueType > const * semiring () const
 Returns a pointer to the Semiring over which the matrix is defined. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > const &vector)
 A constructor. More...
 
TValueType at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< TValueType >::iterator begin () const
 Returns an iterator. More...
 
std::vector< TValueType >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< TValueType >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< TValueType >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
TValueType operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- Protected Member Functions inherited from libsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >
 MatrixOverSemiringBase (std::vector< TValueType > *matrix)
 Constructs a MatrixOverSemiringBase with whose underlying semiring is not defined. The underlying semiring must be set by any class deriving from this one. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< TValueType, MatrixOverSemiring< TValueType > >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >
std::vector< TValueType > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename TValueType>
-class libsemigroups::MatrixOverSemiring< TValueType >

- -

Matrices over a semiring.

-

This class is partial specialization of MatrixOverSemiringBase that has only one template parameter TValueType, and that uses MatrixOverSemiring<TValueType> as the second template parameter for MatrixOverSemiringBase.

-

The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring.png b/classlibsemigroups_1_1_matrix_over_semiring.png deleted file mode 100644 index 66ac09555..000000000 Binary files a/classlibsemigroups_1_1_matrix_over_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.map b/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.map deleted file mode 100644 index 168aa2daf..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.md5 b/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.md5 deleted file mode 100644 index 04b93c975..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -b0f6339d6037a8799daa49117fd10110 \ No newline at end of file diff --git a/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.png b/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.png deleted file mode 100644 index 8ef327e6a..000000000 Binary files a/classlibsemigroups_1_1_matrix_over_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.map b/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.map deleted file mode 100644 index 168aa2daf..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.md5 deleted file mode 100644 index 8f416c0a5..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -4306d84db25b7405dba6e0f252dc66f7 \ No newline at end of file diff --git a/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.png b/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.png deleted file mode 100644 index 8ef327e6a..000000000 Binary files a/classlibsemigroups_1_1_matrix_over_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base-members.html b/classlibsemigroups_1_1_matrix_over_semiring_base-members.html deleted file mode 100644 index da5586c24..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring_base-members.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass > Member List
-
-
- -

This is the complete list of members for libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< TValueType, TSubclass >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
begin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cend() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
complexity() const overridelibsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
degree() const overridelibsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
ElementWithVectorData(std::vector< TValueType > *vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
ElementWithVectorData(std::vector< TValueType > const &vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
ElementWithVectorData< TValueType, TSubclass > (defined in libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >)libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >friend
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inlinevirtual
MatrixOverSemiringBase(std::vector< TValueType > *matrix, Semiring< TValueType > const *semiring)libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inline
MatrixOverSemiringBase(std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inline
MatrixOverSemiringBase(std::vector< TValueType > *matrix)libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inlineexplicitprotected
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
redefine(Element const *x, Element const *y) overridelibsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inlinevirtual
libsemigroups::ElementWithVectorDataDefaultHash::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
semiring() constlibsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >inline
swap(Element *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base.html b/classlibsemigroups_1_1_matrix_over_semiring_base.html deleted file mode 100644 index 71a685001..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring_base.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Protected Member Functions | -Friends | -List of all members
-
-
libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass > Class Template Reference
-
-
- -

Matrices over a semiring. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >:
-
-
Inheritance graph
- - - - - - -
-
-Collaboration diagram for libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >:
-
-
Collaboration graph
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 MatrixOverSemiringBase (std::vector< TValueType > *matrix, Semiring< TValueType > const *semiring)
 A constructor. More...
 
 MatrixOverSemiringBase (std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)
 A constructor. More...
 
size_t complexity () const override
 Returns the approximate time complexity of multiplying two matrices. More...
 
size_t degree () const override
 Returns the dimension of the matrix. More...
 
Elementidentity () const override
 Returns the identity matrix with dimension of this. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
Semiring< TValueType > const * semiring () const
 Returns a pointer to the Semiring over which the matrix is defined. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > const &vector)
 A constructor. More...
 
TValueType at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< TValueType >::iterator begin () const
 Returns an iterator. More...
 
std::vector< TValueType >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< TValueType >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< TValueType >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
TValueType operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - - - - - -

-Protected Member Functions

 MatrixOverSemiringBase (std::vector< TValueType > *matrix)
 Constructs a MatrixOverSemiringBase with whose underlying semiring is not defined. The underlying semiring must be set by any class deriving from this one. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- - - -

-Friends

-class ElementWithVectorData< TValueType, TSubclass >
 
- - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
template<typename T >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
std::vector< TValueType > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename TValueType, class TSubclass>
-class libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >

- -

Matrices over a semiring.

-

This class is abstract since it does not implement all methods required by the Element class, it exists to provide common methods for its subclasses.

-

The template parameter TValueType is the type of the entries in the matrix, which must also be the type of the corresponding template parameter for the Semiring object used to define an instance of a MatrixOverSemiringBase.

-

The template parameter TSubclass is the type of a subclass of MatrixOverSemiringBase, and it is used so that it can be passed to ElementWithVectorData, whose method ElementWithVectorData::identity returns an instance of TSubclass.

-

Constructor & Destructor Documentation

- -

◆ MatrixOverSemiringBase() [1/3]

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::MatrixOverSemiringBase (std::vector< TValueType > * matrix,
Semiring< TValueType > const * semiring 
)
-
-inline
-
- -

A constructor.

-

Constructs a matrix defined by matrix, matrix is not copied, and should be deleted using ElementWithVectorData::really_delete.

-

The parameter matrix should be a vector of integer values of length \(n ^ 2\) for some integer \(n\), so that the value in position \(in + j\) is the entry in the \(i\)th row and \(j\)th column of the constructed matrix.

-

The parameter semiring should be a pointer to a Semiring, which is the semiring over which the matrix is defined.

-

This method asserts that the paramater semiring is not a nullptr, that the vector matrix has size a non-zero perfect square.

- -
-
- -

◆ MatrixOverSemiringBase() [2/3]

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::MatrixOverSemiringBase (std::vector< std::vector< TValueType >> const & matrix,
Semiring< TValueType > const * semiring 
)
-
-inline
-
- -

A constructor.

-

Constructs a matrix defined by matrix, which is copied into the constructed object.

-

The parameter matrix should be a vector of integer values of length \(n ^ 2\) for some integer \(n\), so that the value in position \(in + j\) is the entry in the \(i\)th row and \(j\)th column of the constructed matrix.

-

The parameter semiring should be a pointer to a Semiring, which is the semiring over which the matrix is defined.

-

This method asserts that the paramater semiring is not a nullptr, that the vector matrix is not empty, and that every vector contained in matrix has the same length as matrix.

-

Note that it is the responsibility of the caller to delete the parameter semiring, and that this should only be done after every MatrixOverSemiringBase object that was constructed using semiring has been deleted.

- -
-
- -

◆ MatrixOverSemiringBase() [3/3]

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::MatrixOverSemiringBase (std::vector< TValueType > * matrix)
-
-inlineexplicitprotected
-
- -

Constructs a MatrixOverSemiringBase with whose underlying semiring is not defined. The underlying semiring must be set by any class deriving from this one.

- -
-
-

Member Function Documentation

- -

◆ complexity()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
size_t libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::complexity () const
-
-inlineoverridevirtual
-
- -

Returns the approximate time complexity of multiplying two matrices.

-

The approximate time complexity of multiplying matrices is \(n ^ 3\) where \(n\) is the dimension of the matrix.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ degree()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
size_t libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::degree () const
-
-inlineoverridevirtual
-
- -

Returns the dimension of the matrix.

-

The dimension of a matrix is just the number of rows (or, equivalently columns).

- -

Implements libsemigroups::Element.

- -
-
- -

◆ identity()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
Element* libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::identity () const
-
-inlineoverridevirtual
-
- -

Returns the identity matrix with dimension of this.

-

This method returns a new matrix with dimension equal to that of this, where the main diagonal consists of the value Semiring::one and every other entry Semiring::zero.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ really_copy()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - -
Element* libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::really_copy (size_t increase_deg_by = 0) const
-
-inlineoverridevirtual
-
- -

Returns a pointer to a copy of this.

-

The parameter increase_deg_by must be 0, since it does not make sense to increase the degree of a matrix.

- -

Reimplemented from libsemigroups::ElementWithVectorData< TValueType, TSubclass >.

- -
-
- -

◆ redefine()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::redefine (Element const * x,
Element const * y 
)
-
-inlineoverridevirtual
-
- -

Multiply x and y and stores the result in this.

-

This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this. It does not currently verify that x, y, and this are defined over the same semiring.

- -

Reimplemented from libsemigroups::Element.

- -
-
- -

◆ semiring()

- -
-
-
-template<typename TValueType, class TSubclass>
- - - - - -
- - - - - - - -
Semiring<TValueType> const* libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >::semiring () const
-
-inline
-
- -

Returns a pointer to the Semiring over which the matrix is defined.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base.png b/classlibsemigroups_1_1_matrix_over_semiring_base.png deleted file mode 100644 index 6003e45bd..000000000 Binary files a/classlibsemigroups_1_1_matrix_over_semiring_base.png and /dev/null differ diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.map b/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.map deleted file mode 100644 index 73c501f92..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.md5 b/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.md5 deleted file mode 100644 index e0d9448e5..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -bbf4bdc23c1da51dd485175cbe45da05 \ No newline at end of file diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.png b/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.png deleted file mode 100644 index ce2a919a0..000000000 Binary files a/classlibsemigroups_1_1_matrix_over_semiring_base__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.map b/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.map deleted file mode 100644 index 73c501f92..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.md5 b/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.md5 deleted file mode 100644 index 7ce38f534..000000000 --- a/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8166ad336ea8908f982326a06be5b486 \ No newline at end of file diff --git a/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.png b/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.png deleted file mode 100644 index ce2a919a0..000000000 Binary files a/classlibsemigroups_1_1_matrix_over_semiring_base__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_max_plus_semiring-members.html b/classlibsemigroups_1_1_max_plus_semiring-members.html deleted file mode 100644 index 52910b3ba..000000000 --- a/classlibsemigroups_1_1_max_plus_semiring-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::MaxPlusSemiring Member List
-
-
- -

This is the complete list of members for libsemigroups::MaxPlusSemiring, including all inherited members.

- - - - - - - - - - -
INFTYlibsemigroups::Semiring< int64_t >static
MaxPlusSemiring() (defined in libsemigroups::MaxPlusSemiring)libsemigroups::MaxPlusSemiringinline
MINUS_INFTYlibsemigroups::Semiring< int64_t >static
one() const overridelibsemigroups::MaxPlusSemiringinlinevirtual
plus(int64_t x, int64_t y) const overridelibsemigroups::MaxPlusSemiringinlinevirtual
prod(int64_t x, int64_t y) const overridelibsemigroups::MaxPlusSemiringinlinevirtual
UNDEFINEDlibsemigroups::Semiring< int64_t >static
zero() const overridelibsemigroups::MaxPlusSemiringinlinevirtual
~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_max_plus_semiring.html b/classlibsemigroups_1_1_max_plus_semiring.html deleted file mode 100644 index cc7bd14c5..000000000 --- a/classlibsemigroups_1_1_max_plus_semiring.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::MaxPlusSemiring Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::MaxPlusSemiring Class Reference
-
-
- -

The max-plus semiring consists of the integers together with negative infinity with operations max and plus. Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY. - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::MaxPlusSemiring:
-
-
Inheritance graph
- - - - -
-
-Collaboration diagram for libsemigroups::MaxPlusSemiring:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

int64_t one () const override
 Returns the integer 0. More...
 
int64_t plus (int64_t x, int64_t y) const override
 Returns the maximum of x and y. More...
 
int64_t prod (int64_t x, int64_t y) const override
 Returns Semiring<int64_t>::MINUS_INFTY if x or y equals Semiring<int64_t>::MINUS_INFTY, otherwise returns x + y. More...
 
int64_t zero () const override
 Returns Semiring<int64_t>::MINUS_INFTY. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< int64_t >
virtual ~Semiring ()
 A default destructor. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< int64_t >
static const int64_t INFTY
 Value representing \(\infty\). More...
 
static const int64_t MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const int64_t UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

The max-plus semiring consists of the integers together with negative infinity with operations max and plus. Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY.

-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::MaxPlusSemiring::one () const
-
-inlineoverridevirtual
-
- -

Returns the integer 0.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ plus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::MaxPlusSemiring::plus (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns the maximum of x and y.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ prod()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::MaxPlusSemiring::prod (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns Semiring<int64_t>::MINUS_INFTY if x or y equals Semiring<int64_t>::MINUS_INFTY, otherwise returns x + y.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ zero()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::MaxPlusSemiring::zero () const
-
-inlineoverridevirtual
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_max_plus_semiring.png b/classlibsemigroups_1_1_max_plus_semiring.png deleted file mode 100644 index a2e21f4dd..000000000 Binary files a/classlibsemigroups_1_1_max_plus_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_max_plus_semiring__coll__graph.map b/classlibsemigroups_1_1_max_plus_semiring__coll__graph.map deleted file mode 100644 index 8ff6118ce..000000000 --- a/classlibsemigroups_1_1_max_plus_semiring__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_max_plus_semiring__coll__graph.md5 b/classlibsemigroups_1_1_max_plus_semiring__coll__graph.md5 deleted file mode 100644 index 8d381bbbe..000000000 --- a/classlibsemigroups_1_1_max_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -3ec488d2dc4497e2cb0aab95a7920c7a \ No newline at end of file diff --git a/classlibsemigroups_1_1_max_plus_semiring__coll__graph.png b/classlibsemigroups_1_1_max_plus_semiring__coll__graph.png deleted file mode 100644 index 1fbe5d7c3..000000000 Binary files a/classlibsemigroups_1_1_max_plus_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.map b/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.map deleted file mode 100644 index 8ff6118ce..000000000 --- a/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.md5 deleted file mode 100644 index be598d938..000000000 --- a/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -da59726c081965d49616f69e6eab4695 \ No newline at end of file diff --git a/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.png b/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.png deleted file mode 100644 index 1fbe5d7c3..000000000 Binary files a/classlibsemigroups_1_1_max_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_min_plus_semiring-members.html b/classlibsemigroups_1_1_min_plus_semiring-members.html deleted file mode 100644 index 94552fa42..000000000 --- a/classlibsemigroups_1_1_min_plus_semiring-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::MinPlusSemiring Member List
-
-
- -

This is the complete list of members for libsemigroups::MinPlusSemiring, including all inherited members.

- - - - - - - - - - -
INFTYlibsemigroups::Semiring< int64_t >static
MinPlusSemiring() (defined in libsemigroups::MinPlusSemiring)libsemigroups::MinPlusSemiringinline
MINUS_INFTYlibsemigroups::Semiring< int64_t >static
one() const overridelibsemigroups::MinPlusSemiringinlinevirtual
plus(int64_t x, int64_t y) const overridelibsemigroups::MinPlusSemiringinlinevirtual
prod(int64_t x, int64_t y) const overridelibsemigroups::MinPlusSemiringinlinevirtual
UNDEFINEDlibsemigroups::Semiring< int64_t >static
zero() const overridelibsemigroups::MinPlusSemiringinlinevirtual
~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_min_plus_semiring.html b/classlibsemigroups_1_1_min_plus_semiring.html deleted file mode 100644 index fdfab00ac..000000000 --- a/classlibsemigroups_1_1_min_plus_semiring.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::MinPlusSemiring Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::MinPlusSemiring Class Reference
-
-
- -

The min-plus semiring consists of the integers together with infinity with operations min and plus. Infinity is represented by Semiring<int64_t>::INFTY. - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::MinPlusSemiring:
-
-
Inheritance graph
- - - - -
-
-Collaboration diagram for libsemigroups::MinPlusSemiring:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

int64_t one () const override
 Returns the integer 0. More...
 
int64_t plus (int64_t x, int64_t y) const override
 Returns the minimum of x and y. More...
 
int64_t prod (int64_t x, int64_t y) const override
 Returns Semiring<int64_t>::INFTY if x or y equals Semiring<int64_t>::INFTY, otherwise returns x + y. More...
 
int64_t zero () const override
 Returns Semiring<int64_t>::INFTY. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< int64_t >
virtual ~Semiring ()
 A default destructor. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< int64_t >
static const int64_t INFTY
 Value representing \(\infty\). More...
 
static const int64_t MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const int64_t UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

The min-plus semiring consists of the integers together with infinity with operations min and plus. Infinity is represented by Semiring<int64_t>::INFTY.

-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::MinPlusSemiring::one () const
-
-inlineoverridevirtual
-
- -

Returns the integer 0.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ plus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::MinPlusSemiring::plus (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns the minimum of x and y.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ prod()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::MinPlusSemiring::prod (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns Semiring<int64_t>::INFTY if x or y equals Semiring<int64_t>::INFTY, otherwise returns x + y.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ zero()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::MinPlusSemiring::zero () const
-
-inlineoverridevirtual
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_min_plus_semiring.png b/classlibsemigroups_1_1_min_plus_semiring.png deleted file mode 100644 index 63c7d2b77..000000000 Binary files a/classlibsemigroups_1_1_min_plus_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_min_plus_semiring__coll__graph.map b/classlibsemigroups_1_1_min_plus_semiring__coll__graph.map deleted file mode 100644 index 1686589ed..000000000 --- a/classlibsemigroups_1_1_min_plus_semiring__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_min_plus_semiring__coll__graph.md5 b/classlibsemigroups_1_1_min_plus_semiring__coll__graph.md5 deleted file mode 100644 index 119939bd3..000000000 --- a/classlibsemigroups_1_1_min_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -0407a0ccc0a8736d2acb553cf48283bc \ No newline at end of file diff --git a/classlibsemigroups_1_1_min_plus_semiring__coll__graph.png b/classlibsemigroups_1_1_min_plus_semiring__coll__graph.png deleted file mode 100644 index e0ec00fa6..000000000 Binary files a/classlibsemigroups_1_1_min_plus_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.map b/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.map deleted file mode 100644 index 1686589ed..000000000 --- a/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.md5 deleted file mode 100644 index c35b80e98..000000000 --- a/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -f18e84b1eb5f13a0938f94e2797f3191 \ No newline at end of file diff --git a/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.png b/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.png deleted file mode 100644 index e0ec00fa6..000000000 Binary files a/classlibsemigroups_1_1_min_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_natural_semiring-members.html b/classlibsemigroups_1_1_natural_semiring-members.html deleted file mode 100644 index 1724bca6d..000000000 --- a/classlibsemigroups_1_1_natural_semiring-members.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::NaturalSemiring Member List
-
-
- -

This is the complete list of members for libsemigroups::NaturalSemiring, including all inherited members.

- - - - - - - - - - - - - -
INFTYlibsemigroups::Semiring< int64_t >static
MINUS_INFTYlibsemigroups::Semiring< int64_t >static
NaturalSemiring(int64_t t, int64_t p)libsemigroups::NaturalSemiringinline
one() const overridelibsemigroups::NaturalSemiringinlinevirtual
period() constlibsemigroups::NaturalSemiringinline
plus(int64_t x, int64_t y) const overridelibsemigroups::NaturalSemiringinlinevirtual
prod(int64_t x, int64_t y) const overridelibsemigroups::NaturalSemiringinlinevirtual
SemiringWithThreshold(int64_t threshold)libsemigroups::SemiringWithThresholdinlineexplicit
threshold() constlibsemigroups::SemiringWithThresholdinline
UNDEFINEDlibsemigroups::Semiring< int64_t >static
zero() const overridelibsemigroups::NaturalSemiringinlinevirtual
~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_natural_semiring.html b/classlibsemigroups_1_1_natural_semiring.html deleted file mode 100644 index 28bf8b59c..000000000 --- a/classlibsemigroups_1_1_natural_semiring.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::NaturalSemiring Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::NaturalSemiring Class Reference
-
-
- -

This class implements the semiring consisting of \(\{0, 1, ..., t, t + 1, ..., t + p - 1\}\) for some threshold \(t\) and period \(p\) with operations addition and multiplication modulo the congruence \(t = t + p\). - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::NaturalSemiring:
-
-
Inheritance graph
- - - - - -
-
-Collaboration diagram for libsemigroups::NaturalSemiring:
-
-
Collaboration graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 NaturalSemiring (int64_t t, int64_t p)
 Construct from threshold and period. More...
 
int64_t one () const override
 Return the integer 1. More...
 
int64_t period () const
 Returns the period of the semiring. More...
 
int64_t plus (int64_t x, int64_t y) const override
 Returns x + y modulo the congruence \(t = t + p\) where \(t\) and \(p\) are the threshold and period of the semiring, respectively. More...
 
int64_t prod (int64_t x, int64_t y) const override
 Returns x * y modulo the congruence \(t = t + p\) where \(t\) and \(p\) are the threshold and period of the semiring, respectively. More...
 
int64_t zero () const override
 Return the integer 0. More...
 
- Public Member Functions inherited from libsemigroups::SemiringWithThreshold
 SemiringWithThreshold (int64_t threshold)
 A class for semirings with a threshold. More...
 
int64_t threshold () const
 Returns the threshold of a semiring with threshold. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< int64_t >
virtual ~Semiring ()
 A default destructor. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< int64_t >
static const int64_t INFTY
 Value representing \(\infty\). More...
 
static const int64_t MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const int64_t UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

This class implements the semiring consisting of \(\{0, 1, ..., t, t + 1, ..., t + p - 1\}\) for some threshold \(t\) and period \(p\) with operations addition and multiplication modulo the congruence \(t = t + p\).

-

Constructor & Destructor Documentation

- -

◆ NaturalSemiring()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::NaturalSemiring::NaturalSemiring (int64_t t,
int64_t p 
)
-
-inline
-
- -

Construct from threshold and period.

-

This method constructs a semiring whose elements are \(\{0, 1, ..., t, t + 1, ..., t + p - 1\}\) with operations addition and multiplication modulo the congruence \(t = t + p\).

-

The parameter t should be greater than or equal to 0, and the parameter p must be strictly greater than 0, both which are asserted in the constructor.

- -
-
-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::NaturalSemiring::one () const
-
-inlineoverridevirtual
-
- -

Return the integer 1.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ period()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::NaturalSemiring::period () const
-
-inline
-
- -

Returns the period of the semiring.

- -
-
- -

◆ plus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::NaturalSemiring::plus (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns x + y modulo the congruence \(t = t + p\) where \(t\) and \(p\) are the threshold and period of the semiring, respectively.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ prod()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::NaturalSemiring::prod (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns x * y modulo the congruence \(t = t + p\) where \(t\) and \(p\) are the threshold and period of the semiring, respectively.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ zero()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::NaturalSemiring::zero () const
-
-inlineoverridevirtual
-
- -

Return the integer 0.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_natural_semiring.png b/classlibsemigroups_1_1_natural_semiring.png deleted file mode 100644 index 0e2261cd5..000000000 Binary files a/classlibsemigroups_1_1_natural_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_natural_semiring__coll__graph.map b/classlibsemigroups_1_1_natural_semiring__coll__graph.map deleted file mode 100644 index acd217348..000000000 --- a/classlibsemigroups_1_1_natural_semiring__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_natural_semiring__coll__graph.md5 b/classlibsemigroups_1_1_natural_semiring__coll__graph.md5 deleted file mode 100644 index 3dee6cc5c..000000000 --- a/classlibsemigroups_1_1_natural_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -5a16e89c6cab6a92e757b81f3e37d27d \ No newline at end of file diff --git a/classlibsemigroups_1_1_natural_semiring__coll__graph.png b/classlibsemigroups_1_1_natural_semiring__coll__graph.png deleted file mode 100644 index 5f08a76d0..000000000 Binary files a/classlibsemigroups_1_1_natural_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_natural_semiring__inherit__graph.map b/classlibsemigroups_1_1_natural_semiring__inherit__graph.map deleted file mode 100644 index acd217348..000000000 --- a/classlibsemigroups_1_1_natural_semiring__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_natural_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_natural_semiring__inherit__graph.md5 deleted file mode 100644 index b53207738..000000000 --- a/classlibsemigroups_1_1_natural_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -fd4e6971b8f46ea93c7c39284efd715d \ No newline at end of file diff --git a/classlibsemigroups_1_1_natural_semiring__inherit__graph.png b/classlibsemigroups_1_1_natural_semiring__inherit__graph.png deleted file mode 100644 index 5f08a76d0..000000000 Binary files a/classlibsemigroups_1_1_natural_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_p_b_r-members.html b/classlibsemigroups_1_1_p_b_r-members.html deleted file mode 100644 index 6c0a72a32..000000000 --- a/classlibsemigroups_1_1_p_b_r-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::PBR Member List
-
-
- -

This is the complete list of members for libsemigroups::PBR, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inline
begin() constlibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inline
cache_hash_value() const overridelibsemigroups::PBRprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inline
cend() constlibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inline
complexity() const overridelibsemigroups::PBRvirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlinevirtual
degree() const overridelibsemigroups::PBRvirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inline
ElementWithVectorData(std::vector< std::vector< u_int32_t > > *vector)libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlineexplicit
ElementWithVectorData(std::vector< std::vector< u_int32_t > > const &vector)libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::PBRvirtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlinevirtual
redefine(Element const *x, Element const *y, size_t const &thread_id) overridelibsemigroups::PBRvirtual
ElementWithVectorData< std::vector< u_int32_t >, PBR >::redefine(Element const *x, Element const *y)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlinevirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_p_b_r.html b/classlibsemigroups_1_1_p_b_r.html deleted file mode 100644 index c00488cba..000000000 --- a/classlibsemigroups_1_1_p_b_r.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::PBR Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Protected Member Functions | -List of all members
-
-
libsemigroups::PBR Class Reference
-
-
- -

Class for partitioned binary relations (PBR). - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::PBR:
-
-
Inheritance graph
- - - - - -
-
-Collaboration diagram for libsemigroups::PBR:
-
-
Collaboration graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

size_t complexity () const override
 Returns the approximate time complexity of multiplying PBRs. More...
 
size_t degree () const override
 Returns the degree of a PBR. More...
 
Elementidentity () const override
 Returns the identity PBR with degree equal to that of this. More...
 
void redefine (Element const *x, Element const *y, size_t const &thread_id) override
 Multiply x and y and stores the result in this. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< std::vector< u_int32_t > > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< std::vector< u_int32_t > > const &vector)
 A constructor. More...
 
std::vector< u_int32_t > at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< std::vector< u_int32_t > >::iterator begin () const
 Returns an iterator. More...
 
std::vector< std::vector< u_int32_t > >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< std::vector< u_int32_t > >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< std::vector< u_int32_t > >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
std::vector< u_int32_t > operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - -

-Protected Member Functions

void cache_hash_value () const override
 Calculate and cache a hash value. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >
std::vector< std::vector< u_int32_t > > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

Class for partitioned binary relations (PBR).

-

Partitioned binary relations (PBRs) are a generalisation of bipartitions, which were introduced by Martin and Mazorchuk.

-

Member Function Documentation

- -

◆ cache_hash_value()

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::PBR::cache_hash_value () const
-
-overrideprotectedvirtual
-
- -

Calculate and cache a hash value.

-

This method is used to compute and cache the hash value of this.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ complexity()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::PBR::complexity () const
-
-overridevirtual
-
- -

Returns the approximate time complexity of multiplying PBRs.

-

The approximate time complexity of multiplying PBRs is \(2n ^ 3\) where \(n\) is the degree.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ degree()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::PBR::degree () const
-
-overridevirtual
-
- -

Returns the degree of a PBR.

-

The degree of a PBR is half the number of points in the PBR, which is also half the length of the underlying vector ElementWithVectorData::_vector.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ identity()

- -
-
- - - - - -
- - - - - - - -
Element * libsemigroups::PBR::identity () const
-
-overridevirtual
-
- -

Returns the identity PBR with degree equal to that of this.

-

This method returns a new PBR with degree equal to the degree of this where every value is adjacent to its negative. Equivalently, \(i\) is adjacent \(i + n\) and vice versa for every \(i\) less than the degree \(n\).

- -

Implements libsemigroups::Element.

- -
-
- -

◆ redefine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void libsemigroups::PBR::redefine (Element const * x,
Element const * y,
size_t const & thread_id 
)
-
-overridevirtual
-
- -

Multiply x and y and stores the result in this.

-

This method redefines this to be the product of the parameters x and y. This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this.

-

The parameter thread_id is required since some temporary storage is required to find the product of x and y. Note that if different threads call this method with the same value of thread_id then bad things will happen.

- -

Reimplemented from libsemigroups::Element.

- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_p_b_r.png b/classlibsemigroups_1_1_p_b_r.png deleted file mode 100644 index 09d3b49f8..000000000 Binary files a/classlibsemigroups_1_1_p_b_r.png and /dev/null differ diff --git a/classlibsemigroups_1_1_p_b_r__coll__graph.map b/classlibsemigroups_1_1_p_b_r__coll__graph.map deleted file mode 100644 index 235767d4b..000000000 --- a/classlibsemigroups_1_1_p_b_r__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_p_b_r__coll__graph.md5 b/classlibsemigroups_1_1_p_b_r__coll__graph.md5 deleted file mode 100644 index 23de7f8f0..000000000 --- a/classlibsemigroups_1_1_p_b_r__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ec28b57c121f2d2286d45cf2cd4a7c2f \ No newline at end of file diff --git a/classlibsemigroups_1_1_p_b_r__coll__graph.png b/classlibsemigroups_1_1_p_b_r__coll__graph.png deleted file mode 100644 index 8145ff384..000000000 Binary files a/classlibsemigroups_1_1_p_b_r__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_p_b_r__inherit__graph.map b/classlibsemigroups_1_1_p_b_r__inherit__graph.map deleted file mode 100644 index 235767d4b..000000000 --- a/classlibsemigroups_1_1_p_b_r__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_p_b_r__inherit__graph.md5 b/classlibsemigroups_1_1_p_b_r__inherit__graph.md5 deleted file mode 100644 index f5caed52b..000000000 --- a/classlibsemigroups_1_1_p_b_r__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ee64b9bbebdf796edbcf272f6b68c720 \ No newline at end of file diff --git a/classlibsemigroups_1_1_p_b_r__inherit__graph.png b/classlibsemigroups_1_1_p_b_r__inherit__graph.png deleted file mode 100644 index 8145ff384..000000000 Binary files a/classlibsemigroups_1_1_p_b_r__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_p_perm-members.html b/classlibsemigroups_1_1_p_perm-members.html deleted file mode 100644 index 13e56258a..000000000 --- a/classlibsemigroups_1_1_p_perm-members.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::PPerm< TValueType, TContainer > Member List
-
-
- -

This is the complete list of members for libsemigroups::PPerm< TValueType, TContainer >, including all inherited members.

- - - - - - -
in_place_product(PPerm const &x, PPerm const &y) overridelibsemigroups::PPerm< TValueType, TContainer >inline
left_one() const (defined in libsemigroups::PPerm< TValueType, TContainer >)libsemigroups::PPerm< TValueType, TContainer >inline
PPerm(TContainer const &dom, TContainer const &ran, size_t deg)libsemigroups::PPerm< TValueType, TContainer >inline
PPerm(std::initializer_list< TValueType > dom, std::initializer_list< TValueType > ran, size_t deg)libsemigroups::PPerm< TValueType, TContainer >inline
right_one() const (defined in libsemigroups::PPerm< TValueType, TContainer >)libsemigroups::PPerm< TValueType, TContainer >inline
- - - - diff --git a/classlibsemigroups_1_1_p_perm.html b/classlibsemigroups_1_1_p_perm.html deleted file mode 100644 index 79844bd1a..000000000 --- a/classlibsemigroups_1_1_p_perm.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::PPerm< TValueType, TContainer > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::PPerm< TValueType, TContainer > Class Template Reference
-
-
- -

Template class for partial permutations. - More...

- -

#include <transf.hpp>

- -

Inherits libsemigroups::PTransf< TValueType, TContainer >.

- - - - - - - - - - - - - - - -

-Public Member Functions

 PPerm (TContainer const &dom, TContainer const &ran, size_t deg)
 A constructor. More...
 
 PPerm (std::initializer_list< TValueType > dom, std::initializer_list< TValueType > ran, size_t deg)
 A constructor. More...
 
void in_place_product (PPerm const &x, PPerm const &y) override
 Validates the data defining this. More...
 
-PPerm< TValueType > left_one () const
 
-PPerm< TValueType, TContainer > right_one () const
 
-

Detailed Description

-

template<typename TValueType, typename TContainer = std::vector<TValueType>>
-class libsemigroups::PPerm< TValueType, TContainer >

- -

Template class for partial permutations.

-

The value of the template parameter T can be used to reduce the amount of memory required by instances of this class; see PTransformation and ElementWithVectorData for more details.

-

A partial permutation \(f\) is just an injective partial transformation, which is stored as a vector of the images of \(\{0, 1, \ldots, n - 1\}\), i.e. i.e. \(\{(0)f, (1)f, \ldots, (n - 1)f\}\) where the value PTransformation::UNDEFINED is used to indicate that \((i)f\) is undefined (i.e. not among the points where \(f\) is defined).

-

Constructor & Destructor Documentation

- -

◆ PPerm() [1/2]

- -
-
-
-template<typename TValueType , typename TContainer = std::vector<TValueType>>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
libsemigroups::PPerm< TValueType, TContainer >::PPerm (TContainer const & dom,
TContainer const & ran,
size_t deg 
)
-
-inline
-
- -

A constructor.

-

Constructs a partial perm of degree deg such that

(dom[i])f =
ran[i]

for all i and which is undefined on every other value in the range 0 to (strictly less than deg). This method asserts that dom and ran have equal size and that deg is greater than to the maximum value in dom or ran.

- -
-
- -

◆ PPerm() [2/2]

- -
-
-
-template<typename TValueType , typename TContainer = std::vector<TValueType>>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
libsemigroups::PPerm< TValueType, TContainer >::PPerm (std::initializer_list< TValueType > dom,
std::initializer_list< TValueType > ran,
size_t deg 
)
-
-inline
-
- -

A constructor.

-

Constructs vectors from dom and ran and uses the constructor above.

- -
-
-

Member Function Documentation

- -

◆ in_place_product()

- -
-
-
-template<typename TValueType , typename TContainer = std::vector<TValueType>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::PPerm< TValueType, TContainer >::in_place_product (PPerm< TValueType, TContainer > const & x,
PPerm< TValueType, TContainer > const & y 
)
-
-inlineoverride
-
- -

Validates the data defining this.

-

This method throws a LIBSEMIGROUPS_EXCEPTION if any value of this is out of bounds (i.e. greater than or equal to this->degree()), and not equal to PPerm::UNDEFINED), or if any image appears more than once. Multiply x and y and stores the result in this.

-

See Element::redefine for more details about this method.

-

This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_partial_perm-members.html b/classlibsemigroups_1_1_partial_perm-members.html deleted file mode 100644 index f7b531140..000000000 --- a/classlibsemigroups_1_1_partial_perm-members.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::PartialPerm< T > Member List
-
-
- -

This is the complete list of members for libsemigroups::PartialPerm< T >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< T, PartialPerm< T > >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inline
begin() constlibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inline
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< T, PartialPerm< T > >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inline
cend() constlibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inline
complexity() const overridelibsemigroups::PartialTransformation< T, PartialPerm< T > >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inlinevirtual
crank() constlibsemigroups::PartialPerm< T >inline
degree() const overridelibsemigroups::PartialTransformation< T, PartialPerm< T > >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< T, PartialPerm< T > >inline
ElementWithVectorData(std::vector< T > *vector)libsemigroups::ElementWithVectorData< T, PartialPerm< T > >inlineexplicit
ElementWithVectorData(std::vector< T > const &vector)libsemigroups::ElementWithVectorData< T, PartialPerm< T > >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::PartialTransformation< T, PartialPerm< T > >inlinevirtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(const Element &that) const overridelibsemigroups::PartialPerm< T >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inline
PartialPerm(std::vector< T > const &dom, std::vector< T > const &ran, size_t deg)libsemigroups::PartialPerm< T >inlineexplicit
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::PartialPerm< T >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inlinevirtual
redefine(Element const *x, Element const *y) overridelibsemigroups::PartialPerm< T >inlinevirtual
PartialTransformation< T, PartialPerm< T > >::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::ElementWithVectorData< T, PartialPerm< T > >inlinevirtual
UNDEFINEDlibsemigroups::PartialTransformation< T, PartialPerm< T > >static
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< T, PartialPerm< T > >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_partial_perm.html b/classlibsemigroups_1_1_partial_perm.html deleted file mode 100644 index cc4637bc3..000000000 --- a/classlibsemigroups_1_1_partial_perm.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::PartialPerm< T > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::PartialPerm< T > Class Template Reference
-
-
- -

Template class for partial permutations. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::PartialPerm< T >:
-
-
Inheritance graph
- - - - - - - -
-
-Collaboration diagram for libsemigroups::PartialPerm< T >:
-
-
Collaboration graph
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 PartialPerm (std::vector< T > const &dom, std::vector< T > const &ran, size_t deg)
 A constructor. More...
 
size_t crank () const
 Returns the rank of a partial permutation. More...
 
bool operator< (const Element &that) const override
 Returns true if this is less than that. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
- Public Member Functions inherited from libsemigroups::PartialTransformation< T, PartialPerm< T > >
size_t complexity () const override
 Returns the approximate time complexity of multiplying two partial transformations. More...
 
size_t crank () const
 Returns the rank of a partial transformation. More...
 
size_t degree () const override
 Returns the degree of a partial transformation. More...
 
Elementidentity () const override
 Returns the identity transformation with degrees of this. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< T, PartialPerm< T > >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< T > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< T > const &vector)
 A constructor. More...
 
at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< T >::iterator begin () const
 Returns an iterator. More...
 
std::vector< T >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< T >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< T >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Static Public Attributes inherited from libsemigroups::PartialTransformation< T, PartialPerm< T > >
static T const UNDEFINED
 Undefined image value. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< T, PartialPerm< T > >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< T, PartialPerm< T > >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< T, PartialPerm< T > >
std::vector< T > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename T>
-class libsemigroups::PartialPerm< T >

- -

Template class for partial permutations.

-

The value of the template parameter T can be used to reduce the ! amount ! of memory required by instances of this class; see PartialTransformation ! and ElementWithVectorData for more details.

-

A partial permutation \(f\) is just an injective partial transformation, which is stored as a vector of the images of \(\{0, 1, \ldots, n - 1\}\), i.e. i.e. \(\{(0)f, (1)f, \ldots, (n - 1)f\}\) where the value PartialTransformation::UNDEFINED is used to indicate that \((i)f\) is undefined (i.e. not among the points where \(f\) is defined).

-

Constructor & Destructor Documentation

- -

◆ PartialPerm()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
libsemigroups::PartialPerm< T >::PartialPerm (std::vector< T > const & dom,
std::vector< T > const & ran,
size_t deg 
)
-
-inlineexplicit
-
- -

A constructor.

-

Constructs a partial perm of degree deg such that

(dom[i])f =
ran[i]

for all i and which is undefined on every other value in the range 0 to (strictly less than deg). This method asserts that dom and ran have equal size and that deg is greater than or equal to the maximum value in dom or ran.

- -
-
-

Member Function Documentation

- -

◆ crank()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - -
size_t libsemigroups::PartialPerm< T >::crank () const
-
-inline
-
- -

Returns the rank of a partial permutation.

-

The rank of a partial permutation is the number of its distinct image values, not including PartialTransformation::UNDEFINED. This method involves slightly less work than PartialTransformation::crank since a partial permutation is injective, and so every image value occurs precisely once. This method recomputes the return value every time it is called.

- -
-
- -

◆ operator<()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
bool libsemigroups::PartialPerm< T >::operator< (const Elementthat) const
-
-inlineoverridevirtual
-
- -

Returns true if this is less than that.

-

This defines a total order on partial permutations that is equivalent to that used by GAP. It is not short-lex on the list of images.

-

Returns true if something complicated is true and false if it is not.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ really_copy()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
Element* libsemigroups::PartialPerm< T >::really_copy (size_t increase_deg_by = 0) const
-
-inlineoverridevirtual
-
- -

Returns a pointer to a copy of this.

-

See Element::really_copy for more details about this method.

-

The copy returned by this method is undefined on all the values between the PartialPerm::degree of this and increase_deg_by.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ redefine()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::PartialPerm< T >::redefine (Element const * x,
Element const * y 
)
-
-inlineoverridevirtual
-
- -

Multiply x and y and stores the result in this.

-

See Element::redefine for more details about this method.

-

This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this.

- -

Reimplemented from libsemigroups::Element.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_partial_perm.png b/classlibsemigroups_1_1_partial_perm.png deleted file mode 100644 index 5dfd40d5d..000000000 Binary files a/classlibsemigroups_1_1_partial_perm.png and /dev/null differ diff --git a/classlibsemigroups_1_1_partial_perm__coll__graph.map b/classlibsemigroups_1_1_partial_perm__coll__graph.map deleted file mode 100644 index 5204548dc..000000000 --- a/classlibsemigroups_1_1_partial_perm__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_partial_perm__coll__graph.md5 b/classlibsemigroups_1_1_partial_perm__coll__graph.md5 deleted file mode 100644 index 688595f8b..000000000 --- a/classlibsemigroups_1_1_partial_perm__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -f90da6d505b48aaad13cf31daa5ab2af \ No newline at end of file diff --git a/classlibsemigroups_1_1_partial_perm__coll__graph.png b/classlibsemigroups_1_1_partial_perm__coll__graph.png deleted file mode 100644 index c895957a7..000000000 Binary files a/classlibsemigroups_1_1_partial_perm__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_partial_perm__inherit__graph.map b/classlibsemigroups_1_1_partial_perm__inherit__graph.map deleted file mode 100644 index 5204548dc..000000000 --- a/classlibsemigroups_1_1_partial_perm__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_partial_perm__inherit__graph.md5 b/classlibsemigroups_1_1_partial_perm__inherit__graph.md5 deleted file mode 100644 index efe5c2d81..000000000 --- a/classlibsemigroups_1_1_partial_perm__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8879a56776d73159be73819370e2748b \ No newline at end of file diff --git a/classlibsemigroups_1_1_partial_perm__inherit__graph.png b/classlibsemigroups_1_1_partial_perm__inherit__graph.png deleted file mode 100644 index c895957a7..000000000 Binary files a/classlibsemigroups_1_1_partial_perm__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_partial_transformation-members.html b/classlibsemigroups_1_1_partial_transformation-members.html deleted file mode 100644 index 23ad66b34..000000000 --- a/classlibsemigroups_1_1_partial_transformation-members.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::PartialTransformation< TValueType, TSubclass > Member List
-
-
- -

This is the complete list of members for libsemigroups::PartialTransformation< TValueType, TSubclass >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< TValueType, TSubclass >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
begin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
cend() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
complexity() const overridelibsemigroups::PartialTransformation< TValueType, TSubclass >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
crank() constlibsemigroups::PartialTransformation< TValueType, TSubclass >inline
degree() const overridelibsemigroups::PartialTransformation< TValueType, TSubclass >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
ElementWithVectorData(std::vector< TValueType > *vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
ElementWithVectorData(std::vector< TValueType > const &vector)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::PartialTransformation< TValueType, TSubclass >inlinevirtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< TValueType, TSubclass >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
redefine(Element const *x, Element const *y)libsemigroups::Elementinlinevirtual
redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::ElementWithVectorData< TValueType, TSubclass >inlinevirtual
UNDEFINEDlibsemigroups::PartialTransformation< TValueType, TSubclass >static
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< TValueType, TSubclass >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_partial_transformation.html b/classlibsemigroups_1_1_partial_transformation.html deleted file mode 100644 index fbcc8b1f1..000000000 --- a/classlibsemigroups_1_1_partial_transformation.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::PartialTransformation< TValueType, TSubclass > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Static Public Attributes | -List of all members
-
-
libsemigroups::PartialTransformation< TValueType, TSubclass > Class Template Reference
-
-
- -

Abstract class for partial transformations. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::PartialTransformation< TValueType, TSubclass >:
-
-
Inheritance graph
- - - - - - -
-
-Collaboration diagram for libsemigroups::PartialTransformation< TValueType, TSubclass >:
-
-
Collaboration graph
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

size_t complexity () const override
 Returns the approximate time complexity of multiplying two partial transformations. More...
 
size_t crank () const
 Returns the rank of a partial transformation. More...
 
size_t degree () const override
 Returns the degree of a partial transformation. More...
 
Elementidentity () const override
 Returns the identity transformation with degrees of this. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< TValueType > const &vector)
 A constructor. More...
 
TValueType at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< TValueType >::iterator begin () const
 Returns an iterator. More...
 
std::vector< TValueType >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< TValueType >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< TValueType >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
TValueType operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y)
 Multiplies x and y and stores the result in this. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - - -

-Static Public Attributes

static TValueType const UNDEFINED = std::numeric_limits<TValueType>::max()
 Undefined image value. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
template<typename T >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< TValueType, TSubclass >
std::vector< TValueType > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename TValueType, typename TSubclass>
-class libsemigroups::PartialTransformation< TValueType, TSubclass >

- -

Abstract class for partial transformations.

-

This is a template class for partial transformations, which is a subclass of ElementWithVectorDataDefaultHash. For example, Transformation<u_int128_t> is a subclass of PartialTransformation<u_int128_t, Transformation<u_int128_t>>.

-

The template parameter TValueType is the type of image values, i.e. u_int16_t, and so on. The value of the template parameter S can be used to reduce (or increase) the amount of memory required by instances of this class.

-

The template parameter TSubclass is the subclass of PartialTransformation used by the PartialTransformation::identity method to construct an identity, so that the return value of the method PartialTransformation::identity is of type TSubclass instead of type PartialTransformation.

-

This class is abstract since it does not implement all methods required by the Element class, it exists to provide common methods for its subclasses.

-

A partial transformation \(f\) is just a function defined on a subset of \(\{0, 1, \ldots, n - 1\}\) for some integer \(n\) called the degree of f. A partial transformation is stored as a vector of the images of \(\{0, 1, \ldots, n -1\}\), i.e. \(\{(0)f, (1)f, \ldots, (n - 1)f\}\) where the value PartialTransformation::UNDEFINED is used to indicate that \((i)f\) is, you guessed it, undefined (i.e. not among the points where \(f\) is defined).

-

Member Function Documentation

- -

◆ complexity()

- -
-
-
-template<typename TValueType, typename TSubclass>
- - - - - -
- - - - - - - -
size_t libsemigroups::PartialTransformation< TValueType, TSubclass >::complexity () const
-
-inlineoverridevirtual
-
- -

Returns the approximate time complexity of multiplying two partial transformations.

-

The approximate time complexity of multiplying partial transformations is just their degree.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ crank()

- -
-
-
-template<typename TValueType, typename TSubclass>
- - - - - -
- - - - - - - -
size_t libsemigroups::PartialTransformation< TValueType, TSubclass >::crank () const
-
-inline
-
- -

Returns the rank of a partial transformation.

-

The rank of a partial transformation is the number of its distinct image values, not including PartialTransformation::UNDEFINED. This method recomputes the return value every time it is called.

- -
-
- -

◆ degree()

- -
-
-
-template<typename TValueType, typename TSubclass>
- - - - - -
- - - - - - - -
size_t libsemigroups::PartialTransformation< TValueType, TSubclass >::degree () const
-
-inlineoverridevirtual
-
- -

Returns the degree of a partial transformation.

-

The degree of a partial transformation is the number of points used in its definition, which is equal to the size of ElementWithVectorData::_vector.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ identity()

- -
-
-
-template<typename TValueType, typename TSubclass>
- - - - - -
- - - - - - - -
Element* libsemigroups::PartialTransformation< TValueType, TSubclass >::identity () const
-
-inlineoverridevirtual
-
- -

Returns the identity transformation with degrees of this.

-

This method returns a new partial transformation with degree equal to the degree of this that fixes every value from 0 to the degree of this.

- -

Implements libsemigroups::Element.

- -
-
-

Member Data Documentation

- -

◆ UNDEFINED

- -
-
-
-template<typename TValueType, typename TSubclass>
- - - - - -
- - - - -
TValueType const libsemigroups::PartialTransformation< TValueType, TSubclass >::UNDEFINED = std::numeric_limits<TValueType>::max()
-
-static
-
- -

Undefined image value.

-

This value is used to indicate that a partial transformation is not defined on a value.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_partial_transformation.png b/classlibsemigroups_1_1_partial_transformation.png deleted file mode 100644 index 6bd334049..000000000 Binary files a/classlibsemigroups_1_1_partial_transformation.png and /dev/null differ diff --git a/classlibsemigroups_1_1_partial_transformation__coll__graph.map b/classlibsemigroups_1_1_partial_transformation__coll__graph.map deleted file mode 100644 index 6ae3ef35f..000000000 --- a/classlibsemigroups_1_1_partial_transformation__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/classlibsemigroups_1_1_partial_transformation__coll__graph.md5 b/classlibsemigroups_1_1_partial_transformation__coll__graph.md5 deleted file mode 100644 index 58f2220b9..000000000 --- a/classlibsemigroups_1_1_partial_transformation__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -9d51d7d16f7cbf75058f33cd33b42b5b \ No newline at end of file diff --git a/classlibsemigroups_1_1_partial_transformation__coll__graph.png b/classlibsemigroups_1_1_partial_transformation__coll__graph.png deleted file mode 100644 index 041397d38..000000000 Binary files a/classlibsemigroups_1_1_partial_transformation__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_partial_transformation__inherit__graph.map b/classlibsemigroups_1_1_partial_transformation__inherit__graph.map deleted file mode 100644 index 6ae3ef35f..000000000 --- a/classlibsemigroups_1_1_partial_transformation__inherit__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/classlibsemigroups_1_1_partial_transformation__inherit__graph.md5 b/classlibsemigroups_1_1_partial_transformation__inherit__graph.md5 deleted file mode 100644 index f8a2e02de..000000000 --- a/classlibsemigroups_1_1_partial_transformation__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -586e4d23df9b533106e46ce83fa07c41 \ No newline at end of file diff --git a/classlibsemigroups_1_1_partial_transformation__inherit__graph.png b/classlibsemigroups_1_1_partial_transformation__inherit__graph.png deleted file mode 100644 index 041397d38..000000000 Binary files a/classlibsemigroups_1_1_partial_transformation__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_partition-members.html b/classlibsemigroups_1_1_partition-members.html deleted file mode 100644 index 1b4589ff8..000000000 --- a/classlibsemigroups_1_1_partition-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Partition< T > Member List
-
-
- -

This is the complete list of members for libsemigroups::Partition< T >, including all inherited members.

- - - - - - - - - - -
at(size_t part_index) constlibsemigroups::Partition< T >inline
at(size_t part_index, size_t elm_nr) constlibsemigroups::Partition< T >inline
operator=(Partition const &part)=deletelibsemigroups::Partition< T >
operator[](size_t part_index) constlibsemigroups::Partition< T >inline
Partition(size_t nr_parts=0)libsemigroups::Partition< T >inlineexplicit
Partition(std::vector< std::vector< T * > * > *parts)libsemigroups::Partition< T >inlineexplicit
Partition(Partition const &copy)=deletelibsemigroups::Partition< T >
size() constlibsemigroups::Partition< T >inline
~Partition()libsemigroups::Partition< T >inline
- - - - diff --git a/classlibsemigroups_1_1_partition.html b/classlibsemigroups_1_1_partition.html deleted file mode 100644 index e4d66a255..000000000 --- a/classlibsemigroups_1_1_partition.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Partition< T > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::Partition< T > Class Template Reference
-
-
- -

Class for partitions of a set used by Congruence::nontrivial_classes. - More...

- -

#include <partition.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Partition (size_t nr_parts=0)
 A constructor. More...
 
 Partition (std::vector< std::vector< T * > * > *parts)
 A constructor. More...
 
 Partition (Partition const &copy)=delete
 The copy constructor is deleted for Partition to avoid unintended copying. More...
 
 ~Partition ()
 A default destructor. More...
 
std::vector< T * > * at (size_t part_index) const
 Returns the part with index part_index. More...
 
T * at (size_t part_index, size_t elm_nr) const
 Returns the element with index elm_nr in part part_index. More...
 
Partitionoperator= (Partition const &part)=delete
 The assignment operator is deleted for Partition to avoid unintended copying. More...
 
std::vector< T * > * operator[] (size_t part_index) const
 Returns the part with index part_index. More...
 
size_t size () const
 Returns the number of parts in the partition. More...
 
-

Detailed Description

-

template<typename T>
-class libsemigroups::Partition< T >

- -

Class for partitions of a set used by Congruence::nontrivial_classes.

-

This class is for representing a partition of a set, i.e. an equivalence relation on that set. The template parameter T is the type of objects, pointers to which are stored in the partition.

-

Constructor & Destructor Documentation

- -

◆ Partition() [1/3]

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
libsemigroups::Partition< T >::Partition (size_t nr_parts = 0)
-
-inlineexplicit
-
- -

A constructor.

-

This constructor returns a partition with nr_parts empty parts.

- -
-
- -

◆ Partition() [2/3]

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
libsemigroups::Partition< T >::Partition (std::vector< std::vector< T * > * > * parts)
-
-inlineexplicit
-
- -

A constructor.

-

This constructor returns the Partition defined by the given vector, which is not copied, and is deleted by the destructor of this class.

- -
-
- -

◆ ~Partition()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - -
libsemigroups::Partition< T >::~Partition ()
-
-inline
-
- -

A default destructor.

-

Deletes the vector and all of its contents passed to the constructor, if any.

- -
-
- -

◆ Partition() [3/3]

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
libsemigroups::Partition< T >::Partition (Partition< T > const & copy)
-
-delete
-
- -

The copy constructor is deleted for Partition to avoid unintended copying.

- -
-
-

Member Function Documentation

- -

◆ at() [1/2]

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
std::vector<T*>* libsemigroups::Partition< T >::at (size_t part_index) const
-
-inline
-
- -

Returns the part with index part_index.

-

This uses the at method of the underlying std::vector, and so performs out-of-bounds checks.

- -
-
- -

◆ at() [2/2]

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - - - - - - - - - - - -
T* libsemigroups::Partition< T >::at (size_t part_index,
size_t elm_nr 
) const
-
-inline
-
- -

Returns the element with index elm_nr in part part_index.

- -
-
- -

◆ operator=()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
Partition& libsemigroups::Partition< T >::operator= (Partition< T > const & part)
-
-delete
-
- -

The assignment operator is deleted for Partition to avoid unintended copying.

- -
-
- -

◆ operator[]()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
std::vector<T*>* libsemigroups::Partition< T >::operator[] (size_t part_index) const
-
-inline
-
- -

Returns the part with index part_index.

-

This method asserts that the parameter part_index is less than the number of parts.

- -
-
- -

◆ size()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - -
size_t libsemigroups::Partition< T >::size () const
-
-inline
-
- -

Returns the number of parts in the partition.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_perm-members.html b/classlibsemigroups_1_1_perm-members.html deleted file mode 100644 index d8d254cc9..000000000 --- a/classlibsemigroups_1_1_perm-members.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Perm< TValueType, TContainer > Member List
-
-
- -

This is the complete list of members for libsemigroups::Perm< TValueType, TContainer >, including all inherited members.

- - - -
in_place_product(Transf const &x, Transf const &y)libsemigroups::Transf< TValueType, TContainer >inline
inverse() constlibsemigroups::Perm< TValueType, TContainer >inline
- - - - diff --git a/classlibsemigroups_1_1_perm.html b/classlibsemigroups_1_1_perm.html deleted file mode 100644 index 873008fd1..000000000 --- a/classlibsemigroups_1_1_perm.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Perm< TValueType, TContainer > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::Perm< TValueType, TContainer > Class Template Reference
-
-
- -

Template class for permutations. - More...

- -

#include <transf.hpp>

-
-Inheritance diagram for libsemigroups::Perm< TValueType, TContainer >:
-
-
Inheritance graph
- - - -
[legend]
-
-Collaboration diagram for libsemigroups::Perm< TValueType, TContainer >:
-
-
Collaboration graph
- - - -
[legend]
- - - - - - - - - -

-Public Member Functions

Perm inverse () const
 Validates the data defining this. More...
 
- Public Member Functions inherited from libsemigroups::Transf< TValueType, TContainer >
void in_place_product (Transf const &x, Transf const &y)
 Multiply x and y and stores the result in this. More...
 
-

Detailed Description

-

template<typename TValueType, typename TContainer>
-class libsemigroups::Perm< TValueType, TContainer >

- -

Template class for permutations.

-

The value of the template parameter T can be used to reduce the amount of memory required by instances of this class; see PTransfformation and ElementWithVectorData for more details.

-

A permutation \(f\) is an injective transformation defined on the whole of \(\{0, 1, \ldots, n - 1\}\) for some integer \(n\) called the degree of \(f\). A permutation is stored as a vector of the images of \((0, 1, \ldots, n - 1)\), i.e. \(((0)f, (1)f, \ldots, (n - 1)f)\).

-

Member Function Documentation

- -

◆ inverse()

- -
-
-
-template<typename TValueType , typename TContainer >
- - - - - -
- - - - - - - -
Perm libsemigroups::Perm< TValueType, TContainer >::inverse () const
-
-inline
-
- -

Validates the data defining this.

-

This method throws a LIBSEMIGROUPS_EXCEPTION if any value of this is out of bounds (i.e. greater than or equal to this->degree()), or if any image appears more than once. Returns the inverse of a permutation.

-

The inverse of a permutation \(f\) is the permutation \(g\) such that \(fg = gf\) is the identity permutation of degree \(n\).

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_perm__coll__graph.map b/classlibsemigroups_1_1_perm__coll__graph.map deleted file mode 100644 index e6e5a6713..000000000 --- a/classlibsemigroups_1_1_perm__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/classlibsemigroups_1_1_perm__coll__graph.md5 b/classlibsemigroups_1_1_perm__coll__graph.md5 deleted file mode 100644 index 0e5e8bec2..000000000 --- a/classlibsemigroups_1_1_perm__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -fbbb7b9d24b4ce6d3c00a5c3edbc8db9 \ No newline at end of file diff --git a/classlibsemigroups_1_1_perm__coll__graph.png b/classlibsemigroups_1_1_perm__coll__graph.png deleted file mode 100644 index bca673842..000000000 Binary files a/classlibsemigroups_1_1_perm__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_perm__inherit__graph.map b/classlibsemigroups_1_1_perm__inherit__graph.map deleted file mode 100644 index e6e5a6713..000000000 --- a/classlibsemigroups_1_1_perm__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/classlibsemigroups_1_1_perm__inherit__graph.md5 b/classlibsemigroups_1_1_perm__inherit__graph.md5 deleted file mode 100644 index cdc2f2e26..000000000 --- a/classlibsemigroups_1_1_perm__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e00b89fa36db185f37528c715ec6f33e \ No newline at end of file diff --git a/classlibsemigroups_1_1_perm__inherit__graph.png b/classlibsemigroups_1_1_perm__inherit__graph.png deleted file mode 100644 index bca673842..000000000 Binary files a/classlibsemigroups_1_1_perm__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_permutation-members.html b/classlibsemigroups_1_1_permutation-members.html deleted file mode 100644 index 647dabd12..000000000 --- a/classlibsemigroups_1_1_permutation-members.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Permutation< T > Member List
-
-
- -

This is the complete list of members for libsemigroups::Permutation< T >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< T, Transformation< T > >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
begin() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
cache_hash_value() const overridelibsemigroups::Transformation< T >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
cend() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
complexity() const overridelibsemigroups::PartialTransformation< T, Transformation< T > >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
crank() constlibsemigroups::PartialTransformation< T, Transformation< T > >inline
degree() const overridelibsemigroups::PartialTransformation< T, Transformation< T > >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< T, Transformation< T > >inline
ElementWithVectorData(std::vector< T > *vector)libsemigroups::ElementWithVectorData< T, Transformation< T > >inlineexplicit
ElementWithVectorData(std::vector< T > const &vector)libsemigroups::ElementWithVectorData< T, Transformation< T > >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::PartialTransformation< T, Transformation< T > >inlinevirtual
inverse()libsemigroups::Permutation< T >inline
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::Transformation< T >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
redefine(Element const *x, Element const *y) overridelibsemigroups::Transformation< T >inlinevirtual
PartialTransformation< T, Transformation< T > >::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
UNDEFINEDlibsemigroups::PartialTransformation< T, Transformation< T > >static
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< T, Transformation< T > >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_permutation.html b/classlibsemigroups_1_1_permutation.html deleted file mode 100644 index c060ba8d7..000000000 --- a/classlibsemigroups_1_1_permutation.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Permutation< T > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::Permutation< T > Class Template Reference
-
-
- -

Template class for permutations. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::Permutation< T >:
-
-
Inheritance graph
- - - - - - - - -
-
-Collaboration diagram for libsemigroups::Permutation< T >:
-
-
Collaboration graph
- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

Permutationinverse ()
 Returns the inverse of a permutation. More...
 
- Public Member Functions inherited from libsemigroups::Transformation< T >
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
- Public Member Functions inherited from libsemigroups::PartialTransformation< T, Transformation< T > >
size_t complexity () const override
 Returns the approximate time complexity of multiplying two partial transformations. More...
 
size_t crank () const
 Returns the rank of a partial transformation. More...
 
size_t degree () const override
 Returns the degree of a partial transformation. More...
 
Elementidentity () const override
 Returns the identity transformation with degrees of this. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< T, Transformation< T > >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< T > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< T > const &vector)
 A constructor. More...
 
at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< T >::iterator begin () const
 Returns an iterator. More...
 
std::vector< T >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< T >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< T >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Static Public Attributes inherited from libsemigroups::PartialTransformation< T, Transformation< T > >
static T const UNDEFINED
 Undefined image value. More...
 
- Protected Member Functions inherited from libsemigroups::Transformation< T >
void cache_hash_value () const override
 This method is included because it seems to give superior performance in some benchmarks. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< T, Transformation< T > >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< T, Transformation< T > >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< T, Transformation< T > >
std::vector< T > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename T>
-class libsemigroups::Permutation< T >

- -

Template class for permutations.

-

The value of the template parameter T can be used to reduce the amount of memory required by instances of this class; see PartialTransformation and ElementWithVectorData for more details.

-

A permutation \(f\) is an injective transformation defined on the whole of \(\{0, 1, \ldots, n - 1\}\) for some integer \(n\) called the degree of \(f\). A permutation is stored as a vector of the images of \((0, 1, \ldots, n - 1)\), i.e. \(((0)f, (1)f, \ldots, (n - 1)f)\).

-

Member Function Documentation

- -

◆ inverse()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
Permutation* libsemigroups::Permutation< T >::inverse ()
-
-inline
-
- -

Returns the inverse of a permutation.

-

The inverse of a permutation \(f\) is the permutation \(g\) such that \(fg = gf\) is the identity permutation of degree \(n\).

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_permutation__coll__graph.map b/classlibsemigroups_1_1_permutation__coll__graph.map deleted file mode 100644 index d6b06ed44..000000000 --- a/classlibsemigroups_1_1_permutation__coll__graph.map +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/classlibsemigroups_1_1_permutation__coll__graph.md5 b/classlibsemigroups_1_1_permutation__coll__graph.md5 deleted file mode 100644 index 1448cea4c..000000000 --- a/classlibsemigroups_1_1_permutation__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -6808973df3cb24233940af64b36f62b9 \ No newline at end of file diff --git a/classlibsemigroups_1_1_permutation__coll__graph.png b/classlibsemigroups_1_1_permutation__coll__graph.png deleted file mode 100644 index 4aebab0ce..000000000 Binary files a/classlibsemigroups_1_1_permutation__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_permutation__inherit__graph.map b/classlibsemigroups_1_1_permutation__inherit__graph.map deleted file mode 100644 index d6b06ed44..000000000 --- a/classlibsemigroups_1_1_permutation__inherit__graph.map +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/classlibsemigroups_1_1_permutation__inherit__graph.md5 b/classlibsemigroups_1_1_permutation__inherit__graph.md5 deleted file mode 100644 index 3b7b4714e..000000000 --- a/classlibsemigroups_1_1_permutation__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -3f213adb77098adc924270e499c903a5 \ No newline at end of file diff --git a/classlibsemigroups_1_1_permutation__inherit__graph.png b/classlibsemigroups_1_1_permutation__inherit__graph.png deleted file mode 100644 index 4aebab0ce..000000000 Binary files a/classlibsemigroups_1_1_permutation__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix-members.html b/classlibsemigroups_1_1_projective_max_plus_matrix-members.html deleted file mode 100644 index 64b65a433..000000000 --- a/classlibsemigroups_1_1_projective_max_plus_matrix-members.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::ProjectiveMaxPlusMatrix Member List
-
-
- -

This is the complete list of members for libsemigroups::ProjectiveMaxPlusMatrix, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inline
begin() constlibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inline
cache_hash_value() const overridelibsemigroups::ElementWithVectorDataDefaultHash< int64_t, ProjectiveMaxPlusMatrix >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inline
cend() constlibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inline
complexity() const overridelibsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
degree() const overridelibsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inline
ElementWithVectorData(std::vector< int64_t > *vector)libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlineexplicit
ElementWithVectorData(std::vector< int64_t > const &vector)libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlineexplicit
ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix > (defined in libsemigroups::ProjectiveMaxPlusMatrix)libsemigroups::ProjectiveMaxPlusMatrixfriend
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
MatrixOverSemiringBase(std::vector< int64_t > *matrix, Semiring< int64_t > const *semiring)libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inline
MatrixOverSemiringBase(std::vector< std::vector< int64_t >> const &matrix, Semiring< int64_t > const *semiring)libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inline
MatrixOverSemiringBase(std::vector< int64_t > *matrix)libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inlineexplicitprotected
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inline
ProjectiveMaxPlusMatrix(std::vector< int64_t > *matrix, Semiring< int64_t > const *semiring)libsemigroups::ProjectiveMaxPlusMatrixinline
ProjectiveMaxPlusMatrix(std::vector< std::vector< int64_t >> const &matrix, Semiring< int64_t > const *semiring)libsemigroups::ProjectiveMaxPlusMatrixinline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
redefine(Element const *x, Element const *y) overridelibsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
ElementWithVectorDataDefaultHash< int64_t, ProjectiveMaxPlusMatrix >::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
semiring() constlibsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >inline
swap(Element *x) overridelibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlinevirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix.html b/classlibsemigroups_1_1_projective_max_plus_matrix.html deleted file mode 100644 index fde8e912d..000000000 --- a/classlibsemigroups_1_1_projective_max_plus_matrix.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::ProjectiveMaxPlusMatrix Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Friends | -List of all members
-
-
libsemigroups::ProjectiveMaxPlusMatrix Class Reference
-
-
- -

Class for projective max-plus matrices. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::ProjectiveMaxPlusMatrix:
-
-
Inheritance graph
- - - - - - - -
-
-Collaboration diagram for libsemigroups::ProjectiveMaxPlusMatrix:
-
-
Collaboration graph
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ProjectiveMaxPlusMatrix (std::vector< int64_t > *matrix, Semiring< int64_t > const *semiring)
 A constructor. More...
 
 ProjectiveMaxPlusMatrix (std::vector< std::vector< int64_t >> const &matrix, Semiring< int64_t > const *semiring)
 A constructor. More...
 
- Public Member Functions inherited from libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >
 MatrixOverSemiringBase (std::vector< int64_t > *matrix, Semiring< int64_t > const *semiring)
 A constructor. More...
 
 MatrixOverSemiringBase (std::vector< std::vector< int64_t >> const &matrix, Semiring< int64_t > const *semiring)
 A constructor. More...
 
size_t complexity () const override
 Returns the approximate time complexity of multiplying two matrices. More...
 
size_t degree () const override
 Returns the dimension of the matrix. More...
 
Elementidentity () const override
 Returns the identity matrix with dimension of this. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
Semiring< int64_t > const * semiring () const
 Returns a pointer to the Semiring over which the matrix is defined. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< int64_t > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< int64_t > const &vector)
 A constructor. More...
 
int64_t at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< int64_t >::iterator begin () const
 Returns an iterator. More...
 
std::vector< int64_t >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< int64_t >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< int64_t >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
int64_t operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - -

-Friends

-class ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Protected Member Functions inherited from libsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >
 MatrixOverSemiringBase (std::vector< int64_t > *matrix)
 Constructs a MatrixOverSemiringBase with whose underlying semiring is not defined. The underlying semiring must be set by any class deriving from this one. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< int64_t, ProjectiveMaxPlusMatrix >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >
std::vector< int64_t > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

Class for projective max-plus matrices.

-

These matrices belong to the quotient of the monoid of all max-plus matrices by the congruence where two matrices are related if they differ by a scalar multiple.

See also
MaxPlusSemiring and MatrixOverSemiring.
-

Matrices in this class are modified when constructed to be in a normal form which is obtained by subtracting the maximum finite entry in the matrix from the every finite entry.

-

Constructor & Destructor Documentation

- -

◆ ProjectiveMaxPlusMatrix() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::ProjectiveMaxPlusMatrix::ProjectiveMaxPlusMatrix (std::vector< int64_t > * matrix,
Semiring< int64_t > const * semiring 
)
-
-inline
-
- -

A constructor.

-

See MatrixOverSemiring::MatrixOverSemiring for details about this method.

-

The parameter matrix is converted into its normal form when when the object is constructed.

- -
-
- -

◆ ProjectiveMaxPlusMatrix() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::ProjectiveMaxPlusMatrix::ProjectiveMaxPlusMatrix (std::vector< std::vector< int64_t >> const & matrix,
Semiring< int64_t > const * semiring 
)
-
-inline
-
- -

A constructor.

-

See MatrixOverSemiring::MatrixOverSemiring for details about this method.

-

The copy of the parameter matrix in the object constructed is converted into its normal form when the object is constructed.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix.png b/classlibsemigroups_1_1_projective_max_plus_matrix.png deleted file mode 100644 index 1b53945a9..000000000 Binary files a/classlibsemigroups_1_1_projective_max_plus_matrix.png and /dev/null differ diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.map b/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.map deleted file mode 100644 index 3cff0562a..000000000 --- a/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.md5 b/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.md5 deleted file mode 100644 index e349a81dc..000000000 --- a/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -db36f60719f10e87cf6cbcfca60a2a33 \ No newline at end of file diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.png b/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.png deleted file mode 100644 index 5c84c1907..000000000 Binary files a/classlibsemigroups_1_1_projective_max_plus_matrix__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.map b/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.map deleted file mode 100644 index 3cff0562a..000000000 --- a/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.md5 b/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.md5 deleted file mode 100644 index 4d7837a1d..000000000 --- a/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -a7f8b8a2e43772b3ae54032d1063ff70 \ No newline at end of file diff --git a/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.png b/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.png deleted file mode 100644 index 5c84c1907..000000000 Binary files a/classlibsemigroups_1_1_projective_max_plus_matrix__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_r_o-members.html b/classlibsemigroups_1_1_r_o-members.html deleted file mode 100644 index 0e0813eba..000000000 --- a/classlibsemigroups_1_1_r_o-members.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::RO Member List
-
-
- -

This is the complete list of members for libsemigroups::RO, including all inherited members.

- - - - -
operator()(rws_word_t const *p, rws_word_t const *q) constlibsemigroups::ROinline
operator()(rws_word_t const &p, rws_word_t const &q) const (defined in libsemigroups::RO)libsemigroups::ROinline
RO(std::function< bool(rws_word_t const *, rws_word_t const *)> func)libsemigroups::ROinlineexplicit
- - - - diff --git a/classlibsemigroups_1_1_r_o.html b/classlibsemigroups_1_1_r_o.html deleted file mode 100644 index 4cd2f5e76..000000000 --- a/classlibsemigroups_1_1_r_o.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RO Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::RO Class Reference
-
-
- -

This class provides a call operator which can be used to compare libsemigroups::rws_word_t. - More...

- -

#include <rws.h>

-
-Inheritance diagram for libsemigroups::RO:
-
-
- - -libsemigroups::SHORTLEX - -
- - - - - - - - - - -

-Public Member Functions

 RO (std::function< bool(rws_word_t const *, rws_word_t const *)> func)
 A constructor. More...
 
size_t operator() (rws_word_t const *p, rws_word_t const *q) const
 Returns true if the word p is greater than the word q in the reduction ordering. More...
 
-size_t operator() (rws_word_t const &p, rws_word_t const &q) const
 
-

Detailed Description

-

This class provides a call operator which can be used to compare libsemigroups::rws_word_t.

-

A reduction ordering is a linear order \(\prec\) with no infinite descending chains and where \(u \prec v\) for some libsemigroups::rws_word_t \(u\) and \(v\) implies that \( aub \prec avb\) for all libsemigroups::rws_word_t \(a\) and \(b\).

-

Constructor & Destructor Documentation

- -

◆ RO()

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::RO::RO (std::function< bool(rws_word_t const *, rws_word_t const *)> func)
-
-inlineexplicit
-
- -

A constructor.

-

This constructs a reduction ordering object whose call operator uses the function func to compare libsemigroups::rws_word_t's. It is the responsibility of the caller to verify that func specifies a reduction ordering.

- -
-
-

Member Function Documentation

- -

◆ operator()()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
size_t libsemigroups::RO::operator() (rws_word_t const * p,
rws_word_t const * q 
) const
-
-inline
-
- -

Returns true if the word p is greater than the word q in the reduction ordering.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_r_o.png b/classlibsemigroups_1_1_r_o.png deleted file mode 100644 index 22a0c5cc6..000000000 Binary files a/classlibsemigroups_1_1_r_o.png and /dev/null differ diff --git a/classlibsemigroups_1_1_r_w_s-members.html b/classlibsemigroups_1_1_r_w_s-members.html deleted file mode 100644 index 3c224a700..000000000 --- a/classlibsemigroups_1_1_r_w_s-members.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::RWS Member List
-
-
- -

This is the complete list of members for libsemigroups::RWS, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AB_BC enum value (defined in libsemigroups::RWS)libsemigroups::RWS
ABC enum value (defined in libsemigroups::RWS)libsemigroups::RWS
add_rule(std::string const &p, std::string const &q)libsemigroups::RWS
add_rules(std::vector< relation_t > const &relations)libsemigroups::RWS
add_rules(Congruence &cong)libsemigroups::RWSinline
confluent() constlibsemigroups::RWSinline
knuth_bendix()libsemigroups::RWSinline
knuth_bendix(std::atomic< bool > &killed)libsemigroups::RWS
knuth_bendix_by_overlap_length()libsemigroups::RWSinline
max_AB_BC enum value (defined in libsemigroups::RWS)libsemigroups::RWS
nr_rules() constlibsemigroups::RWSinline
operator<<(std::ostream &os, RWS const &rws)libsemigroups::RWSfriend
overlap_measure enum namelibsemigroups::RWS
rewrite(std::string *w) constlibsemigroups::RWSinline
rewrite(std::string w) constlibsemigroups::RWSinline
rule(std::string p, std::string q) constlibsemigroups::RWS
rules() constlibsemigroups::RWS
RWS(ReductionOrdering *order, std::string alphabet=STANDARD_ALPHABET)libsemigroups::RWSinlineexplicit
RWS()libsemigroups::RWSinline
RWS(std::string alphabet)libsemigroups::RWSinlineexplicit
RWS(std::vector< relation_t > const &relations)libsemigroups::RWSinlineexplicit
RWS(ReductionOrdering *order, std::vector< relation_t > const &relations)libsemigroups::RWSinline
RWS(Congruence &cong)libsemigroups::RWSinlineexplicit
rws_letter_t typedeflibsemigroups::RWS
rws_word_to_word(rws_word_t const *rws_word)libsemigroups::RWSinlinestatic
set_check_confluence_interval(size_t interval)libsemigroups::RWSinline
set_max_overlap(size_t val)libsemigroups::RWSinline
set_max_rules(size_t val)libsemigroups::RWSinline
set_overlap_measure(overlap_measure measure)libsemigroups::RWS
set_report(bool val) constlibsemigroups::RWSinline
set_report_interval(size_t interval)libsemigroups::RWSinline
test_equals(word_t const &p, word_t const &q)libsemigroups::RWS
test_equals(std::initializer_list< size_t > const &p, std::initializer_list< size_t > const &q)libsemigroups::RWS
test_equals(std::string const &p, std::string const &q)libsemigroups::RWS
test_equals(std::string *p, std::string *q)libsemigroups::RWS
test_less_than(word_t const &p, word_t const &q)libsemigroups::RWS
test_less_than(std::string const &p, std::string const &q)libsemigroups::RWS
test_less_than(std::string *p, std::string *q)libsemigroups::RWS
uint_to_rws_word(size_t const &a)libsemigroups::RWSinlinestatic
UNBOUNDEDlibsemigroups::RWSstatic
word_to_rws_word(word_t const &w, rws_word_t *ww)libsemigroups::RWSinlinestatic
word_to_rws_word(word_t const &w)libsemigroups::RWSinlinestatic
~RWS()libsemigroups::RWS
- - - - diff --git a/classlibsemigroups_1_1_r_w_s.html b/classlibsemigroups_1_1_r_w_s.html deleted file mode 100644 index 55edda9bf..000000000 --- a/classlibsemigroups_1_1_r_w_s.html +++ /dev/null @@ -1,1397 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -Public Member Functions | -Static Public Member Functions | -Static Public Attributes | -Friends | -List of all members
-
-
libsemigroups::RWS Class Reference
-
-
- -

This class is used to represent a string rewriting system defining a finitely presented monoid or semigroup. - More...

- -

#include <rws.h>

- - - - - - - - -

-Public Types

enum  overlap_measure { ABC = 0, -AB_BC = 1, -max_AB_BC = 2 - }
 The values in this enum determine how a rewriting system measures the length \(d(AB, BC)\) of the overlap of two words \(AB\) and \(BC\): More...
 
typedef char rws_letter_t
 Type for letters for rewriting systems. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 RWS (ReductionOrdering *order, std::string alphabet=STANDARD_ALPHABET)
 Constructs rewriting system with no rules and the reduction ordering order. More...
 
 RWS ()
 Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering. More...
 
 RWS (std::string alphabet)
 Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering and using the alphabet specified by the parameter alphabet. More...
 
 RWS (std::vector< relation_t > const &relations)
 Constructs a rewriting system with rules derived from the parameter relations, and with the SHORTLEX reduction ordering. More...
 
 RWS (ReductionOrdering *order, std::vector< relation_t > const &relations)
 Constructs a rewriting system with rules derived from relations, and with the reduction ordering specified by order. More...
 
 RWS (Congruence &cong)
 Constructs a rewriting system from Congruence::relations and Congruence::extra applied to cong. More...
 
 ~RWS ()
 A default destructor. More...
 
void add_rule (std::string const &p, std::string const &q)
 Add a rule to the rewriting system. More...
 
void add_rules (std::vector< relation_t > const &relations)
 Adds rules derived from relations via RWS::word_to_rws_word to the rewriting system. More...
 
void add_rules (Congruence &cong)
 Add rules derived from Congruence::relations and Congruence::extra applied to cong. More...
 
bool confluent () const
 Returns true if the rewriting system is confluent and false if it is not. More...
 
void knuth_bendix ()
 Run the Knuth-Bendix algorithm on the rewriting system. More...
 
void knuth_bendix (std::atomic< bool > &killed)
 Run the Knuth-Bendix algorithm on the rewriting system until it terminates or killed is set to true. More...
 
void knuth_bendix_by_overlap_length ()
 This method runs the Knuth-Bendix algorithm on the rewriting system by considering all overlaps of a given length \(n\) (according to the RWS::overlap_measure) before those overlaps of length \(n + 1\). More...
 
size_t nr_rules () const
 Returns the current number of active rules in the rewriting system. More...
 
std::string * rewrite (std::string *w) const
 Rewrites the word w in-place according to the current rules in the rewriting system. More...
 
std::string rewrite (std::string w) const
 Rewrites a copy of the word w according to the current rules in the rewriting system. More...
 
bool rule (std::string p, std::string q) const
 This method returns true if the strings p and q represent an active rule of the rewriting system, i.e. if either \( p \to q\) or \( q \to p \) is a currently active rule of the system. More...
 
std::vector< std::pair< std::string, std::string > > rules () const
 This method returns a vector consisting of the pairs of strings which represent the rules of the rewriting system. The first entry in every such pair is greater than the second according to the reduction ordering of the rewriting system. The rules are sorted according to the reduction ordering used by the rewriting system, on the first entry. More...
 
void set_check_confluence_interval (size_t interval)
 The method RWS::knuth_bendix periodically checks if the system is already confluent. This method can be used to set how frequently this happens, it is the number of new overlaps that should be considered before checking confluence. Setting this value too low can adversely affect the performance of RWS::knuth_bendix. More...
 
void set_max_overlap (size_t val)
 This method can be used to specify the maximum length of the overlap of two left hand sides of rules that should be considered in RWS::knuth_bendix. More...
 
void set_max_rules (size_t val)
 This method sets the (approximate) maximum number of rules that the system should contain. If this is number is exceeded in calls to RWS::knuth_bendix or RWS::knuth_bendix_by_overlap_length, then these methods will terminate and the system may not be confluent. More...
 
void set_overlap_measure (overlap_measure measure)
 This method can be used to determine the way that the length of an overlap of two words in the system is meaasured. More...
 
void set_report (bool val) const
 Turn reporting on or off. More...
 
void set_report_interval (size_t interval)
 Some information can be sent to std::cout during calls to RWS::knuth_bendix and RWS::knuth_bendix_by_overlap_length. This method can be used to determine the frequency with which this information is given, where a larger value means less frequently. More...
 
bool test_equals (word_t const &p, word_t const &q)
 Returns true if the reduced form of RWS::word_to_rws_word(p) equal the reduced form of RWS::word_to_rws_word(q), and false if not. More...
 
bool test_equals (std::initializer_list< size_t > const &p, std::initializer_list< size_t > const &q)
 Returns true if the reduced form of RWS::word_to_rws_word(p) equal the reduced form of RWS::word_to_rws_word(q), and false if not. More...
 
bool test_equals (std::string const &p, std::string const &q)
 Returns true if RWS::rewrite(p) equals RWS::rewrite(q), and false if not. More...
 
bool test_equals (std::string *p, std::string *q)
 Returns true if RWS::rewrite(p) equals RWS::rewrite(q), and false if not. More...
 
bool test_less_than (word_t const &p, word_t const &q)
 Returns true if the reduced form of RWS::word_to_rws_word(p) is less than the reduced form of RWS::word_to_rws_word(q), with respect to the reduction ordering of this, and false if not. More...
 
bool test_less_than (std::string const &p, std::string const &q)
 Returns true if RWS::rewrite(p) is less than RWS::rewrite(q), with respect to the reduction ordering of this, and false if not. More...
 
bool test_less_than (std::string *p, std::string *q)
 Returns true if RWS::rewrite(p) is less than RWS::rewrite(q), with respect to the reduction ordering of this, and false if not. More...
 
- - - - - - - - - - - - - -

-Static Public Member Functions

static word_trws_word_to_word (rws_word_t const *rws_word)
 This method converts a string in the rewriting system into a vector of unsigned integers. This method is the inverse of RWS::uint_to_rws_word. More...
 
static rws_word_t * uint_to_rws_word (size_t const &a)
 This method converts an unsigned integer to the corresponding rws_word_t. For example, the integer 0 is converted to the word with single letter which is the 1st ASCII character. More...
 
static rws_word_t * word_to_rws_word (word_t const &w, rws_word_t *ww)
 This method converts a vector of unsigned integers to a string which represents a word in the rewriting system. The second parameter ww is modified in-place to contain the string version of the vector of unsigned integers w. More...
 
static rws_word_t * word_to_rws_word (word_t const &w)
 This method converts a vector of unsigned integers to a string which represents a word in the rewriting system. More...
 
- - - - -

-Static Public Attributes

static size_t const UNBOUNDED = static_cast<size_t>(-2)
 The constant value represents an UNBOUNDED quantity. More...
 
- - - - -

-Friends

std::ostream & operator<< (std::ostream &os, RWS const &rws)
 This method allows a RWS object to be left shifted into a std::ostream, such as std::cout. The currently active rules of the system are represented in the output. More...
 
-

Detailed Description

-

This class is used to represent a string rewriting system defining a finitely presented monoid or semigroup.

-

Member Typedef Documentation

- -

◆ rws_letter_t

- -
-
- - - - -
typedef char libsemigroups::RWS::rws_letter_t
-
- -

Type for letters for rewriting systems.

- -
-
-

Member Enumeration Documentation

- -

◆ overlap_measure

- -
-
- -

The values in this enum determine how a rewriting system measures the length \(d(AB, BC)\) of the overlap of two words \(AB\) and \(BC\):

-
    -
  • ABC: \(d(AB, BC) = |A| + |B| + |C|\)
  • -
  • AB_BC: \(d(AB, BC) = |AB| + |BC|\)
  • -
  • max_AB_BC: \(d(AB, BC) = max(|AB|, |BC|)\)
  • -
-
See also
RWS::set_overlap_measure.
- -
-
-

Constructor & Destructor Documentation

- -

◆ RWS() [1/6]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::RWS::RWS (ReductionOrderingorder,
std::string alphabet = STANDARD_ALPHABET 
)
-
-inlineexplicit
-
- -

Constructs rewriting system with no rules and the reduction ordering order.

-

This constructs a rewriting system with no rules, and with the reduction ordering ReductionOrdering specifed by the parameter order.

- -
-
- -

◆ RWS() [2/6]

- -
-
- - - - - -
- - - - - - - -
libsemigroups::RWS::RWS ()
-
-inline
-
- -

Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering.

- -
-
- -

◆ RWS() [3/6]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::RWS::RWS (std::string alphabet)
-
-inlineexplicit
-
- -

Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering and using the alphabet specified by the parameter alphabet.

- -
-
- -

◆ RWS() [4/6]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::RWS::RWS (std::vector< relation_t > const & relations)
-
-inlineexplicit
-
- -

Constructs a rewriting system with rules derived from the parameter relations, and with the SHORTLEX reduction ordering.

- -
-
- -

◆ RWS() [5/6]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::RWS::RWS (ReductionOrderingorder,
std::vector< relation_t > const & relations 
)
-
-inline
-
- -

Constructs a rewriting system with rules derived from relations, and with the reduction ordering specified by order.

-

The RWS instance constructed here owns the parameter order, and deletes it in its destructor.

- -
-
- -

◆ RWS() [6/6]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::RWS::RWS (Congruencecong)
-
-inlineexplicit
-
- -

Constructs a rewriting system from Congruence::relations and Congruence::extra applied to cong.

-

Constructs a rewriting system with rules corresponding to the relations used to define cong, i.e. Congruence::relations and Congruence::extra, and with the SHORTLEX reduction ordering.

- -
-
- -

◆ ~RWS()

- -
-
- - - - - - - -
libsemigroups::RWS::~RWS ()
-
- -

A default destructor.

-

This deletes the reduction order used to construct the object, and the rules in the system.

- -
-
-

Member Function Documentation

- -

◆ add_rule()

- -
-
- - - - - - - - - - - - - - - - - - -
void libsemigroups::RWS::add_rule (std::string const & p,
std::string const & q 
)
-
- -

Add a rule to the rewriting system.

-

The principal difference between this method and RWS::add_rule(std::string* p, std::string* q) is that the arguments are copied by this method.

-
See also
RWS::add_rule.
- -
-
- -

◆ add_rules() [1/2]

- -
-
- - - - - - - - -
void libsemigroups::RWS::add_rules (std::vector< relation_t > const & relations)
-
- -

Adds rules derived from relations via RWS::word_to_rws_word to the rewriting system.

-
See also
RWS::add_rule.
- -
-
- -

◆ add_rules() [2/2]

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWS::add_rules (Congruencecong)
-
-inline
-
- -

Add rules derived from Congruence::relations and Congruence::extra applied to cong.

- -
-
- -

◆ confluent()

- -
-
- - - - - -
- - - - - - - -
bool libsemigroups::RWS::confluent () const
-
-inline
-
- -

Returns true if the rewriting system is confluent and false if it is not.

- -
-
- -

◆ knuth_bendix() [1/2]

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::RWS::knuth_bendix ()
-
-inline
-
- -

Run the Knuth-Bendix algorithm on the rewriting system.

-
Warning
This will terminate when the rewriting system is confluent, which might be never.
- -
-
- -

◆ knuth_bendix() [2/2]

- -
-
- - - - - - - - -
void libsemigroups::RWS::knuth_bendix (std::atomic< bool > & killed)
-
- -

Run the Knuth-Bendix algorithm on the rewriting system until it terminates or killed is set to true.

-
Warning
This will terminate when the rewriting system is confluent, which might be never.
-
See also
knuth_bendix_by_overlap_length.
- -
-
- -

◆ knuth_bendix_by_overlap_length()

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::RWS::knuth_bendix_by_overlap_length ()
-
-inline
-
- -

This method runs the Knuth-Bendix algorithm on the rewriting system by considering all overlaps of a given length \(n\) (according to the RWS::overlap_measure) before those overlaps of length \(n + 1\).

-
Warning
This will terminate when the rewriting system is confluent, which might be never.
-
See also
RWS::knuth_bendix.
- -
-
- -

◆ nr_rules()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::RWS::nr_rules () const
-
-inline
-
- -

Returns the current number of active rules in the rewriting system.

- -
-
- -

◆ rewrite() [1/2]

- -
-
- - - - - -
- - - - - - - - -
std::string* libsemigroups::RWS::rewrite (std::string * w) const
-
-inline
-
- -

Rewrites the word w in-place according to the current rules in the rewriting system.

- -
-
- -

◆ rewrite() [2/2]

- -
-
- - - - - -
- - - - - - - - -
std::string libsemigroups::RWS::rewrite (std::string w) const
-
-inline
-
- -

Rewrites a copy of the word w according to the current rules in the rewriting system.

- -
-
- -

◆ rule()

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::rule (std::string p,
std::string q 
) const
-
- -

This method returns true if the strings p and q represent an active rule of the rewriting system, i.e. if either \( p \to q\) or \( q \to p \) is a currently active rule of the system.

- -
-
- -

◆ rules()

- -
-
- - - - - - - -
std::vector< std::pair< std::string, std::string > > libsemigroups::RWS::rules () const
-
- -

This method returns a vector consisting of the pairs of strings which represent the rules of the rewriting system. The first entry in every such pair is greater than the second according to the reduction ordering of the rewriting system. The rules are sorted according to the reduction ordering used by the rewriting system, on the first entry.

- -
-
- -

◆ rws_word_to_word()

- -
-
- - - - - -
- - - - - - - - -
static word_t* libsemigroups::RWS::rws_word_to_word (rws_word_t const * rws_word)
-
-inlinestatic
-
- -

This method converts a string in the rewriting system into a vector of unsigned integers. This method is the inverse of RWS::uint_to_rws_word.

- -
-
- -

◆ set_check_confluence_interval()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWS::set_check_confluence_interval (size_t interval)
-
-inline
-
- -

The method RWS::knuth_bendix periodically checks if the system is already confluent. This method can be used to set how frequently this happens, it is the number of new overlaps that should be considered before checking confluence. Setting this value too low can adversely affect the performance of RWS::knuth_bendix.

-

The default value is 4096, and should be set to RWS::UNBOUNDED if RWS::knuth_bendix should never check if the system is already confluent.

-
See also
RWS::knuth_bendix.
- -
-
- -

◆ set_max_overlap()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWS::set_max_overlap (size_t val)
-
-inline
-
- -

This method can be used to specify the maximum length of the overlap of two left hand sides of rules that should be considered in RWS::knuth_bendix.

-

If this value is less than the longest left hand side of a rule, then RWS::knuth_bendix can terminate without the system being confluent.

-
See also
RWS::knuth_bendix.
- -
-
- -

◆ set_max_rules()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWS::set_max_rules (size_t val)
-
-inline
-
- -

This method sets the (approximate) maximum number of rules that the system should contain. If this is number is exceeded in calls to RWS::knuth_bendix or RWS::knuth_bendix_by_overlap_length, then these methods will terminate and the system may not be confluent.

-
See also
RWS::knuth_bendix and RWS::knuth_bendix.
- -
-
- -

◆ set_overlap_measure()

- -
-
- - - - - - - - -
void libsemigroups::RWS::set_overlap_measure (overlap_measure measure)
-
- -

This method can be used to determine the way that the length of an overlap of two words in the system is meaasured.

-
See also
RWS::overlap_measure.
- -
-
- -

◆ set_report()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWS::set_report (bool val) const
-
-inline
-
- -

Turn reporting on or off.

-

If val is true, then some methods for a RWS object may report information about the progress of the computation.

- -
-
- -

◆ set_report_interval()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWS::set_report_interval (size_t interval)
-
-inline
-
- -

Some information can be sent to std::cout during calls to RWS::knuth_bendix and RWS::knuth_bendix_by_overlap_length. This method can be used to determine the frequency with which this information is given, where a larger value means less frequently.

-

The default value is 1000.

- -
-
- -

◆ test_equals() [1/4]

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::test_equals (word_t const & p,
word_t const & q 
)
-
- -

Returns true if the reduced form of RWS::word_to_rws_word(p) equal the reduced form of RWS::word_to_rws_word(q), and false if not.

-
Warning
This method calls RWS::knuth_bendix and so it may never terminate.
-
See also
RWS::test_equals(std::string const& p, std::string const& q)
- -
-
- -

◆ test_equals() [2/4]

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::test_equals (std::initializer_list< size_t > const & p,
std::initializer_list< size_t > const & q 
)
-
- -

Returns true if the reduced form of RWS::word_to_rws_word(p) equal the reduced form of RWS::word_to_rws_word(q), and false if not.

-
Warning
This method calls RWS::knuth_bendix and so it may never terminate.
-
See also
RWS::test_equals(std::string const& p, std::string const& q)
- -
-
- -

◆ test_equals() [3/4]

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::test_equals (std::string const & p,
std::string const & q 
)
-
- -

Returns true if RWS::rewrite(p) equals RWS::rewrite(q), and false if not.

-
Warning
This method calls RWS::knuth_bendix and so it may never terminate.
-
See also
RWS::test_equals(word_t const& p, word_t const& q)
- -
-
- -

◆ test_equals() [4/4]

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::test_equals (std::string * p,
std::string * q 
)
-
- -

Returns true if RWS::rewrite(p) equals RWS::rewrite(q), and false if not.

-

This method rewrites p and q in-place (unless they are already equal before rewriting). The caller responsible for deletion.

-
Warning
This method calls RWS::knuth_bendix and so it may never terminate.
-
See also
RWS::test_equals(word_t const& p, word_t const& q)
- -
-
- -

◆ test_less_than() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::test_less_than (word_t const & p,
word_t const & q 
)
-
- -

Returns true if the reduced form of RWS::word_to_rws_word(p) is less than the reduced form of RWS::word_to_rws_word(q), with respect to the reduction ordering of this, and false if not.

-
Warning
This method calls RWS::knuth_bendix and so it may never terminate.
-
See also
RWS::test_less_than(std::string const& p, std::string const& q)
- -
-
- -

◆ test_less_than() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::test_less_than (std::string const & p,
std::string const & q 
)
-
- -

Returns true if RWS::rewrite(p) is less than RWS::rewrite(q), with respect to the reduction ordering of this, and false if not.

-
Warning
This method calls RWS::knuth_bendix and so it may never terminate.
-
See also
RWS::test_less_than(word_t const& p, word_t const& q)
- -
-
- -

◆ test_less_than() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - -
bool libsemigroups::RWS::test_less_than (std::string * p,
std::string * q 
)
-
- -

Returns true if RWS::rewrite(p) is less than RWS::rewrite(q), with respect to the reduction ordering of this, and false if not.

-

The parameters p and q are rewritten in-place, and the caller is responsible for their deletion.

-
Warning
This method calls RWS::knuth_bendix and so it may never terminate.
-
See also
RWS::test_less_than(word_t const& p, word_t const& q)
- -
-
- -

◆ uint_to_rws_word()

- -
-
- - - - - -
- - - - - - - - -
static rws_word_t* libsemigroups::RWS::uint_to_rws_word (size_t const & a)
-
-inlinestatic
-
- -

This method converts an unsigned integer to the corresponding rws_word_t. For example, the integer 0 is converted to the word with single letter which is the 1st ASCII character.

- -
-
- -

◆ word_to_rws_word() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static rws_word_t* libsemigroups::RWS::word_to_rws_word (word_t const & w,
rws_word_t * ww 
)
-
-inlinestatic
-
- -

This method converts a vector of unsigned integers to a string which represents a word in the rewriting system. The second parameter ww is modified in-place to contain the string version of the vector of unsigned integers w.

-

This method returns its second parameter ww.

- -
-
- -

◆ word_to_rws_word() [2/2]

- -
-
- - - - - -
- - - - - - - - -
static rws_word_t* libsemigroups::RWS::word_to_rws_word (word_t const & w)
-
-inlinestatic
-
- -

This method converts a vector of unsigned integers to a string which represents a word in the rewriting system.

-

This method returns a pointer to a new string, and it is the responsibility of the caller to delete it.

- -
-
-

Friends And Related Function Documentation

- -

◆ operator<<

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
std::ostream& operator<< (std::ostream & os,
RWS const & rws 
)
-
-friend
-
- -

This method allows a RWS object to be left shifted into a std::ostream, such as std::cout. The currently active rules of the system are represented in the output.

- -
-
-

Member Data Documentation

- -

◆ UNBOUNDED

- -
-
- - - - - -
- - - - -
size_t const libsemigroups::RWS::UNBOUNDED = static_cast<size_t>(-2)
-
-static
-
- -

The constant value represents an UNBOUNDED quantity.

-
See also
RWS::set_check_confluence_interval, RWS::set_max_rules, RWS::set_max_overlap.
- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_r_w_s_1_1_rule-members.html b/classlibsemigroups_1_1_r_w_s_1_1_rule-members.html deleted file mode 100644 index d9348a231..000000000 --- a/classlibsemigroups_1_1_r_w_s_1_1_rule-members.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::RWS::Rule Member List
-
-
- -

This is the complete list of members for libsemigroups::RWS::Rule, including all inherited members.

- - - - -
lhs() constlibsemigroups::RWS::Ruleinline
operator<< (defined in libsemigroups::RWS::Rule)libsemigroups::RWS::Rulefriend
rhs() constlibsemigroups::RWS::Ruleinline
- - - - diff --git a/classlibsemigroups_1_1_r_w_s_1_1_rule.html b/classlibsemigroups_1_1_r_w_s_1_1_rule.html deleted file mode 100644 index 2ec3d82ed..000000000 --- a/classlibsemigroups_1_1_r_w_s_1_1_rule.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS::Rule Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Friends | -List of all members
-
-
libsemigroups::RWS::Rule Class Reference
-
-
- -

Class for rules in rewriting systems, which supports only two methods, Rule::lhs and Rule::rhs, which return the left and right hand sides of the rule. - More...

- -

#include <rws.h>

- - - - - - - - -

-Public Member Functions

rws_word_t const * lhs () const
 Returns the left hand side of the rule, which is guaranteed to be greater than its right hand side according to the reduction ordering of the RWS used to construct this. More...
 
rws_word_t const * rhs () const
 Returns the right hand side of the rule, which is guaranteed to be less than its left hand side according to the reduction ordering of the RWS used to construct this. More...
 
- - - -

-Friends

-std::ostream & operator<< (std::ostream &os, Rule const &rule)
 
-

Detailed Description

-

Class for rules in rewriting systems, which supports only two methods, Rule::lhs and Rule::rhs, which return the left and right hand sides of the rule.

-

Member Function Documentation

- -

◆ lhs()

- -
-
- - - - - -
- - - - - - - -
rws_word_t const* libsemigroups::RWS::Rule::lhs () const
-
-inline
-
- -

Returns the left hand side of the rule, which is guaranteed to be greater than its right hand side according to the reduction ordering of the RWS used to construct this.

- -
-
- -

◆ rhs()

- -
-
- - - - - -
- - - - - - - -
rws_word_t const* libsemigroups::RWS::Rule::rhs () const
-
-inline
-
- -

Returns the right hand side of the rule, which is guaranteed to be less than its left hand side according to the reduction ordering of the RWS used to construct this.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_r_w_s_1_1_rule_lookup-members.html b/classlibsemigroups_1_1_r_w_s_1_1_rule_lookup-members.html deleted file mode 100644 index afa2323c9..000000000 --- a/classlibsemigroups_1_1_r_w_s_1_1_rule_lookup-members.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::RWS::RuleLookup Member List
-
-
- -

This is the complete list of members for libsemigroups::RWS::RuleLookup, including all inherited members.

- - - - - - -
operator()(rws_word_t::iterator const &first, rws_word_t::iterator const &last) (defined in libsemigroups::RWS::RuleLookup)libsemigroups::RWS::RuleLookupinline
operator<(RuleLookup const &that) const (defined in libsemigroups::RWS::RuleLookup)libsemigroups::RWS::RuleLookupinline
rule() const (defined in libsemigroups::RWS::RuleLookup)libsemigroups::RWS::RuleLookupinline
RuleLookup() (defined in libsemigroups::RWS::RuleLookup)libsemigroups::RWS::RuleLookupinline
RuleLookup(RWS::Rule *rule) (defined in libsemigroups::RWS::RuleLookup)libsemigroups::RWS::RuleLookupinlineexplicit
- - - - diff --git a/classlibsemigroups_1_1_r_w_s_1_1_rule_lookup.html b/classlibsemigroups_1_1_r_w_s_1_1_rule_lookup.html deleted file mode 100644 index cd1c41602..000000000 --- a/classlibsemigroups_1_1_r_w_s_1_1_rule_lookup.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS::RuleLookup Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::RWS::RuleLookup Class Reference
-
-
- - - - - - - - - - -

-Public Member Functions

RuleLookup (RWS::Rule *rule)
 
-RuleLookupoperator() (rws_word_t::iterator const &first, rws_word_t::iterator const &last)
 
-bool operator< (RuleLookup const &that) const
 
-Rule const * rule () const
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_r_w_s_e-members.html b/classlibsemigroups_1_1_r_w_s_e-members.html deleted file mode 100644 index 9a029b111..000000000 --- a/classlibsemigroups_1_1_r_w_s_e-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::RWSE Member List
-
-
- -

This is the complete list of members for libsemigroups::RWSE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
cache_hash_value() const overridelibsemigroups::RWSEinlinevirtual
complexity() const overridelibsemigroups::RWSEinlinevirtual
copy(Element const *x) overridelibsemigroups::RWSEvirtual
degree() const overridelibsemigroups::RWSEinlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
elm_t enum namelibsemigroups::Element
get_rws_word() constlibsemigroups::RWSEinline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::RWSEinlinevirtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(const Element &that) const overridelibsemigroups::RWSEvirtual
operator==(Element const &that) const overridelibsemigroups::RWSEinlinevirtual
really_copy(size_t increase_deg_by) const overridelibsemigroups::RWSEvirtual
really_delete() overridelibsemigroups::RWSEinlinevirtual
redefine(Element const *x, Element const *y) overridelibsemigroups::RWSEvirtual
libsemigroups::Element::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE(RWS *rws, rws_word_t *w)libsemigroups::RWSEinline
RWSE(RWS &rws, rws_word_t const &w)libsemigroups::RWSEinline
RWSE(RWS &rws, letter_t const &a)libsemigroups::RWSEinline
RWSE(RWS &rws, word_t const &w)libsemigroups::RWSEinline
libsemigroups::Element::RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::RWSEvirtual
UNDEFINEDlibsemigroups::Elementprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_r_w_s_e.html b/classlibsemigroups_1_1_r_w_s_e.html deleted file mode 100644 index eafb1fa85..000000000 --- a/classlibsemigroups_1_1_r_w_s_e.html +++ /dev/null @@ -1,743 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWSE Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::RWSE Class Reference
-
-
- -

Subclass of Element that wraps an libsemigroups::rws_word_t. - More...

- -

#include <rwse.h>

-
-Inheritance diagram for libsemigroups::RWSE:
-
-
Inheritance graph
- - - - -
-
-Collaboration diagram for libsemigroups::RWSE:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 RWSE (RWS *rws, rws_word_t *w)
 Constructor from a rewriting system and a word. More...
 
 RWSE (RWS &rws, rws_word_t const &w)
 Constructor from a rewriting system and a word. More...
 
 RWSE (RWS &rws, letter_t const &a)
 Constructor from a rewriting system and a letter. More...
 
 RWSE (RWS &rws, word_t const &w)
 Constructor from a rewriting system and a word. More...
 
void cache_hash_value () const override
 Calculates a hash value for this object which is cached. More...
 
size_t complexity () const override
 Returns the approximate time complexity of multiplying two RWSE's. More...
 
void copy (Element const *x) override
 Copy x into this. More...
 
size_t degree () const override
 Returns the degree of an RWSE. More...
 
rws_word_t const * get_rws_word () const
 Returns a pointer to the rws_word_t used to create this. More...
 
Elementidentity () const override
 Return the identity RWSE. More...
 
bool operator< (const Element &that) const override
 Returns true if this is less than that and false if it is not. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
Elementreally_copy (size_t increase_deg_by) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the underlying rws_word_t that this object wraps. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

Subclass of Element that wraps an libsemigroups::rws_word_t.

-

This class is used to wrap libsemigroups::rws_word_t into an Element so that it is possible to use them as generators for a Semigroup object.

-

Constructor & Destructor Documentation

- -

◆ RWSE() [1/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::RWSE::RWSE (RWSrws,
rws_word_t * w 
)
-
-inline
-
- -

Constructor from a rewriting system and a word.

-

Constructs a RWSE which is essentially the word w, whose multiplication with other RWSE's is defined with respect to the rewriting system rws.

-

The rws_word_t w is not copied, and should be deleted using ElementWithVectorData::really_delete.

-

The rewriting system rws is not copied either, and it is the responsibility of the caller to delete it.

- -
-
- -

◆ RWSE() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::RWSE::RWSE (RWSrws,
rws_word_t const & w 
)
-
-inline
-
- -

Constructor from a rewriting system and a word.

-

Constructs a RWSE which is essentially the word w, whose multiplication with other RWSE's is defined with respect to the rewriting system rws.

-

The rws_word_t w is copied, but the rewriting system rws is not.

- -
-
- -

◆ RWSE() [3/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::RWSE::RWSE (RWSrws,
letter_t const & a 
)
-
-inline
-
- -

Constructor from a rewriting system and a letter.

-

Calls RWSE::RWSE with RWS::uint_to_rws_word of a.

- -
-
- -

◆ RWSE() [4/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
libsemigroups::RWSE::RWSE (RWSrws,
word_t const & w 
)
-
-inline
-
- -

Constructor from a rewriting system and a word.

-

Calls RWSE::RWSE with RWS::word_to_rws_word of w.

- -
-
-

Member Function Documentation

- -

◆ cache_hash_value()

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::RWSE::cache_hash_value () const
-
-inlineoverridevirtual
-
- -

Calculates a hash value for this object which is cached.

-
See also
Element::hash_value and Element::cache_hash_value.
- -

Implements libsemigroups::Element.

- -
-
- -

◆ complexity()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::RWSE::complexity () const
-
-inlineoverridevirtual
-
- -

Returns the approximate time complexity of multiplying two RWSE's.

-
See also
Element::complexity.
-

Returns Semigroup::LIMIT_MAX since the complexity of multiplying words in a rewriting system is higher than the cost of tracing a path in the left or right Cayley graph of a Semigroup.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ copy()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWSE::copy (Element const * x)
-
-overridevirtual
-
- -

Copy x into this.

-

This method copies the RWSE pointed to by x into this by changing this in-place.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ degree()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::RWSE::degree () const
-
-inlineoverridevirtual
-
- -

Returns the degree of an RWSE.

-
See also
Element::degree.
-

Returns the integer 0 since the notion of degree is not really meaningful in this context.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ get_rws_word()

- -
-
- - - - - -
- - - - - - - -
rws_word_t const* libsemigroups::RWSE::get_rws_word () const
-
-inline
-
- -

Returns a pointer to the rws_word_t used to create this.

- -
-
- -

◆ identity()

- -
-
- - - - - -
- - - - - - - -
Element* libsemigroups::RWSE::identity () const
-
-inlineoverridevirtual
-
- -

Return the identity RWSE.

-
See also
Element::identity.
-

Returns a new RWSE wrapping the empty word and over the same rewriting system as this.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ operator<()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::RWSE::operator< (const Elementthat) const
-
-overridevirtual
-
- -

Returns true if this is less than that and false if it is not.

-

This defines a total order on RWSEs that is the short-lex order on all words.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::RWSE::operator== (Element const & that) const
-
-inlineoverridevirtual
-
- -

Returns true if this equals that.

-

This method checks the mathematical equality of two RWSE, in other words whether or not they represent that the same reduced word of the rewriting system they are defined over.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ really_copy()

- -
-
- - - - - -
- - - - - - - - -
Element * libsemigroups::RWSE::really_copy (size_t increase_deg_by) const
-
-overridevirtual
-
- -

Returns a pointer to a copy of this.

-

The parameter increase_deg_by is not used

-
See also
Element::really_copy.
- -

Implements libsemigroups::Element.

- -
-
- -

◆ really_delete()

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::RWSE::really_delete ()
-
-inlineoverridevirtual
-
- -

Deletes the underlying rws_word_t that this object wraps.

-
See also
Element::really_delete.
- -

Implements libsemigroups::Element.

- -
-
- -

◆ redefine()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::RWSE::redefine (Element const * x,
Element const * y 
)
-
-overridevirtual
-
- -

Multiply x and y and stores the result in this.

-

Redefine this to be a reduced word with respect to the rewriting system of x and y which is equivalent to the concatenation of x and y. This method asserts that x and y have the same rewriting system.

-

The parameter thread_id is required since some temporary storage is required to find the product of x and y. Note that if different threads call this method with the same value of thread_id then bad things will happen.

- -

Reimplemented from libsemigroups::Element.

- -
-
- -

◆ swap()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::RWSE::swap (Elementx)
-
-overridevirtual
-
- -

Swap another Element with this.

-

This method swaps the defining data of x and this.

- -

Implements libsemigroups::Element.

- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_r_w_s_e.png b/classlibsemigroups_1_1_r_w_s_e.png deleted file mode 100644 index ed33159e8..000000000 Binary files a/classlibsemigroups_1_1_r_w_s_e.png and /dev/null differ diff --git a/classlibsemigroups_1_1_r_w_s_e__coll__graph.map b/classlibsemigroups_1_1_r_w_s_e__coll__graph.map deleted file mode 100644 index f6160b0ba..000000000 --- a/classlibsemigroups_1_1_r_w_s_e__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_r_w_s_e__coll__graph.md5 b/classlibsemigroups_1_1_r_w_s_e__coll__graph.md5 deleted file mode 100644 index 2c38d6154..000000000 --- a/classlibsemigroups_1_1_r_w_s_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -946d9f4fa968256b9842f6a45e3bda23 \ No newline at end of file diff --git a/classlibsemigroups_1_1_r_w_s_e__coll__graph.png b/classlibsemigroups_1_1_r_w_s_e__coll__graph.png deleted file mode 100644 index 488cb1c82..000000000 Binary files a/classlibsemigroups_1_1_r_w_s_e__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_r_w_s_e__inherit__graph.map b/classlibsemigroups_1_1_r_w_s_e__inherit__graph.map deleted file mode 100644 index f6160b0ba..000000000 --- a/classlibsemigroups_1_1_r_w_s_e__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_r_w_s_e__inherit__graph.md5 b/classlibsemigroups_1_1_r_w_s_e__inherit__graph.md5 deleted file mode 100644 index 8dddc4e76..000000000 --- a/classlibsemigroups_1_1_r_w_s_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -30168829645dccb4ccbdefec420b9d79 \ No newline at end of file diff --git a/classlibsemigroups_1_1_r_w_s_e__inherit__graph.png b/classlibsemigroups_1_1_r_w_s_e__inherit__graph.png deleted file mode 100644 index 488cb1c82..000000000 Binary files a/classlibsemigroups_1_1_r_w_s_e__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_rec_vec-members.html b/classlibsemigroups_1_1_rec_vec-members.html deleted file mode 100644 index 52033041d..000000000 --- a/classlibsemigroups_1_1_rec_vec-members.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::RecVec< T, A > Member List
-
-
- -

This is the complete list of members for libsemigroups::RecVec< T, A >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
add_cols(size_t nr) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
add_rows(size_t nr) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
allocator_type typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
append(const RecVec< S > &copy) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
begin() (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
begin() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
begin_column(size_t col_index) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
begin_row(size_t row_index) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
cbegin() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
cbegin_column(size_t col_index) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
cbegin_row(size_t row_index) const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
cend() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
cend_column(size_t col_index) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
cend_row(size_t row_index) const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
clear() (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
const_iterator typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
const_reference typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
const_reverse_iterator typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
crbegin() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
crend() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
difference_type typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
empty() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
end() (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
end() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
end_column(size_t col_index) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
end_row(size_t row_index) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
get(size_t i, size_t j) const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
iterator typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
max_size() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
nr_cols() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
nr_rows() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
operator!=(RecVec< T, A > const &that) const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
operator=(RecVec< T, A > that) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
operator==(RecVec< T, A > const &that) const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
rbegin() (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
rbegin() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
RecVec (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >friend
RecVec(size_t nr_cols=0, size_t nr_rows=0, T default_val=0) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inlineexplicit
RecVec(RecVec< S, B > const &copy, size_t nr_cols_to_add) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
reference typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
rend() (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
rend() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
reverse_iterator typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
set(size_t i, size_t j, T val) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
size() const (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
size_type typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
swap(RecVec< T, A > &that) (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
value_type typedef (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >
~RecVec() (defined in libsemigroups::RecVec< T, A >)libsemigroups::RecVec< T, A >inline
- - - - diff --git a/classlibsemigroups_1_1_rec_vec.html b/classlibsemigroups_1_1_rec_vec.html deleted file mode 100644 index 81d5a3ad8..000000000 --- a/classlibsemigroups_1_1_rec_vec.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RecVec< T, A > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Classes | -Public Types | -Public Member Functions | -Friends | -List of all members
-
-
libsemigroups::RecVec< T, A > Class Template Reference
-
-
- -

Template class for rectangular vectors i.e. two dimensional vectors. The unique template parameter T is the type of the objects stored in the <RecVec>. - More...

- -

#include <recvec.h>

- - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef A allocator_type
 
-typedef iterator_base< typename std::vector< T, A >::const_iterator, typename std::vector< T, A >::const_reference, typename std::vector< T, A >::const_pointer > const_iterator
 
-typedef std::vector< T, A >::const_reference const_reference
 
-typedef std::reverse_iterator< const_iterator > const_reverse_iterator
 
-typedef std::vector< T, A >::difference_type difference_type
 
-typedef iterator_base< typename std::vector< T, A >::iterator, typename std::vector< T, A >::reference, typename std::vector< T, A >::pointer > iterator
 
-typedef std::vector< T, A >::reference reference
 
-typedef std::reverse_iterator< iterator > reverse_iterator
 
-typedef std::vector< T, A >::size_type size_type
 
-typedef std::vector< T, A >::value_type value_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

RecVec (size_t nr_cols=0, size_t nr_rows=0, T default_val=0)
 
-template<typename S , class B >
 RecVec (RecVec< S, B > const &copy, size_t nr_cols_to_add)
 
-void add_cols (size_t nr)
 
-void add_rows (size_t nr)
 
-template<typename S >
void append (const RecVec< S > &copy)
 
-iterator begin ()
 
-const_iterator begin () const
 
-iterator begin_column (size_t col_index)
 
-iterator begin_row (size_t row_index)
 
-const_iterator cbegin () const
 
-const_iterator cbegin_column (size_t col_index)
 
-const_iterator cbegin_row (size_t row_index) const
 
-const_iterator cend () const
 
-const_iterator cend_column (size_t col_index)
 
-const_iterator cend_row (size_t row_index) const
 
-void clear ()
 
-const_reverse_iterator crbegin () const
 
-const_reverse_iterator crend () const
 
-bool empty () const
 
-iterator end ()
 
-const_iterator end () const
 
-iterator end_column (size_t col_index)
 
-iterator end_row (size_t row_index)
 
-T get (size_t i, size_t j) const
 
-size_t max_size () const
 
-size_t nr_cols () const
 
-size_t nr_rows () const
 
-bool operator!= (RecVec< T, A > const &that) const
 
-RecVec< T, A > & operator= (RecVec< T, A > that)
 
-bool operator== (RecVec< T, A > const &that) const
 
-reverse_iterator rbegin ()
 
-const_reverse_iterator rbegin () const
 
-reverse_iterator rend ()
 
-const_reverse_iterator rend () const
 
-void set (size_t i, size_t j, T val)
 
-size_t size () const
 
-void swap (RecVec< T, A > &that)
 
- - - - -

-Friends

-template<typename S , class B >
class RecVec
 
-

Detailed Description

-

template<typename T, class A = std::allocator<T>>
-class libsemigroups::RecVec< T, A >

- -

Template class for rectangular vectors i.e. two dimensional vectors. The unique template parameter T is the type of the objects stored in the <RecVec>.

-

The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_reduction_ordering-members.html b/classlibsemigroups_1_1_reduction_ordering-members.html deleted file mode 100644 index 6981d635e..000000000 --- a/classlibsemigroups_1_1_reduction_ordering-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::ReductionOrdering Member List
-
-
- -

This is the complete list of members for libsemigroups::ReductionOrdering, including all inherited members.

- - - - -
operator()(std::string const *p, std::string const *q) constlibsemigroups::ReductionOrderinginline
operator()(std::string const &p, std::string const &q) constlibsemigroups::ReductionOrderinginline
ReductionOrdering(std::function< bool(std::string const *, std::string const *)> func)libsemigroups::ReductionOrderinginlineexplicit
- - - - diff --git a/classlibsemigroups_1_1_reduction_ordering.html b/classlibsemigroups_1_1_reduction_ordering.html deleted file mode 100644 index c5565fac7..000000000 --- a/classlibsemigroups_1_1_reduction_ordering.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::ReductionOrdering Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::ReductionOrdering Class Reference
-
-
- -

This class provides a call operator which can be used to compare libsemigroups::rws_word_t. - More...

- -

#include <rws.h>

-
-Inheritance diagram for libsemigroups::ReductionOrdering:
-
-
Inheritance graph
- - - - -
- - - - - - - - - - - -

-Public Member Functions

 ReductionOrdering (std::function< bool(std::string const *, std::string const *)> func)
 A constructor. More...
 
size_t operator() (std::string const *p, std::string const *q) const
 Returns true if the word pointed to by p is greater than the word pointed to by q in the reduction ordering. More...
 
size_t operator() (std::string const &p, std::string const &q) const
 Returns true if the word p is greater than the word q in the reduction ordering. More...
 
-

Detailed Description

-

This class provides a call operator which can be used to compare libsemigroups::rws_word_t.

-

A reduction ordering is a linear order \(\prec\) with no infinite descending chains and where \(u \prec v\) for some libsemigroups::rws_word_t \(u\) and \(v\) implies that \( aub \prec avb\) for all libsemigroups::rws_word_t \(a\) and \(b\).

-

Constructor & Destructor Documentation

- -

◆ ReductionOrdering()

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::ReductionOrdering::ReductionOrdering (std::function< bool(std::string const *, std::string const *)> func)
-
-inlineexplicit
-
- -

A constructor.

-

This constructs a reduction ordering object whose call operator uses the function func to compare libsemigroups::rws_word_t's. It is the responsibility of the caller to verify that func specifies a reduction ordering.

- -
-
-

Member Function Documentation

- -

◆ operator()() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
size_t libsemigroups::ReductionOrdering::operator() (std::string const * p,
std::string const * q 
) const
-
-inline
-
- -

Returns true if the word pointed to by p is greater than the word pointed to by q in the reduction ordering.

- -
-
- -

◆ operator()() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
size_t libsemigroups::ReductionOrdering::operator() (std::string const & p,
std::string const & q 
) const
-
-inline
-
- -

Returns true if the word p is greater than the word q in the reduction ordering.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_reduction_ordering.png b/classlibsemigroups_1_1_reduction_ordering.png deleted file mode 100644 index 98ba7d0b7..000000000 Binary files a/classlibsemigroups_1_1_reduction_ordering.png and /dev/null differ diff --git a/classlibsemigroups_1_1_reduction_ordering__inherit__graph.map b/classlibsemigroups_1_1_reduction_ordering__inherit__graph.map deleted file mode 100644 index 0c56e4ee6..000000000 --- a/classlibsemigroups_1_1_reduction_ordering__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_reduction_ordering__inherit__graph.md5 b/classlibsemigroups_1_1_reduction_ordering__inherit__graph.md5 deleted file mode 100644 index 8046ef11e..000000000 --- a/classlibsemigroups_1_1_reduction_ordering__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -98ff5527ee077fec3e57c7edb2f7c5e4 \ No newline at end of file diff --git a/classlibsemigroups_1_1_reduction_ordering__inherit__graph.png b/classlibsemigroups_1_1_reduction_ordering__inherit__graph.png deleted file mode 100644 index 8bfaee233..000000000 Binary files a/classlibsemigroups_1_1_reduction_ordering__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x-members.html b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x-members.html deleted file mode 100644 index dab8fb23f..000000000 --- a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::SHORTLEX Member List
-
-
- -

This is the complete list of members for libsemigroups::SHORTLEX, including all inherited members.

- - - - - -
operator()(std::string const *p, std::string const *q) constlibsemigroups::ReductionOrderinginline
operator()(std::string const &p, std::string const &q) constlibsemigroups::ReductionOrderinginline
ReductionOrdering(std::function< bool(std::string const *, std::string const *)> func)libsemigroups::ReductionOrderinginlineexplicit
SHORTLEX()libsemigroups::SHORTLEXinline
- - - - diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html deleted file mode 100644 index 2bbe1a7a8..000000000 --- a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::SHORTLEX Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::SHORTLEX Class Reference
-
-
- -

This class implements the shortlex reduction ordering derived from an ordering on libsemigroups::rws_letter_t's. - More...

- -

#include <rws.h>

-
-Inheritance diagram for libsemigroups::SHORTLEX:
-
-
Inheritance graph
- - - - -
-
-Collaboration diagram for libsemigroups::SHORTLEX:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - -

-Public Member Functions

 SHORTLEX ()
 Constructs a short-lex reduction ordering object derived from the order of on libsemigroups::rws_letter_t's given by the operator <. More...
 
- Public Member Functions inherited from libsemigroups::ReductionOrdering
 ReductionOrdering (std::function< bool(std::string const *, std::string const *)> func)
 A constructor. More...
 
size_t operator() (std::string const *p, std::string const *q) const
 Returns true if the word pointed to by p is greater than the word pointed to by q in the reduction ordering. More...
 
size_t operator() (std::string const &p, std::string const &q) const
 Returns true if the word p is greater than the word q in the reduction ordering. More...
 
-

Detailed Description

-

This class implements the shortlex reduction ordering derived from an ordering on libsemigroups::rws_letter_t's.

-

Constructor & Destructor Documentation

- -

◆ SHORTLEX()

- -
-
- - - - - -
- - - - - - - -
libsemigroups::SHORTLEX::SHORTLEX ()
-
-inline
-
- -

Constructs a short-lex reduction ordering object derived from the order of on libsemigroups::rws_letter_t's given by the operator <.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x.png b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x.png deleted file mode 100644 index 342e49c32..000000000 Binary files a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x.png and /dev/null differ diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.map b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.map deleted file mode 100644 index 19a8b7242..000000000 --- a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.md5 b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.md5 deleted file mode 100644 index 3307479c3..000000000 --- a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -4da5bce2785f63806f370e5d43c4e5d9 \ No newline at end of file diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.png b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.png deleted file mode 100644 index 4bf0818f6..000000000 Binary files a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.map b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.map deleted file mode 100644 index 19a8b7242..000000000 --- a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.md5 b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.md5 deleted file mode 100644 index 3399551b8..000000000 --- a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -41f2478020f9f415db3346313ca0ce8c \ No newline at end of file diff --git a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.png b/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.png deleted file mode 100644 index 4bf0818f6..000000000 Binary files a/classlibsemigroups_1_1_s_h_o_r_t_l_e_x__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_semigroup-members.html b/classlibsemigroups_1_1_semigroup-members.html deleted file mode 100644 index 64de7f1a5..000000000 --- a/classlibsemigroups_1_1_semigroup-members.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Semigroup Member List
-
-
- -

This is the complete list of members for libsemigroups::Semigroup, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
add_generators(std::vector< Element const * > const *coll)libsemigroups::Semigroup
add_generators(std::vector< Element * > const *coll)libsemigroups::Semigroupinline
add_generators(std::vector< Element const * > const &coll)libsemigroups::Semigroup
add_generators(std::vector< Element * > const &coll)libsemigroups::Semigroupinline
add_generators(std::initializer_list< Element * > coll)libsemigroups::Semigroupinline
at(element_index_t pos)libsemigroups::Semigroup
batch_size() constlibsemigroups::Semigroupinline
begin() constlibsemigroups::Semigroupinline
cayley_graph_t typedeflibsemigroups::Semigroup
cbegin() constlibsemigroups::Semigroupinline
cbegin_idempotents()libsemigroups::Semigroupinline
cbegin_sorted()libsemigroups::Semigroupinline
cend() constlibsemigroups::Semigroupinline
cend_idempotents()libsemigroups::Semigroupinline
cend_sorted()libsemigroups::Semigroupinline
closure(std::vector< Element const * > const *coll)libsemigroups::Semigroup
closure(std::vector< Element const * > const &coll)libsemigroups::Semigroup
closure(std::vector< Element * > const &coll)libsemigroups::Semigroupinline
closure(std::initializer_list< Element * > coll)libsemigroups::Semigroupinline
copy_add_generators(std::vector< Element const * > const *coll) constlibsemigroups::Semigroup
copy_add_generators(std::vector< Element * > const *coll) constlibsemigroups::Semigroupinline
copy_closure(std::vector< Element const * > const *coll)libsemigroups::Semigroup
copy_closure(std::vector< Element * > const *gens)libsemigroups::Semigroupinline
crbegin() constlibsemigroups::Semigroupinline
crbegin_sorted()libsemigroups::Semigroupinline
crend() constlibsemigroups::Semigroupinline
crend_sorted()libsemigroups::Semigroupinline
current_max_word_length() constlibsemigroups::Semigroupinline
current_nrrules() constlibsemigroups::Semigroupinline
current_position(Element const *x) constlibsemigroups::Semigroupinline
current_size() constlibsemigroups::Semigroupinline
degree() constlibsemigroups::Semigroupinline
element_index_t typedeflibsemigroups::Semigroup
end() constlibsemigroups::Semigroupinline
enumerate(std::atomic< bool > &killed, size_t limit=LIMIT_MAX)libsemigroups::Semigroup
enumerate(size_t limit=LIMIT_MAX)libsemigroups::Semigroupinline
factorisation(word_t &word, element_index_t pos)libsemigroups::Semigroupinline
factorisation(element_index_t pos)libsemigroups::Semigroupinline
factorisation(Element const *x)libsemigroups::Semigroup
fast_product(element_index_t i, element_index_t j) constlibsemigroups::Semigroup
final_letter(element_index_t pos) constlibsemigroups::Semigroupinline
first_letter(element_index_t pos) constlibsemigroups::Semigroupinline
gens(letter_t pos) constlibsemigroups::Semigroupinline
is_begun() constlibsemigroups::Semigroupinline
is_done() constlibsemigroups::Semigroupinline
is_idempotent(element_index_t pos)libsemigroups::Semigroup
left(element_index_t i, letter_t j)libsemigroups::Semigroupinline
left_cayley_graph_copy()libsemigroups::Semigroupinline
length_const(element_index_t pos) constlibsemigroups::Semigroupinline
length_non_const(element_index_t pos)libsemigroups::Semigroupinline
letter_to_pos(letter_t i) constlibsemigroups::Semigroupinline
LIMIT_MAXlibsemigroups::Semigroupstatic
minimal_factorisation(word_t &word, element_index_t pos)libsemigroups::Semigroup
minimal_factorisation(element_index_t pos)libsemigroups::Semigroup
minimal_factorisation(Element const *x)libsemigroups::Semigroup
next_relation(word_t &relation)libsemigroups::Semigroup
nrgens() constlibsemigroups::Semigroupinline
nridempotents()libsemigroups::Semigroup
nrrules()libsemigroups::Semigroupinline
operator=(Semigroup const &semigroup)=deletelibsemigroups::Semigroup
operator[](element_index_t pos) constlibsemigroups::Semigroupinline
position(Element const *x)libsemigroups::Semigroup
position_to_sorted_position(element_index_t pos)libsemigroups::Semigroup
prefix(element_index_t pos) constlibsemigroups::Semigroupinline
product_by_reduction(element_index_t i, element_index_t j) constlibsemigroups::Semigroup
reserve(size_t n)libsemigroups::Semigroup
reset_next_relation()libsemigroups::Semigroupinline
right(element_index_t i, letter_t j)libsemigroups::Semigroupinline
right_cayley_graph_copy()libsemigroups::Semigroupinline
Semigroup(std::vector< Element const * > const *gens)libsemigroups::Semigroupexplicit
Semigroup(std::vector< Element * > const *gens)libsemigroups::Semigroupinlineexplicit
Semigroup(std::vector< Element * > *gens)libsemigroups::Semigroupinlineexplicit
Semigroup(std::vector< Element const * > *gens)libsemigroups::Semigroupinlineexplicit
Semigroup(std::vector< Element const * > const &gens)libsemigroups::Semigroupexplicit
Semigroup(std::vector< Element * > const &gens)libsemigroups::Semigroupinlineexplicit
Semigroup(std::initializer_list< Element * > gens)libsemigroups::Semigroupinlineexplicit
Semigroup(const Semigroup &copy)libsemigroups::Semigroup
set_batch_size(size_t batch_size)libsemigroups::Semigroupinline
set_max_threads(size_t nr_threads)libsemigroups::Semigroupinline
set_report(bool val) constlibsemigroups::Semigroupinline
size()libsemigroups::Semigroupinline
sorted_at(element_index_t pos)libsemigroups::Semigroup
sorted_position(Element const *x)libsemigroups::Semigroup
suffix(element_index_t pos) constlibsemigroups::Semigroupinline
test_membership(Element const *x)libsemigroups::Semigroupinline
UNDEFINEDlibsemigroups::Semigroupstatic
word_to_element(word_t const &w) constlibsemigroups::Semigroup
word_to_pos(word_t const &w) constlibsemigroups::Semigroup
~Semigroup()libsemigroups::Semigroup
- - - - diff --git a/classlibsemigroups_1_1_semigroup.html b/classlibsemigroups_1_1_semigroup.html deleted file mode 100644 index 809c408d7..000000000 --- a/classlibsemigroups_1_1_semigroup.html +++ /dev/null @@ -1,2802 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Semigroup Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -Public Member Functions | -Static Public Attributes | -List of all members
-
-
libsemigroups::Semigroup Class Reference
-
-
- -

Class for semigroups generated by instances of Element. - More...

- -

#include <semigroups.h>

- - - - - - - - -

-Public Types

typedef RecVec< element_index_tcayley_graph_t
 Type for a left or right Cayley graph of a semigroup. More...
 
typedef index_t element_index_t
 Type for the position of an element in an instance of Semigroup. The size of the semigroup being enumerated must be at most std::numeric_limits<element_index_t>::max() More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Semigroup (std::vector< Element const * > const *gens)
 Construct from generators. More...
 
 Semigroup (std::vector< Element * > const *gens)
 Construct from generators. More...
 
 Semigroup (std::vector< Element * > *gens)
 Construct from generators. More...
 
 Semigroup (std::vector< Element const * > *gens)
 Construct from generators. More...
 
 Semigroup (std::vector< Element const * > const &gens)
 Construct from generators. More...
 
 Semigroup (std::vector< Element * > const &gens)
 Construct from generators. More...
 
 Semigroup (std::initializer_list< Element * > gens)
 Construct from generators. More...
 
 Semigroup (const Semigroup &copy)
 Copy constructor. More...
 
 ~Semigroup ()
 A default destructor. More...
 
void add_generators (std::vector< Element const * > const *coll)
 Add copies of the generators coll to the generators of this. More...
 
void add_generators (std::vector< Element * > const *coll)
 Add copies of the generators coll to the generators of this. More...
 
void add_generators (std::vector< Element const * > const &coll)
 Add copies of the generators coll to the generators of this. More...
 
void add_generators (std::vector< Element * > const &coll)
 Add copies of the generators coll to the generators of this. More...
 
void add_generators (std::initializer_list< Element * > coll)
 Add copies of the generators coll to the generators of this. More...
 
Element const * at (element_index_t pos)
 Returns the element of the semigroup in position pos, or a nullptr if there is no such element. More...
 
size_t batch_size () const
 Returns the current value of the batch size. This is the minimum number of elements enumerated in any call to Semigroup::enumerate. More...
 
const_iterator begin () const
 Returns a const iterator pointing to the first element of the semigroup. More...
 
const_iterator cbegin () const
 Returns a const iterator pointing to the first element of the semigroup. More...
 
const_iterator_idempotents cbegin_idempotents ()
 Returns a const iterator pointing at the first idempotent in the semigroup. More...
 
const_iterator_sorted cbegin_sorted ()
 Returns a const iterator pointing to the first element of the semigroup when the elements are sorted by Element::operator<. More...
 
const_iterator cend () const
 Returns a const iterator pointing to one past the last currently known element of the semigroup. More...
 
const_iterator_idempotents cend_idempotents ()
 Returns a const iterator referring to past the end of the last idempotent in the semigroup. More...
 
const_iterator_sorted cend_sorted ()
 Returns a const iterator pointing to one past the last element of the semigroup when the elements are sorted by Element::operator<. More...
 
void closure (std::vector< Element const * > const *coll)
 Add copies of the non-redundant generators in coll to the generators of this. More...
 
void closure (std::vector< Element const * > const &coll)
 Add copies of the non-redundant generators in coll to the generators of this. More...
 
void closure (std::vector< Element * > const &coll)
 Add copies of the non-redundant generators in coll to the generators of this. More...
 
void closure (std::initializer_list< Element * > coll)
 Add copies of the non-redundant generators in coll to the generators of this. More...
 
Semigroupcopy_add_generators (std::vector< Element const * > const *coll) const
 Returns a new semigroup generated by this and coll. More...
 
Semigroupcopy_add_generators (std::vector< Element * > const *coll) const
 Returns a new semigroup generated by this and coll. More...
 
Semigroupcopy_closure (std::vector< Element const * > const *coll)
 Returns a new semigroup generated by this and copies of the non-redundant elements of coll. More...
 
Semigroupcopy_closure (std::vector< Element * > const *gens)
 Returns a new semigroup generated by this and copies of the non-redundant elements of coll. More...
 
const_reverse_iterator crbegin () const
 Returns a const reverse iterator pointing to the last currently known element of the semigroup. More...
 
const_reverse_iterator_sorted crbegin_sorted ()
 Returns a const iterator pointing to the last element of the semigroup when the elements are sorted by Element::operator<. More...
 
const_reverse_iterator crend () const
 Returns a const reverse iterator pointing to one before the first element of the semigroup. More...
 
const_reverse_iterator_sorted crend_sorted ()
 Returns a const iterator pointing to one before the first element of the semigroup when the elements are sorted by Element::operator<. More...
 
size_t current_max_word_length () const
 Returns the maximum length of a word in the generators so far computed. More...
 
size_t current_nrrules () const
 Returns the number of relations in the presentation for the semigroup that have been found so far. More...
 
element_index_t current_position (Element const *x) const
 Returns the position of the element x in the semigroup if it is already known to belong to the semigroup. More...
 
size_t current_size () const
 Returns the number of elements in the semigroup that have been enumerated so far. More...
 
size_t degree () const
 Returns the degree of any (and all) Element's in the semigroup. More...
 
const_iterator end () const
 Returns a const iterator pointing to one past the last currently known element of the semigroup. More...
 
void enumerate (std::atomic< bool > &killed, size_t limit=LIMIT_MAX)
 Enumerate the semigroup until limit elements are found or killed is true. More...
 
void enumerate (size_t limit=LIMIT_MAX)
 Enumerate the semigroup until limit elements are found. More...
 
void factorisation (word_t &word, element_index_t pos)
 Changes word in-place to contain a word in the generators equal to the pos element of the semigroup. More...
 
word_tfactorisation (element_index_t pos)
 Returns a pointer to a libsemigroups::word_t which evaluates to the Element in position pos of this. More...
 
word_tfactorisation (Element const *x)
 Returns a pointer to a libsemigroups::word_t which evaluates to. More...
 
element_index_t fast_product (element_index_t i, element_index_t j) const
 Returns the position in this of the product of this->at(i) and this->at(j). More...
 
letter_t final_letter (element_index_t pos) const
 Returns the last letter of the element in position pos. More...
 
letter_t first_letter (element_index_t pos) const
 Returns the first letter of the element in position pos. More...
 
Element const * gens (letter_t pos) const
 Return a pointer to the generator with index pos. More...
 
bool is_begun () const
 Returns true if no elements other than the generators have been enumerated so far and false otherwise. More...
 
bool is_done () const
 Returns true if the semigroup is fully enumerated and false if not. More...
 
bool is_idempotent (element_index_t pos)
 Returns true if the element in position pos is an idempotent and false if it is not. More...
 
element_index_t left (element_index_t i, letter_t j)
 Returns the index of the product of the generator with index j and the element in position i. More...
 
cayley_graph_tleft_cayley_graph_copy ()
 Returns a copy of the left Cayley graph of the semigroup. More...
 
size_t length_const (element_index_t pos) const
 Returns the length of the element in position pos of the semigroup. More...
 
size_t length_non_const (element_index_t pos)
 Returns the length of the element in position pos of the semigroup. More...
 
element_index_t letter_to_pos (letter_t i) const
 Returns the position in this of the generator with index i. More...
 
void minimal_factorisation (word_t &word, element_index_t pos)
 Changes word in-place to contain a minimal word with respect to the short-lex ordering in the generators equal to the pos element of the semigroup. More...
 
word_tminimal_factorisation (element_index_t pos)
 Returns a pointer to a minimal libsemigroups::word_t which evaluates to the Element in position pos of this. More...
 
word_tminimal_factorisation (Element const *x)
 Returns a pointer to a minimal libsemigroups::word_t which evaluates to x. More...
 
void next_relation (word_t &relation)
 This method changes relation in-place to contain the next relation of the presentation defining this. More...
 
size_t nrgens () const
 Returns the number of generators of the semigroup. More...
 
size_t nridempotents ()
 Returns the total number of idempotents in the semigroup. More...
 
size_t nrrules ()
 Returns the total number of relations in the presentation defining the semigroup. More...
 
Semigroupoperator= (Semigroup const &semigroup)=delete
 Deleted. More...
 
Element const * operator[] (element_index_t pos) const
 Returns the element of the semigroup in position pos. More...
 
element_index_t position (Element const *x)
 Returns the position of x in this, or Semigroup::UNDEFINED if x is not an element of this. More...
 
element_index_t position_to_sorted_position (element_index_t pos)
 Returns the position of this->at(pos) in the sorted array of elements of the semigroup, or Semigroup::UNDEFINED if pos is greater than the size of the semigroup. More...
 
element_index_t prefix (element_index_t pos) const
 Returns the position of the prefix of the element x in position pos (of the semigroup) of length one less than the length of x. More...
 
element_index_t product_by_reduction (element_index_t i, element_index_t j) const
 Returns the position in this of the product of this->at(i) and this->at(j) by following a path in the Cayley graph. More...
 
void reserve (size_t n)
 Requests that the capacity (i.e. number of elements) of the semigroup be at least enough to contain n elements. More...
 
void reset_next_relation ()
 This method resets Semigroup::next_relation so that when it is next called the resulting relation is the first one. More...
 
element_index_t right (element_index_t i, letter_t j)
 Returns the index of the product of the element in position i with the generator with index j. More...
 
cayley_graph_tright_cayley_graph_copy ()
 Returns a copy of the right Cayley graph of the semigroup. More...
 
void set_batch_size (size_t batch_size)
 Set a new value for the batch size. More...
 
void set_max_threads (size_t nr_threads)
 Set the maximum number of threads that any method of an instance of Semigroup can use. More...
 
void set_report (bool val) const
 Turn reporting on or off. More...
 
size_t size ()
 Returns the size of the semigroup. More...
 
Element const * sorted_at (element_index_t pos)
 Returns the element of the semigroup in position pos of the sorted array of elements, or nullptr in pos is not valid (i.e. too big). More...
 
element_index_t sorted_position (Element const *x)
 Returns the position of x in the sorted array of elements of the semigroup, or Semigroup::UNDEFINED if x is not an element of this. More...
 
element_index_t suffix (element_index_t pos) const
 Returns the position of the suffix of the element x in position pos (of the semigroup) of length one less than the length of x. More...
 
bool test_membership (Element const *x)
 Returns true if x is an element of this and false if it is not. More...
 
Elementword_to_element (word_t const &w) const
 Returns a pointer to the element of this represented by the word w. More...
 
element_index_t word_to_pos (word_t const &w) const
 Returns the position in the semigroup corresponding to the element represented by the word w. More...
 
- - - - - - - -

-Static Public Attributes

static index_t const LIMIT_MAX = std::numeric_limits<index_t>::max()
 This variable is used to indicate the maximum possible limit that can be used with Semigroup::enumerate. More...
 
static index_t const UNDEFINED = std::numeric_limits<index_t>::max()
 This variable is used to indicate that a value is undefined, such as, for example, the position of an element that does not belong to a semigroup. More...
 
-

Detailed Description

-

Class for semigroups generated by instances of Element.

-

Semigroups are defined by a generating set, and the main method here is Semigroup::enumerate, which implements the Froidure-Pin Algorithm. When the enumeration of the semigroup is complete, the size, the left and right Cayley graphs are determined, and a confluent terminating presentation for the semigroup is known.

-

Member Typedef Documentation

- -

◆ cayley_graph_t

- -
-
- -

Type for a left or right Cayley graph of a semigroup.

- -
-
- -

◆ element_index_t

- -
-
- - - - -
typedef index_t libsemigroups::Semigroup::element_index_t
-
- -

Type for the position of an element in an instance of Semigroup. The size of the semigroup being enumerated must be at most std::numeric_limits<element_index_t>::max()

- -
-
-

Constructor & Destructor Documentation

- -

◆ Semigroup() [1/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (std::vector< Element const * > const * gens)
-
-explicit
-
- -

Construct from generators.

-

This is the default constructor for a semigroup generated by gens. The generators gens must all be of the same derived subclass of the Element base class. Additionally, gens must satisfy the following:

-
    -
  1. there must be at least one generator
  2. -
  3. the generators must have equal degree Element::degree
  4. -
-

if either of these points is not satisfied, then an asssertion failure will occur.

-

There can be duplicate generators and although they do not count as distinct elements, they do count as distinct generators. In other words, the generators of the semigroup are precisely (a copy of) gens in the same order they occur in gens.

-

The generators gens are copied by the constructor, and so it is the responsibility of the caller to delete gens.

- -
-
- -

◆ Semigroup() [2/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (std::vector< Element * > const * gens)
-
-inlineexplicit
-
- -

Construct from generators.

-

This constructor is for convenience only, and it simply reinterpret_cast's the argument from std::vector<Element*> const* to std::vector<Element const*> const*.

- -
-
- -

◆ Semigroup() [3/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (std::vector< Element * > * gens)
-
-inlineexplicit
-
- -

Construct from generators.

-

This constructor is for convenience only, and it simply const_casts the argument from std::vector<Element*>* to std::vector<Element*> const*.

- -
-
- -

◆ Semigroup() [4/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (std::vector< Element const * > * gens)
-
-inlineexplicit
-
- -

Construct from generators.

-

This constructor is for convenience only, and it simply const_casts the argument from std::vector<Element const*>* to std::vector<Element const*> const*.

- -
-
- -

◆ Semigroup() [5/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (std::vector< Element const * > const & gens)
-
-explicit
-
- -

Construct from generators.

-

This constructor is for convenience only, see Semigroup::Semigroup.

- -
-
- -

◆ Semigroup() [6/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (std::vector< Element * > const & gens)
-
-inlineexplicit
-
- -

Construct from generators.

-

This constructor is for convenience, and it simply reinterpret_casts its argument to <std::vector<Element const*> const&.

- -
-
- -

◆ Semigroup() [7/8]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (std::initializer_list< Element * > gens)
-
-inlineexplicit
-
- -

Construct from generators.

-

This constructor is for convenience, and it simply static_casts its argument to std::vector<Element*>.

- -
-
- -

◆ Semigroup() [8/8]

- -
-
- - - - - - - - -
libsemigroups::Semigroup::Semigroup (const Semigroupcopy)
-
- -

Copy constructor.

-

Constructs a new Semigroup which is an exact copy of copy. No enumeration is triggered for either copy or of the newly constructed semigroup.

- -
-
- -

◆ ~Semigroup()

- -
-
- - - - - - - -
libsemigroups::Semigroup::~Semigroup ()
-
- -

A default destructor.

- -
-
-

Member Function Documentation

- -

◆ add_generators() [1/5]

- -
-
- - - - - - - - -
void libsemigroups::Semigroup::add_generators (std::vector< Element const * > const * coll)
-
- -

Add copies of the generators coll to the generators of this.

-

This method can be used to add new generators to the existing semigroup in such a way that any previously enumerated data is preserved and not recomputed, or copied. This can be faster than recomputing the semigroup generated by the old generators and the new generators in the parameter coll.

-

This method changes the semigroup in-place, thereby invalidating possibly previously known data about the semigroup, such as the left or right Cayley graphs, number of idempotents, and so on.

-

Every generator in coll is added regardless of whether or not it is already a generator or element of the semigroup (it may belong to the semigroup but just not be known to belong). If coll is empty, then the semigroup is left unchanged. The order the generators is added is also the order they occur in the parameter coll.

-

The semigroup is returned in a state where all of the previously enumerated elements which had been multiplied by all of the old generators, have now been multiplied by all of the old and new generators. This means that after this method is called the semigroup might contain many more elements than before (whether it is fully enumerating or not). It can also be the case that the new generators are the only new elements, unlike, say, in the case of non-trivial groups.

-

The elements the argument coll are copied into the semigroup, and should be deleted by the caller.

- -
-
- -

◆ add_generators() [2/5]

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::add_generators (std::vector< Element * > const * coll)
-
-inline
-
- -

Add copies of the generators coll to the generators of this.

-

See Semigroup::add_generators for more details.

- -
-
- -

◆ add_generators() [3/5]

- -
-
- - - - - - - - -
void libsemigroups::Semigroup::add_generators (std::vector< Element const * > const & coll)
-
- -

Add copies of the generators coll to the generators of this.

-

See Semigroup::add_generators for more details.

- -
-
- -

◆ add_generators() [4/5]

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::add_generators (std::vector< Element * > const & coll)
-
-inline
-
- -

Add copies of the generators coll to the generators of this.

-

See Semigroup::add_generators for more details.

- -
-
- -

◆ add_generators() [5/5]

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::add_generators (std::initializer_list< Element * > coll)
-
-inline
-
- -

Add copies of the generators coll to the generators of this.

-

See Semigroup::add_generators for more details.

- -
-
- -

◆ at()

- -
-
- - - - - - - - -
Element const * libsemigroups::Semigroup::at (element_index_t pos)
-
- -

Returns the element of the semigroup in position pos, or a nullptr if there is no such element.

-

This method attempts to enumerate the semigroup until at least pos + 1 elements have been found. If pos is greater than Semigroup::size, then this method returns nullptr.

- -
-
- -

◆ batch_size()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::batch_size () const
-
-inline
-
- -

Returns the current value of the batch size. This is the minimum number of elements enumerated in any call to Semigroup::enumerate.

- -
-
- -

◆ begin()

- -
-
- - - - - -
- - - - - - - -
const_iterator libsemigroups::Semigroup::begin () const
-
-inline
-
- -

Returns a const iterator pointing to the first element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ cbegin()

- -
-
- - - - - -
- - - - - - - -
const_iterator libsemigroups::Semigroup::cbegin () const
-
-inline
-
- -

Returns a const iterator pointing to the first element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ cbegin_idempotents()

- -
-
- - - - - -
- - - - - - - -
const_iterator_idempotents libsemigroups::Semigroup::cbegin_idempotents ()
-
-inline
-
- -

Returns a const iterator pointing at the first idempotent in the semigroup.

-

If the returned iterator is incremented, then it points to the second idempotent in the semigroup (if it exists), and every subsequent increment points to the next idempotent.

-

This method involves fully enumerating the semigroup, if it is not already fully enumerated.

- -
-
- -

◆ cbegin_sorted()

- -
-
- - - - - -
- - - - - - - -
const_iterator_sorted libsemigroups::Semigroup::cbegin_sorted ()
-
-inline
-
- -

Returns a const iterator pointing to the first element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ cend()

- -
-
- - - - - -
- - - - - - - -
const_iterator libsemigroups::Semigroup::cend () const
-
-inline
-
- -

Returns a const iterator pointing to one past the last currently known element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ cend_idempotents()

- -
-
- - - - - -
- - - - - - - -
const_iterator_idempotents libsemigroups::Semigroup::cend_idempotents ()
-
-inline
-
- -

Returns a const iterator referring to past the end of the last idempotent in the semigroup.

-

This method involves fully enumerating the semigroup, if it is not already fully enumerated.

- -
-
- -

◆ cend_sorted()

- -
-
- - - - - -
- - - - - - - -
const_iterator_sorted libsemigroups::Semigroup::cend_sorted ()
-
-inline
-
- -

Returns a const iterator pointing to one past the last element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ closure() [1/4]

- -
-
- - - - - - - - -
void libsemigroups::Semigroup::closure (std::vector< Element const * > const * coll)
-
- -

Add copies of the non-redundant generators in coll to the generators of this.

-

This method can be used to add new generators to an existing semigroup in such a way that any previously enumerated data is preserved and not recomputed, or copied. This can be faster than recomputing the semigroup generated by the old generators and the new in coll.

-

This method differs from Semigroup::add_generators in that it tries to add the new generators one by one, and only adds those generators that are not products of existing generators (including any new generators from coll that were added before). The generators are added in the order they occur in coll.

-

This method changes the semigroup in-place, thereby invalidating possibly previously known data about the semigroup, such as the left or right Cayley graphs, or number of idempotents, for example.

-

The elements the parameter coll are copied into the semigroup, and should be deleted by the caller.

- -
-
- -

◆ closure() [2/4]

- -
-
- - - - - - - - -
void libsemigroups::Semigroup::closure (std::vector< Element const * > const & coll)
-
- -

Add copies of the non-redundant generators in coll to the generators of this.

-

See Semigroup::closure for more details.

- -
-
- -

◆ closure() [3/4]

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::closure (std::vector< Element * > const & coll)
-
-inline
-
- -

Add copies of the non-redundant generators in coll to the generators of this.

-

See Semigroup::closure for more details.

- -
-
- -

◆ closure() [4/4]

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::closure (std::initializer_list< Element * > coll)
-
-inline
-
- -

Add copies of the non-redundant generators in coll to the generators of this.

-

See Semigroup::closure for more details.

- -
-
- -

◆ copy_add_generators() [1/2]

- -
-
- - - - - - - - -
Semigroup * libsemigroups::Semigroup::copy_add_generators (std::vector< Element const * > const * coll) const
-
- -

Returns a new semigroup generated by this and coll.

-

This method is equivalent to copying this using Semigroup::Semigroup(const Semigroup& copy) and then calling Semigroup::add_generators on the copy, but this method avoids copying the parts of this that are immediately invalidated by Semigroup::add_generators.

-

The elements the argument coll are copied into the semigroup, and should be deleted by the caller.

- -
-
- -

◆ copy_add_generators() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Semigroup* libsemigroups::Semigroup::copy_add_generators (std::vector< Element * > const * coll) const
-
-inline
-
- -

Returns a new semigroup generated by this and coll.

-

See Semigroup::copy_add_generators for more details.

- -
-
- -

◆ copy_closure() [1/2]

- -
-
- - - - - - - - -
Semigroup * libsemigroups::Semigroup::copy_closure (std::vector< Element const * > const * coll)
-
- -

Returns a new semigroup generated by this and copies of the non-redundant elements of coll.

-

This method is equivalent to copying this and then calling Semigroup::closure on the copy with coll, but this method avoids copying the parts of this that are immediately invalidated by Semigroup::closure.

-

The elements the argument coll are copied into the semigroup, and should be deleted by the caller.

- -
-
- -

◆ copy_closure() [2/2]

- -
-
- - - - - -
- - - - - - - - -
Semigroup* libsemigroups::Semigroup::copy_closure (std::vector< Element * > const * gens)
-
-inline
-
- -

Returns a new semigroup generated by this and copies of the non-redundant elements of coll.

-

See Semigroup::copy_closure for more details.

- -
-
- -

◆ crbegin()

- -
-
- - - - - -
- - - - - - - -
const_reverse_iterator libsemigroups::Semigroup::crbegin () const
-
-inline
-
- -

Returns a const reverse iterator pointing to the last currently known element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ crbegin_sorted()

- -
-
- - - - - -
- - - - - - - -
const_reverse_iterator_sorted libsemigroups::Semigroup::crbegin_sorted ()
-
-inline
-
- -

Returns a const iterator pointing to the last element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ crend()

- -
-
- - - - - -
- - - - - - - -
const_reverse_iterator libsemigroups::Semigroup::crend () const
-
-inline
-
- -

Returns a const reverse iterator pointing to one before the first element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ crend_sorted()

- -
-
- - - - - -
- - - - - - - -
const_reverse_iterator_sorted libsemigroups::Semigroup::crend_sorted ()
-
-inline
-
- -

Returns a const iterator pointing to one before the first element of the semigroup when the elements are sorted by Element::operator<.

-

This method fully enumerates the semigroup, the returned iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ current_max_word_length()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::current_max_word_length () const
-
-inline
-
- -

Returns the maximum length of a word in the generators so far computed.

-

Every elements of the semigroup can be expressed as a product of the generators. The elements of the semigroup are enumerated in the short-lex order induced by the order of the generators (as passed to Semigroup::Semigroup). This method returns the length of the longest word in the generators that has so far been enumerated.

- -
-
- -

◆ current_nrrules()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::current_nrrules () const
-
-inline
-
- -

Returns the number of relations in the presentation for the semigroup that have been found so far.

-

This is only the actual number of relations in a presentation defining the semigroup if the semigroup is fully enumerated.

- -
-
- -

◆ current_position()

- -
-
- - - - - -
- - - - - - - - -
element_index_t libsemigroups::Semigroup::current_position (Element const * x) const
-
-inline
-
- -

Returns the position of the element x in the semigroup if it is already known to belong to the semigroup.

-

This method finds the position of the element x in the semigroup if it is already known to belong to the semigroup, and libsemigroups::Semigroup::UNDEFINED if not. If the semigroup is not fully enumerated, then this method may return libsemigroups::Semigroup::UNDEFINED when x is in the semigroup, but not this is not yet known.

-
See also
Semigroup::position and Semigroup::sorted_position.
- -
-
- -

◆ current_size()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::current_size () const
-
-inline
-
- -

Returns the number of elements in the semigroup that have been enumerated so far.

-

This is only the actual size of the semigroup if the semigroup is fully enumerated.

- -
-
- -

◆ degree()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::degree () const
-
-inline
-
- -

Returns the degree of any (and all) Element's in the semigroup.

- -
-
- -

◆ end()

- -
-
- - - - - -
- - - - - - - -
const_iterator libsemigroups::Semigroup::end () const
-
-inline
-
- -

Returns a const iterator pointing to one past the last currently known element of the semigroup.

-

This method does not perform any enumeration of the semigroup, the iterator returned may be invalidated by any call to a non-const method of the Semigroup class.

- -
-
- -

◆ enumerate() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - -
void libsemigroups::Semigroup::enumerate (std::atomic< bool > & killed,
size_t limit = LIMIT_MAX 
)
-
- -

Enumerate the semigroup until limit elements are found or killed is true.

-

This is the main method of the Semigroup class, where the Froidure-Pin Algorithm is implemented.

-

If the semigroup is already fully enumerated, or the number of elements previously enumerated exceeds limit, then calling this method does nothing. Otherwise, enumerate attempts to find at least the maximum of limit and Semigroup::batch_size elements of the semigroup. If killed is set to true (usually by another process), then the enumeration is terminated as soon as possible. It is possible to resume enumeration at some later point after any call to this method, even if it has been killed.

-

If the semigroup is fully enumerated, then it knows its left and right Cayley graphs, and a minimal factorisation of every element (in terms of its generating set). All of the elements are stored in memory until the object is destroyed.

-

The parameter limit defaults to Semigroup::LIMIT_MAX.

- -
-
- -

◆ enumerate() [2/2]

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::enumerate (size_t limit = LIMIT_MAX)
-
-inline
-
- -

Enumerate the semigroup until limit elements are found.

-

See Semigroup::enumerate(std::atomic<bool>& killed, size_t limit) for more details.

- -
-
- -

◆ factorisation() [1/3]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::Semigroup::factorisation (word_tword,
element_index_t pos 
)
-
-inline
-
- -

Changes word in-place to contain a word in the generators equal to the pos element of the semigroup.

-

The key difference between this method and Semigroup::minimal_factorisation(word_t& word, element_index_t pos), is that the resulting factorisation may not be minimal.

- -
-
- -

◆ factorisation() [2/3]

- -
-
- - - - - -
- - - - - - - - -
word_t* libsemigroups::Semigroup::factorisation (element_index_t pos)
-
-inline
-
- -

Returns a pointer to a libsemigroups::word_t which evaluates to the Element in position pos of this.

-

The key difference between this method and Semigroup::minimal_factorisation(element_index_t pos), is that the resulting factorisation may not be minimal.

- -
-
- -

◆ factorisation() [3/3]

- -
-
- - - - - - - - -
word_t * libsemigroups::Semigroup::factorisation (Element const * x)
-
- -

Returns a pointer to a libsemigroups::word_t which evaluates to.

-

The key difference between this method and Semigroup::minimal_factorisation(Element const* x), is that the resulting factorisation may not be minimal.

- -
-
- -

◆ fast_product()

- -
-
- - - - - - - - - - - - - - - - - - -
Semigroup::element_index_t libsemigroups::Semigroup::fast_product (element_index_t i,
element_index_t j 
) const
-
- -

Returns the position in this of the product of this->at(i) and this->at(j).

-

This method asserts that the parameters i and j are less than Semigroup::current_size, and it either:

-
    -
  • follows the path in the right or left Cayley graph from i to j, whichever is shorter using Semigroup::product_by_reduction; or
  • -
  • multiplies the elements in postions i and j together;
  • -
-

whichever is better. The method used is determined by comparing Element::complexity and the Semigroup::length_const of i and j.

-

For example, if the Element::complexity of the multiplication is linear and this is a semigroup of transformations of degree 20, and the shortest paths in the left and right Cayley graphs from i to j are of length 100 and 1131, then it better to just multiply the transformations together.

- -
-
- -

◆ final_letter()

- -
-
- - - - - -
- - - - - - - - -
letter_t libsemigroups::Semigroup::final_letter (element_index_t pos) const
-
-inline
-
- -

Returns the last letter of the element in position pos.

-

This method returns the final letter of the element in position pos of the semigroup, which is the index of the generator corresponding to the first letter of the element.

-

Note that Semigroup::gens[Semigroup::final_letter(pos)] is only equal to Semigroup::at(Semigroup::final_letter(pos)) if there are no duplicate generators.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, this is asserted in the method.

- -
-
- -

◆ first_letter()

- -
-
- - - - - -
- - - - - - - - -
letter_t libsemigroups::Semigroup::first_letter (element_index_t pos) const
-
-inline
-
- -

Returns the first letter of the element in position pos.

-

This method returns the first letter of the element in position pos of the semigroup, which is the index of the generator corresponding to the first letter of the element.

-

Note that Semigroup::gens[Semigroup::first_letter(pos)] is only equal to Semigroup::at(Semigroup::first_letter(pos)) if there are no duplicate generators.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, this is asserted in the method.

- -
-
- -

◆ gens()

- -
-
- - - - - -
- - - - - - - - -
Element const* libsemigroups::Semigroup::gens (letter_t pos) const
-
-inline
-
- -

Return a pointer to the generator with index pos.

- -
-
- -

◆ is_begun()

- -
-
- - - - - -
- - - - - - - -
bool libsemigroups::Semigroup::is_begun () const
-
-inline
-
- -

Returns true if no elements other than the generators have been enumerated so far and false otherwise.

- -
-
- -

◆ is_done()

- -
-
- - - - - -
- - - - - - - -
bool libsemigroups::Semigroup::is_done () const
-
-inline
-
- -

Returns true if the semigroup is fully enumerated and false if not.

-

The semigroup is fully enumerated when the product of every element by every generator is known.

- -
-
- -

◆ is_idempotent()

- -
-
- - - - - - - - -
bool libsemigroups::Semigroup::is_idempotent (element_index_t pos)
-
- -

Returns true if the element in position pos is an idempotent and false if it is not.

-

This method involves fully enumerating the semigroup, if it is not already fully enumerated.

- -
-
- -

◆ left()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
element_index_t libsemigroups::Semigroup::left (element_index_t i,
letter_t j 
)
-
-inline
-
- -

Returns the index of the product of the generator with index j and the element in position i.

-

This method fully enumerates the semigroup.

- -
-
- -

◆ left_cayley_graph_copy()

- -
-
- - - - - -
- - - - - - - -
cayley_graph_t* libsemigroups::Semigroup::left_cayley_graph_copy ()
-
-inline
-
- -

Returns a copy of the left Cayley graph of the semigroup.

-

This method fully enumerates the semigroup.

- -
-
- -

◆ length_const()

- -
-
- - - - - -
- - - - - - - - -
size_t libsemigroups::Semigroup::length_const (element_index_t pos) const
-
-inline
-
- -

Returns the length of the element in position pos of the semigroup.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, this is asserted in the method. This method causes no enumeration of the semigroup.

- -
-
- -

◆ length_non_const()

- -
-
- - - - - -
- - - - - - - - -
size_t libsemigroups::Semigroup::length_non_const (element_index_t pos)
-
-inline
-
- -

Returns the length of the element in position pos of the semigroup.

-

The parameter pos must be a valid position of an element of the semigroup, this is asserted in the method.

- -
-
- -

◆ letter_to_pos()

- -
-
- - - - - -
- - - - - - - - -
element_index_t libsemigroups::Semigroup::letter_to_pos (letter_t i) const
-
-inline
-
- -

Returns the position in this of the generator with index i.

-

This method asserts that the value of i is valid. In many cases letter_to_pos(i) will equal i, examples of when this will not be the case are:

-
    -
  • there are duplicate generators;
  • -
  • Semigroup::add_generators was called after the semigroup was already partially enumerated.
  • -
- -
-
- -

◆ minimal_factorisation() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - -
void libsemigroups::Semigroup::minimal_factorisation (word_tword,
element_index_t pos 
)
-
- -

Changes word in-place to contain a minimal word with respect to the short-lex ordering in the generators equal to the pos element of the semigroup.

-

If pos is less than the size of this semigroup, then this method changes its first parameter word in-place by first clearing it and then to contain a minimal factorization of the element in position pos of the semigroup with respect to the generators of the semigroup. This method enumerates the semigroup until at least the pos element is known. If pos is greater than the size of the semigroup, then nothing happens and word is not modified, in particular not cleared.

- -
-
- -

◆ minimal_factorisation() [2/3]

- -
-
- - - - - - - - -
word_t * libsemigroups::Semigroup::minimal_factorisation (element_index_t pos)
-
- -

Returns a pointer to a minimal libsemigroups::word_t which evaluates to the Element in position pos of this.

-

This is the same as the two-argument method for Semigroup::minimal_factorisation, but it returns a pointer to the factorisation instead of modifying an argument in-place.

- -
-
- -

◆ minimal_factorisation() [3/3]

- -
-
- - - - - - - - -
word_t * libsemigroups::Semigroup::minimal_factorisation (Element const * x)
-
- -

Returns a pointer to a minimal libsemigroups::word_t which evaluates to x.

-

This is the same as the method taking a Semigroup::element_index_t, but it factorises an Element instead of using the position of an element.

- -
-
- -

◆ next_relation()

- -
-
- - - - - - - - -
void libsemigroups::Semigroup::next_relation (word_trelation)
-
- -

This method changes relation in-place to contain the next relation of the presentation defining this.

-

This method changes relation in-place so that one of the following holds:

- -

Semigroup::next_relation is guaranteed to output all relations of length 2 before any relations of length 3. If called repeatedly after Semigroup::reset_next_relation, and until relation is empty, the values placed in relation correspond to a length-reducing confluent rewriting system that defines the semigroup.

-

This method can be used in conjunction with Semigroup::factorisation to obtain a presentation defining the semigroup.

-
See also
Semigroup::reset_next_relation.
- -
-
- -

◆ nrgens()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::nrgens () const
-
-inline
-
- -

Returns the number of generators of the semigroup.

- -
-
- -

◆ nridempotents()

- -
-
- - - - - - - -
size_t libsemigroups::Semigroup::nridempotents ()
-
- -

Returns the total number of idempotents in the semigroup.

-

This method involves fully enumerating the semigroup, if it is not already fully enumerated. The value of the positions, and number, of idempotents is stored after they are first computed.

- -
-
- -

◆ nrrules()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::nrrules ()
-
-inline
-
- -

Returns the total number of relations in the presentation defining the semigroup.

-
See also
Semigroup::next_relation.
- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
Semigroup& libsemigroups::Semigroup::operator= (Semigroup const & semigroup)
-
-delete
-
- -

Deleted.

-

The Semigroup class does not support an assignment contructor to avoid accidental copying. An object in Semigroup may use many gigabytes of memory and might be extremely expensive to copy. A copy constructor is provided in case such a copy should it be required anyway.

- -
-
- -

◆ operator[]()

- -
-
- - - - - -
- - - - - - - - -
Element const* libsemigroups::Semigroup::operator[] (element_index_t pos) const
-
-inline
-
- -

Returns the element of the semigroup in position pos.

-

This method performs no checks on its argument, and performs no enumeration of the semigroup.

- -
-
- -

◆ position()

- -
-
- - - - - - - - -
Semigroup::element_index_t libsemigroups::Semigroup::position (Element const * x)
-
- -

Returns the position of x in this, or Semigroup::UNDEFINED if x is not an element of this.

-

This method can be used to find the Semigroup::element_index_t position of the element x if it belongs to the semigroup. The semigroup is enumerated in batches until x is found or the semigroup is fully enumerated but x was not found (see Semigroup::set_batch_size).

- -
-
- -

◆ position_to_sorted_position()

- -
-
- - - - - - - - -
Semigroup::element_index_t libsemigroups::Semigroup::position_to_sorted_position (element_index_t pos)
-
- -

Returns the position of this->at(pos) in the sorted array of elements of the semigroup, or Semigroup::UNDEFINED if pos is greater than the size of the semigroup.

- -
-
- -

◆ prefix()

- -
-
- - - - - -
- - - - - - - - -
element_index_t libsemigroups::Semigroup::prefix (element_index_t pos) const
-
-inline
-
- -

Returns the position of the prefix of the element x in position pos (of the semigroup) of length one less than the length of x.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, this is asserted in the method.

- -
-
- -

◆ product_by_reduction()

- -
-
- - - - - - - - - - - - - - - - - - -
Semigroup::element_index_t libsemigroups::Semigroup::product_by_reduction (element_index_t i,
element_index_t j 
) const
-
- -

Returns the position in this of the product of this->at(i) and this->at(j) by following a path in the Cayley graph.

-

This method asserts that the values i and j are valid, in that they are less than Semigroup::current_size. This method returns the position Semigroup::element_index_t in the semigroup of the product of this->at(i) and this->at(j) elements by following the path in the right or left Cayley graph from i to j, whichever is shorter.

- -
-
- -

◆ reserve()

- -
-
- - - - - - - - -
void libsemigroups::Semigroup::reserve (size_t n)
-
- -

Requests that the capacity (i.e. number of elements) of the semigroup be at least enough to contain n elements.

-

The parameter n is also used to initialise certain data members, if you know a good upper bound for the size of your semigroup, then it is a good idea to call this method with that upper bound as an argument, this can significantly improve the performance of the Semigroup::enumerate method, and consequently every other method too.

- -
-
- -

◆ reset_next_relation()

- -
-
- - - - - -
- - - - - - - -
void libsemigroups::Semigroup::reset_next_relation ()
-
-inline
-
- -

This method resets Semigroup::next_relation so that when it is next called the resulting relation is the first one.

-

After a call to this function, the next call to Semigroup::next_relation will return the first relation of the presentation defining the semigroup.

- -
-
- -

◆ right()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
element_index_t libsemigroups::Semigroup::right (element_index_t i,
letter_t j 
)
-
-inline
-
- -

Returns the index of the product of the element in position i with the generator with index j.

-

This method fully enumerates the semigroup.

- -
-
- -

◆ right_cayley_graph_copy()

- -
-
- - - - - -
- - - - - - - -
cayley_graph_t* libsemigroups::Semigroup::right_cayley_graph_copy ()
-
-inline
-
- -

Returns a copy of the right Cayley graph of the semigroup.

-

This method fully enumerates the semigroup.

- -
-
- -

◆ set_batch_size()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::set_batch_size (size_t batch_size)
-
-inline
-
- -

Set a new value for the batch size.

-

The batch size is the number of new elements to be found by any call to Semigroup::enumerate. A call to enumerate returns between 0 and approximately the batch size.

-

The default value of the batch size is 8192.

-

This is used by, for example, Semigroup::position so that it is possible to find the position of an element without fully enumerating the semigroup.

- -
-
- -

◆ set_max_threads()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::set_max_threads (size_t nr_threads)
-
-inline
-
- -

Set the maximum number of threads that any method of an instance of Semigroup can use.

-

This method sets the maximum number of threads to be used by any method of a Semigroup object. The number of threads is limited to the maximum of 1 and the minimum of nr_threads and the number of threads supported by the hardware.

- -
-
- -

◆ set_report()

- -
-
- - - - - -
- - - - - - - - -
void libsemigroups::Semigroup::set_report (bool val) const
-
-inline
-
- -

Turn reporting on or off.

-

If val is true, then some methods for a Semigroup object may report information about the progress of the computation.

- -
-
- -

◆ size()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::Semigroup::size ()
-
-inline
-
- -

Returns the size of the semigroup.

- -
-
- -

◆ sorted_at()

- -
-
- - - - - - - - -
Element const * libsemigroups::Semigroup::sorted_at (element_index_t pos)
-
- -

Returns the element of the semigroup in position pos of the sorted array of elements, or nullptr in pos is not valid (i.e. too big).

-

This method fully enumerates the semigroup.

- -
-
- -

◆ sorted_position()

- -
-
- - - - - - - - -
Semigroup::element_index_t libsemigroups::Semigroup::sorted_position (Element const * x)
-
- -

Returns the position of x in the sorted array of elements of the semigroup, or Semigroup::UNDEFINED if x is not an element of this.

- -
-
- -

◆ suffix()

- -
-
- - - - - -
- - - - - - - - -
element_index_t libsemigroups::Semigroup::suffix (element_index_t pos) const
-
-inline
-
- -

Returns the position of the suffix of the element x in position pos (of the semigroup) of length one less than the length of x.

-

The parameter pos must be a valid position of an already enumerated element of the semigroup, this is asserted in the method.

- -
-
- -

◆ test_membership()

- -
-
- - - - - -
- - - - - - - - -
bool libsemigroups::Semigroup::test_membership (Element const * x)
-
-inline
-
- -

Returns true if x is an element of this and false if it is not.

-

This method can be used to check if the element x is an element of the semigroup. The semigroup is enumerated in batches until x is found or the semigroup is fully enumerated but x was not found (see Semigroup::set_batch_size).

- -
-
- -

◆ word_to_element()

- -
-
- - - - - - - - -
Element * libsemigroups::Semigroup::word_to_element (word_t const & w) const
-
- -

Returns a pointer to the element of this represented by the word w.

-

The parameter w must consist of non-negative integers less than Semigroup::nrgens. This method returns a pointer to the element of this obtained by evaluating w. This is equivalent to finding the product x of the generators Semigroup::gens(w[i]).

-
See also
Semigroup::word_to_pos.
- -
-
- -

◆ word_to_pos()

- -
-
- - - - - - - - -
Semigroup::element_index_t libsemigroups::Semigroup::word_to_pos (word_t const & w) const
-
- -

Returns the position in the semigroup corresponding to the element represented by the word w.

-

The parameter w must consist of non-negative integers less than Semigroup::nrgens. This method returns the position in this of the element obtained by evaluating w. This is equivalent to finding the product x of the generators Semigroup::gens(w[i]) and then calling Semigroup::position with argument x.

-
See also
Semigroup::word_to_element.
- -
-
-

Member Data Documentation

- -

◆ LIMIT_MAX

- -
-
- - - - - -
- - - - -
Semigroup::index_t const libsemigroups::Semigroup::LIMIT_MAX = std::numeric_limits<index_t>::max()
-
-static
-
- -

This variable is used to indicate the maximum possible limit that can be used with Semigroup::enumerate.

- -
-
- -

◆ UNDEFINED

- -
-
- - - - - -
- - - - -
Semigroup::index_t const libsemigroups::Semigroup::UNDEFINED = std::numeric_limits<index_t>::max()
-
-static
-
- -

This variable is used to indicate that a value is undefined, such as, for example, the position of an element that does not belong to a semigroup.

- -
-
-
The documentation for this class was generated from the following files: -
- - - - diff --git a/classlibsemigroups_1_1_semigroup_1_1const__iterator-members.html b/classlibsemigroups_1_1_semigroup_1_1const__iterator-members.html deleted file mode 100644 index 541e043e2..000000000 --- a/classlibsemigroups_1_1_semigroup_1_1const__iterator-members.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Semigroup::const_iterator Member List
-
-
- -

This is the complete list of members for libsemigroups::Semigroup::const_iterator, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const_iterator(typename std::vector< Element const *>::const_iterator it_vec) (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinlineexplicit
const_iterator(const_iterator const &that) (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
difference_type typedef (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iterator
iterator_category typedef (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iterator
operator!=(const_iterator const &that) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator*() const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator+(size_type val) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator+ (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorfriend
operator++(int) (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator++() (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator+=(size_type val) (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator-(size_type val) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator-(const_iterator that) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator--(int) (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator--() (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator-=(size_type val) (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator->() const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator<(const_iterator const &that) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator<=(const_iterator const &that) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator=(const_iterator const &that) (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator==(const_iterator const &that) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator>(const_iterator const &that) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator>=(const_iterator const &that) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
operator[](size_type pos) const (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iteratorinline
pointer typedef (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iterator
reference typedef (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iterator
size_type typedef (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iterator
value_type typedef (defined in libsemigroups::Semigroup::const_iterator)libsemigroups::Semigroup::const_iterator
- - - - diff --git a/classlibsemigroups_1_1_semigroup_1_1const__iterator.html b/classlibsemigroups_1_1_semigroup_1_1const__iterator.html deleted file mode 100644 index 6e10817a0..000000000 --- a/classlibsemigroups_1_1_semigroup_1_1const__iterator.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Semigroup::const_iterator Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -Public Member Functions | -Friends | -List of all members
-
-
libsemigroups::Semigroup::const_iterator Class Reference
-
-
- - - - - - - - - - - - - - -

-Public Types

-typedef std::vector< Element const * >::difference_type difference_type
 
-typedef std::random_access_iterator_tag iterator_category
 
-typedef std::vector< Element const * >::const_pointer pointer
 
-typedef std::vector< Element const * >::const_reference reference
 
-typedef std::vector< Element const * >::size_type size_type
 
-typedef std::vector< Element const * >::value_type value_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

const_iterator (typename std::vector< Element const *>::const_iterator it_vec)
 
const_iterator (const_iterator const &that)
 
-bool operator!= (const_iterator const &that) const
 
-reference operator* () const
 
-const_iterator operator+ (size_type val) const
 
-const_iterator operator++ (int)
 
-const_iteratoroperator++ ()
 
-const_iteratoroperator+= (size_type val)
 
-const_iterator operator- (size_type val) const
 
-difference_type operator- (const_iterator that) const
 
-const_iterator operator-- (int)
 
-const_iteratoroperator-- ()
 
-const_iteratoroperator-= (size_type val)
 
-pointer operator-> () const
 
-bool operator< (const_iterator const &that) const
 
-bool operator<= (const_iterator const &that) const
 
-const_iteratoroperator= (const_iterator const &that)
 
-bool operator== (const_iterator const &that) const
 
-bool operator> (const_iterator const &that) const
 
-bool operator>= (const_iterator const &that) const
 
-reference operator[] (size_type pos) const
 
- - - -

-Friends

-const_iterator operator+ (size_type val, const_iterator const &it)
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_semigroup_1_1iterator__base-members.html b/classlibsemigroups_1_1_semigroup_1_1iterator__base-members.html deleted file mode 100644 index 3115c651b..000000000 --- a/classlibsemigroups_1_1_semigroup_1_1iterator__base-members.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Semigroup::iterator_base< T, C > Member List
-
-
- -

This is the complete list of members for libsemigroups::Semigroup::iterator_base< T, C >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_it_vec (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >protected
_methods (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >protectedstatic
difference_type typedef (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >
iterator_base(typename std::vector< T >::const_iterator it_vec) (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inlineexplicit
iterator_base(iterator_base const &that) (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
iterator_category typedef (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >
operator!=(iterator_base const &that) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator*() const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator+(size_type val) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator+ (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >friend
operator++(int) (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator++() (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator+=(size_type val) (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator-(size_type val) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator-(iterator_base that) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator--(int) (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator--() (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator-=(size_type val) (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator->() const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator<(iterator_base const &that) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator<=(iterator_base const &that) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator=(iterator_base const &that) (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator==(iterator_base const &that) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator>(iterator_base const &that) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator>=(iterator_base const &that) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
operator[](size_type pos) const (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inline
pointer typedef (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >
reference typedef (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >
size_type typedef (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >
value_type typedef (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >
~iterator_base() (defined in libsemigroups::Semigroup::iterator_base< T, C >)libsemigroups::Semigroup::iterator_base< T, C >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_semigroup_1_1iterator__base.html b/classlibsemigroups_1_1_semigroup_1_1iterator__base.html deleted file mode 100644 index 43fbfc564..000000000 --- a/classlibsemigroups_1_1_semigroup_1_1iterator__base.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Semigroup::iterator_base< T, C > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -Public Member Functions | -Protected Attributes | -Static Protected Attributes | -Friends | -List of all members
-
-
libsemigroups::Semigroup::iterator_base< T, C > Class Template Reference
-
-
- - - - - - - - - - - - - - -

-Public Types

-typedef std::vector< T >::difference_type difference_type
 
-typedef std::random_access_iterator_tag iterator_category
 
-typedef std::vector< Element const * >::const_pointer pointer
 
-typedef std::vector< Element const * >::const_reference reference
 
-typedef std::vector< Element const * >::size_type size_type
 
-typedef std::vector< Element const * >::value_type value_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

iterator_base (typename std::vector< T >::const_iterator it_vec)
 
iterator_base (iterator_base const &that)
 
-bool operator!= (iterator_base const &that) const
 
-reference operator* () const
 
-iterator_base operator+ (size_type val) const
 
-iterator_base operator++ (int)
 
-iterator_baseoperator++ ()
 
-iterator_baseoperator+= (size_type val)
 
-iterator_base operator- (size_type val) const
 
-difference_type operator- (iterator_base that) const
 
-iterator_base operator-- (int)
 
-iterator_baseoperator-- ()
 
-iterator_baseoperator-= (size_type val)
 
-pointer operator-> () const
 
-bool operator< (iterator_base const &that) const
 
-bool operator<= (iterator_base const &that) const
 
-iterator_baseoperator= (iterator_base const &that)
 
-bool operator== (iterator_base const &that) const
 
-bool operator> (iterator_base const &that) const
 
-bool operator>= (iterator_base const &that) const
 
-reference operator[] (size_type pos) const
 
- - - -

-Protected Attributes

-std::vector< T >::const_iterator _it_vec
 
- - - -

-Static Protected Attributes

-static C const _methods
 
- - - -

-Friends

-iterator_base operator+ (size_type val, iterator_base const &it)
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_semiring-members.html b/classlibsemigroups_1_1_semiring-members.html deleted file mode 100644 index 04227b9a7..000000000 --- a/classlibsemigroups_1_1_semiring-members.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Semiring< T > Member List
-
-
- -

This is the complete list of members for libsemigroups::Semiring< T >, including all inherited members.

- - - - - - - - - -
INFTYlibsemigroups::Semiring< T >static
MINUS_INFTYlibsemigroups::Semiring< T >static
one() const =0libsemigroups::Semiring< T >pure virtual
plus(T x, T y) const =0libsemigroups::Semiring< T >pure virtual
prod(T x, T y) const =0libsemigroups::Semiring< T >pure virtual
UNDEFINEDlibsemigroups::Semiring< T >static
zero() const =0libsemigroups::Semiring< T >pure virtual
~Semiring()libsemigroups::Semiring< T >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_semiring.html b/classlibsemigroups_1_1_semiring.html deleted file mode 100644 index 7b2f68236..000000000 --- a/classlibsemigroups_1_1_semiring.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Semiring< T > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Static Public Attributes | -List of all members
-
-
libsemigroups::Semiring< T > Class Template Referenceabstract
-
-
- -

This class its subclasses provide very basic functionality for creating semirings. - More...

- -

#include <semiring.h>

- - - - - - - - - - - - - - - - - -

-Public Member Functions

virtual ~Semiring ()
 A default destructor. More...
 
virtual T one () const =0
 Returns the multiplicative identity, or one, of the semiring. More...
 
virtual T plus (T x, T y) const =0
 Returns the sum of x and y. More...
 
virtual T prod (T x, T y) const =0
 Returns the product of x and y. More...
 
virtual T zero () const =0
 Returns the additive identity, or zero, of the semiring. More...
 
- - - - - - - - - - -

-Static Public Attributes

static const T INFTY = std::numeric_limits<T>::max()
 Value representing \(\infty\). More...
 
static const T MINUS_INFTY = std::numeric_limits<T>::min()
 Value representing \(-\infty\). More...
 
static const T UNDEFINED = std::numeric_limits<T>::max()
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

template<typename T>
-class libsemigroups::Semiring< T >

- -

This class its subclasses provide very basic functionality for creating semirings.

-

A semiring is a set \(R\) together with two binary operations \(+\) and \(\times\) (called addition and multiplication) such that \((R, +)\) is a commutative monoid with identity \(0\), \((R, \times)\) is a monoid with identity \(1\), and the following hold:

- -

More information about semirings can be found on Wikipedia.

-

Constructor & Destructor Documentation

- -

◆ ~Semiring()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - -
virtual libsemigroups::Semiring< T >::~Semiring ()
-
-inlinevirtual
-
- -

A default destructor.

- -
-
-

Member Function Documentation

- -

◆ one()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - -
virtual T libsemigroups::Semiring< T >::one () const
-
-pure virtual
-
-
- -

◆ plus()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - - - - - - - - - - - -
virtual T libsemigroups::Semiring< T >::plus (x,
y 
) const
-
-pure virtual
-
-
- -

◆ prod()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - - - - - - - - - - - -
virtual T libsemigroups::Semiring< T >::prod (x,
y 
) const
-
-pure virtual
-
-
- -

◆ zero()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - -
virtual T libsemigroups::Semiring< T >::zero () const
-
-pure virtual
-
-
-

Member Data Documentation

- -

◆ INFTY

- -
-
-
-template<typename T>
- - - - - -
- - - - -
const T libsemigroups::Semiring< T >::INFTY = std::numeric_limits<T>::max()
-
-static
-
- -

Value representing \(\infty\).

- -
-
- -

◆ MINUS_INFTY

- -
-
-
-template<typename T>
- - - - - -
- - - - -
const T libsemigroups::Semiring< T >::MINUS_INFTY = std::numeric_limits<T>::min()
-
-static
-
- -

Value representing \(-\infty\).

- -
-
- -

◆ UNDEFINED

- -
-
-
-template<typename T>
- - - - - -
- - - - -
const T libsemigroups::Semiring< T >::UNDEFINED = std::numeric_limits<T>::max()
-
-static
-
- -

Value representing an undefined quantity.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_semiring.png b/classlibsemigroups_1_1_semiring.png deleted file mode 100644 index c3b0edb8f..000000000 Binary files a/classlibsemigroups_1_1_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_semiring__coll__graph.map b/classlibsemigroups_1_1_semiring__coll__graph.map deleted file mode 100644 index 5fc135cff..000000000 --- a/classlibsemigroups_1_1_semiring__coll__graph.map +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/classlibsemigroups_1_1_semiring__coll__graph.md5 b/classlibsemigroups_1_1_semiring__coll__graph.md5 deleted file mode 100644 index dc11818c3..000000000 --- a/classlibsemigroups_1_1_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1c558ca833b2518987a50afa75f0cee3 diff --git a/classlibsemigroups_1_1_semiring__coll__graph.png b/classlibsemigroups_1_1_semiring__coll__graph.png deleted file mode 100644 index 9a50996da..000000000 Binary files a/classlibsemigroups_1_1_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_semiring__inherit__graph.map b/classlibsemigroups_1_1_semiring__inherit__graph.map deleted file mode 100644 index 72373e69d..000000000 --- a/classlibsemigroups_1_1_semiring__inherit__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/classlibsemigroups_1_1_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_semiring__inherit__graph.md5 deleted file mode 100644 index d94447238..000000000 --- a/classlibsemigroups_1_1_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e3e96ec8015b264706765fe93ef1ee54 diff --git a/classlibsemigroups_1_1_semiring__inherit__graph.png b/classlibsemigroups_1_1_semiring__inherit__graph.png deleted file mode 100644 index 998f4db5c..000000000 Binary files a/classlibsemigroups_1_1_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_semiring_with_threshold-members.html b/classlibsemigroups_1_1_semiring_with_threshold-members.html deleted file mode 100644 index ddaa337a8..000000000 --- a/classlibsemigroups_1_1_semiring_with_threshold-members.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::SemiringWithThreshold Member List
-
-
- -

This is the complete list of members for libsemigroups::SemiringWithThreshold, including all inherited members.

- - - - - - - - - - - -
INFTYlibsemigroups::Semiring< int64_t >static
MINUS_INFTYlibsemigroups::Semiring< int64_t >static
one() const=0libsemigroups::Semiring< int64_t >pure virtual
plus(int64_t x, int64_t y) const=0libsemigroups::Semiring< int64_t >pure virtual
prod(int64_t x, int64_t y) const=0libsemigroups::Semiring< int64_t >pure virtual
SemiringWithThreshold(int64_t threshold)libsemigroups::SemiringWithThresholdinlineexplicit
threshold() constlibsemigroups::SemiringWithThresholdinline
UNDEFINEDlibsemigroups::Semiring< int64_t >static
zero() const=0libsemigroups::Semiring< int64_t >pure virtual
~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_semiring_with_threshold.html b/classlibsemigroups_1_1_semiring_with_threshold.html deleted file mode 100644 index a61591f4e..000000000 --- a/classlibsemigroups_1_1_semiring_with_threshold.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::SemiringWithThreshold Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::SemiringWithThreshold Class Reference
-
-
- -

This abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring. - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::SemiringWithThreshold:
-
-
Inheritance graph
- - - - - - - -
-
-Collaboration diagram for libsemigroups::SemiringWithThreshold:
-
-
Collaboration graph
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 SemiringWithThreshold (int64_t threshold)
 A class for semirings with a threshold. More...
 
int64_t threshold () const
 Returns the threshold of a semiring with threshold. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< int64_t >
virtual ~Semiring ()
 A default destructor. More...
 
virtual int64_t one () const=0
 Returns the multiplicative identity, or one, of the semiring. More...
 
virtual int64_t plus (int64_t x, int64_t y) const=0
 Returns the sum of x and y. More...
 
virtual int64_t prod (int64_t x, int64_t y) const=0
 Returns the product of x and y. More...
 
virtual int64_t zero () const=0
 Returns the additive identity, or zero, of the semiring. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< int64_t >
static const int64_t INFTY
 Value representing \(\infty\). More...
 
static const int64_t MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const int64_t UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

This abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring.

-

Constructor & Destructor Documentation

- -

◆ SemiringWithThreshold()

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::SemiringWithThreshold::SemiringWithThreshold (int64_t threshold)
-
-inlineexplicit
-
- -

A class for semirings with a threshold.

-

The threshold of a semiring is related to the largest finite value in the semiring.

- -
-
-

Member Function Documentation

- -

◆ threshold()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::SemiringWithThreshold::threshold () const
-
-inline
-
- -

Returns the threshold of a semiring with threshold.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_semiring_with_threshold.png b/classlibsemigroups_1_1_semiring_with_threshold.png deleted file mode 100644 index 9916260e9..000000000 Binary files a/classlibsemigroups_1_1_semiring_with_threshold.png and /dev/null differ diff --git a/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.map b/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.map deleted file mode 100644 index cb3f2900b..000000000 --- a/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.md5 b/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.md5 deleted file mode 100644 index 5c952d576..000000000 --- a/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -666d39995e68d055c27b337f4512f3c2 \ No newline at end of file diff --git a/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.png b/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.png deleted file mode 100644 index 3ec86df32..000000000 Binary files a/classlibsemigroups_1_1_semiring_with_threshold__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.map b/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.map deleted file mode 100644 index 1a7848cce..000000000 --- a/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.md5 b/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.md5 deleted file mode 100644 index 1cdd4579d..000000000 --- a/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1e8ec5ef912a12f2cb30409bf8de3051 \ No newline at end of file diff --git a/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.png b/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.png deleted file mode 100644 index 2b67790f5..000000000 Binary files a/classlibsemigroups_1_1_semiring_with_threshold__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_transf-members.html b/classlibsemigroups_1_1_transf-members.html deleted file mode 100644 index 851f860e5..000000000 --- a/classlibsemigroups_1_1_transf-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Transf< TValueType, TContainer > Member List
-
-
- -

This is the complete list of members for libsemigroups::Transf< TValueType, TContainer >, including all inherited members.

- - -
in_place_product(Transf const &x, Transf const &y)libsemigroups::Transf< TValueType, TContainer >inline
- - - - diff --git a/classlibsemigroups_1_1_transf.html b/classlibsemigroups_1_1_transf.html deleted file mode 100644 index 627559e85..000000000 --- a/classlibsemigroups_1_1_transf.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Transf< TValueType, TContainer > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::Transf< TValueType, TContainer > Class Template Reference
-
-
- -

Template class for transformations. - More...

- -

#include <transf.hpp>

-
-Inheritance diagram for libsemigroups::Transf< TValueType, TContainer >:
-
-
Inheritance graph
- - - -
[legend]
- - - - - -

-Public Member Functions

void in_place_product (Transf const &x, Transf const &y)
 Multiply x and y and stores the result in this. More...
 
-

Detailed Description

-

template<typename TValueType, typename TContainer = std::vector<TValueType>>
-class libsemigroups::Transf< TValueType, TContainer >

- -

Template class for transformations.

-

The value of the template parameter T can be used to reduce the amount of memory required by instances of this class; see PTransformation and ElementWithVectorData for more details.

-

A transformation \(f\) is just a function defined on the whole of \(\{0, 1, \ldots, n - 1\}\) for some integer \(n\) called the degree of \(f\). A transformation is stored as a vector of the images of \(\{0, 1, \ldots, n - 1\}\), i.e. \(\{(0)f, (1)f, \ldots, (n - 1)f\}\).

-

Member Function Documentation

- -

◆ in_place_product()

- -
-
-
-template<typename TValueType , typename TContainer = std::vector<TValueType>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::Transf< TValueType, TContainer >::in_place_product (Transf< TValueType, TContainer > const & x,
Transf< TValueType, TContainer > const & y 
)
-
-inline
-
- -

Multiply x and y and stores the result in this.

-

See Element::redefine for more details about this method.

-

This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_transf__inherit__graph.map b/classlibsemigroups_1_1_transf__inherit__graph.map deleted file mode 100644 index 4fc28c185..000000000 --- a/classlibsemigroups_1_1_transf__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/classlibsemigroups_1_1_transf__inherit__graph.md5 b/classlibsemigroups_1_1_transf__inherit__graph.md5 deleted file mode 100644 index 861932ea6..000000000 --- a/classlibsemigroups_1_1_transf__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -4756af26d0af4288b3a2168ed14e7120 \ No newline at end of file diff --git a/classlibsemigroups_1_1_transf__inherit__graph.png b/classlibsemigroups_1_1_transf__inherit__graph.png deleted file mode 100644 index 011643de7..000000000 Binary files a/classlibsemigroups_1_1_transf__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_transformation-members.html b/classlibsemigroups_1_1_transformation-members.html deleted file mode 100644 index 47b10ea28..000000000 --- a/classlibsemigroups_1_1_transformation-members.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::Transformation< T > Member List
-
-
- -

This is the complete list of members for libsemigroups::Transformation< T >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_vectorlibsemigroups::ElementWithVectorData< T, Transformation< T > >protected
at(size_t pos) constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
begin() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
cache_hash_value() const overridelibsemigroups::Transformation< T >inlineprotectedvirtual
cbegin() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
cend() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
complexity() const overridelibsemigroups::PartialTransformation< T, Transformation< T > >inlinevirtual
copy(Element const *x) overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
crank() constlibsemigroups::PartialTransformation< T, Transformation< T > >inline
degree() const overridelibsemigroups::PartialTransformation< T, Transformation< T > >inlinevirtual
Element(elm_t type=Element::elm_t::NOT_RWSE)libsemigroups::Elementinlineexplicit
ElementWithVectorData()libsemigroups::ElementWithVectorData< T, Transformation< T > >inline
ElementWithVectorData(std::vector< T > *vector)libsemigroups::ElementWithVectorData< T, Transformation< T > >inlineexplicit
ElementWithVectorData(std::vector< T > const &vector)libsemigroups::ElementWithVectorData< T, Transformation< T > >inlineexplicit
elm_t enum namelibsemigroups::Element
end() constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
get_type() constlibsemigroups::Elementinline
hash_value() constlibsemigroups::Elementinline
identity() const overridelibsemigroups::PartialTransformation< T, Transformation< T > >inlinevirtual
NOT_RWSE enum valuelibsemigroups::Element
operator<(Element const &that) const overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
operator==(Element const &that) const overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
operator[](size_t pos) constlibsemigroups::ElementWithVectorData< T, Transformation< T > >inline
really_copy(size_t increase_deg_by=0) const overridelibsemigroups::Transformation< T >inlinevirtual
really_delete() overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
redefine(Element const *x, Element const *y) overridelibsemigroups::Transformation< T >inlinevirtual
PartialTransformation< T, Transformation< T > >::redefine(Element const *x, Element const *y, size_t const &thread_id)libsemigroups::Elementinlinevirtual
reset_hash_value() constlibsemigroups::Elementinlineprotected
RWSE enum valuelibsemigroups::Element
swap(Element *x) overridelibsemigroups::ElementWithVectorData< T, Transformation< T > >inlinevirtual
UNDEFINEDlibsemigroups::PartialTransformation< T, Transformation< T > >static
vector_hash(std::vector< T > const *vec)libsemigroups::ElementWithVectorData< T, Transformation< T > >inlineprotectedstatic
~Element()libsemigroups::Elementinlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_transformation.html b/classlibsemigroups_1_1_transformation.html deleted file mode 100644 index 66aade5b1..000000000 --- a/classlibsemigroups_1_1_transformation.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Transformation< T > Class Template Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -Protected Member Functions | -List of all members
-
-
libsemigroups::Transformation< T > Class Template Reference
-
-
- -

Template class for transformations. - More...

- -

#include <elements.h>

-
-Inheritance diagram for libsemigroups::Transformation< T >:
-
-
Inheritance graph
- - - - - - - - -
-
-Collaboration diagram for libsemigroups::Transformation< T >:
-
-
Collaboration graph
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void redefine (Element const *x, Element const *y) override
 Multiply x and y and stores the result in this. More...
 
- Public Member Functions inherited from libsemigroups::PartialTransformation< T, Transformation< T > >
size_t complexity () const override
 Returns the approximate time complexity of multiplying two partial transformations. More...
 
size_t crank () const
 Returns the rank of a partial transformation. More...
 
size_t degree () const override
 Returns the degree of a partial transformation. More...
 
Elementidentity () const override
 Returns the identity transformation with degrees of this. More...
 
- Public Member Functions inherited from libsemigroups::ElementWithVectorData< T, Transformation< T > >
 ElementWithVectorData ()
 A constructor. More...
 
 ElementWithVectorData (std::vector< T > *vector)
 A constructor. More...
 
 ElementWithVectorData (std::vector< T > const &vector)
 A constructor. More...
 
at (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
std::vector< T >::iterator begin () const
 Returns an iterator. More...
 
std::vector< T >::iterator cbegin () const
 Returns a const iterator. More...
 
std::vector< T >::iterator cend () const
 Returns a const iterator. More...
 
void copy (Element const *x) override
 Copy another Element into this. More...
 
std::vector< T >::iterator end () const
 Returns an iterator. More...
 
bool operator< (Element const &that) const override
 Returns true if this is less than that. More...
 
bool operator== (Element const &that) const override
 Returns true if this equals that. More...
 
operator[] (size_t pos) const
 Returns the pos entry in the vector containing the defining data. More...
 
Elementreally_copy (size_t increase_deg_by=0) const override
 Returns a pointer to a copy of this. More...
 
void really_delete () override
 Deletes the defining data of an ElementWithVectorData. More...
 
void swap (Element *x) override
 Swap another Element with this. More...
 
- Public Member Functions inherited from libsemigroups::Element
 Element (elm_t type=Element::elm_t::NOT_RWSE)
 A constructor. More...
 
virtual ~Element ()
 A default destructor. More...
 
elm_t get_type () const
 Returns the type libsemigroups::Element::elm_t of an Element object. More...
 
size_t hash_value () const
 Return the hash value of an Element. More...
 
virtual void redefine (Element const *x, Element const *y, size_t const &thread_id)
 Multiplies x and y and stores the result in this. More...
 
- - - - - - - - - - - - -

-Protected Member Functions

void cache_hash_value () const override
 This method is included because it seems to give superior performance in some benchmarks. More...
 
- Protected Member Functions inherited from libsemigroups::ElementWithVectorDataDefaultHash< T, Transformation< T > >
void cache_hash_value () const override
 This method implements the default hash function for an ElementWithVectorData, which uses ElementWithVectorData::vector_hash. Derive from this class if you are defining a class derived from ElementWithVectorData and there is a specialization of std::hash for the template parameter TValueType, and you do not want to define a hash function explicitly in your derived class. More...
 
- Protected Member Functions inherited from libsemigroups::Element
void reset_hash_value () const
 Reset the cached value used by Element::hash_value. More...
 
- - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from libsemigroups::Element
enum  elm_t { RWSE = 0, -NOT_RWSE = 1 - }
 This enum contains some different types of Element. More...
 
- Static Public Attributes inherited from libsemigroups::PartialTransformation< T, Transformation< T > >
static T const UNDEFINED
 Undefined image value. More...
 
- Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< T, Transformation< T > >
static size_t vector_hash (std::vector< T > const *vec)
 Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More...
 
- Protected Attributes inherited from libsemigroups::ElementWithVectorData< T, Transformation< T > >
std::vector< T > * _vector
 The vector containing the defining data of this. More...
 
- Static Protected Attributes inherited from libsemigroups::Element
static size_t const UNDEFINED = std::numeric_limits<size_t>::max()
 UNDEFINED value. More...
 
-

Detailed Description

-

template<typename T>
-class libsemigroups::Transformation< T >

- -

Template class for transformations.

-

The value of the template parameter T can be used to reduce the amount of memory required by instances of this class; see PartialTransformation and ElementWithVectorData for more details.

-

A transformation \(f\) is just a function defined on the whole of \(\{0, 1, \ldots, n - 1\}\) for some integer \(n\) called the degree of \(f\). A transformation is stored as a vector of the images of \(\{0, 1, \ldots, n - 1\}\), i.e. \(\{(0)f, (1)f, \ldots, (n - 1)f\}\).

-

Member Function Documentation

- -

◆ cache_hash_value()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - -
void libsemigroups::Transformation< T >::cache_hash_value () const
-
-inlineoverrideprotectedvirtual
-
- -

This method is included because it seems to give superior performance in some benchmarks.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ really_copy()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - -
Element* libsemigroups::Transformation< T >::really_copy (size_t increase_deg_by = 0) const
-
-inlineoverridevirtual
-
- -

Returns a pointer to a copy of this.

-

See Element::really_copy for more details about this method.

-

The copy returned by this method fixes all the values between the Transformation::degree of this and increase_deg_by.

- -

Implements libsemigroups::Element.

- -
-
- -

◆ redefine()

- -
-
-
-template<typename T>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void libsemigroups::Transformation< T >::redefine (Element const * x,
Element const * y 
)
-
-inlineoverridevirtual
-
- -

Multiply x and y and stores the result in this.

-

See Element::redefine for more details about this method.

-

This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this.

- -

Reimplemented from libsemigroups::Element.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_transformation.png b/classlibsemigroups_1_1_transformation.png deleted file mode 100644 index c0481a49b..000000000 Binary files a/classlibsemigroups_1_1_transformation.png and /dev/null differ diff --git a/classlibsemigroups_1_1_transformation__coll__graph.map b/classlibsemigroups_1_1_transformation__coll__graph.map deleted file mode 100644 index 8a5baaa0d..000000000 --- a/classlibsemigroups_1_1_transformation__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/classlibsemigroups_1_1_transformation__coll__graph.md5 b/classlibsemigroups_1_1_transformation__coll__graph.md5 deleted file mode 100644 index cf275e56f..000000000 --- a/classlibsemigroups_1_1_transformation__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -3b19e0cec6489e67537e83f42b3dea92 \ No newline at end of file diff --git a/classlibsemigroups_1_1_transformation__coll__graph.png b/classlibsemigroups_1_1_transformation__coll__graph.png deleted file mode 100644 index ed9ace9a3..000000000 Binary files a/classlibsemigroups_1_1_transformation__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_transformation__inherit__graph.map b/classlibsemigroups_1_1_transformation__inherit__graph.map deleted file mode 100644 index 971fbf1cc..000000000 --- a/classlibsemigroups_1_1_transformation__inherit__graph.map +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/classlibsemigroups_1_1_transformation__inherit__graph.md5 b/classlibsemigroups_1_1_transformation__inherit__graph.md5 deleted file mode 100644 index 31e895e0c..000000000 --- a/classlibsemigroups_1_1_transformation__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1931ea308aae508dd4eb226f90355568 \ No newline at end of file diff --git a/classlibsemigroups_1_1_transformation__inherit__graph.png b/classlibsemigroups_1_1_transformation__inherit__graph.png deleted file mode 100644 index d994778f1..000000000 Binary files a/classlibsemigroups_1_1_transformation__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring-members.html b/classlibsemigroups_1_1_tropical_max_plus_semiring-members.html deleted file mode 100644 index a869fe3d0..000000000 --- a/classlibsemigroups_1_1_tropical_max_plus_semiring-members.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::TropicalMaxPlusSemiring Member List
-
-
- -

This is the complete list of members for libsemigroups::TropicalMaxPlusSemiring, including all inherited members.

- - - - - - - - - - - - -
INFTYlibsemigroups::Semiring< int64_t >static
MINUS_INFTYlibsemigroups::Semiring< int64_t >static
one() const overridelibsemigroups::TropicalMaxPlusSemiringinlinevirtual
plus(int64_t x, int64_t y) const overridelibsemigroups::TropicalMaxPlusSemiringinlinevirtual
prod(int64_t x, int64_t y) const overridelibsemigroups::TropicalMaxPlusSemiringinlinevirtual
SemiringWithThreshold(int64_t threshold)libsemigroups::SemiringWithThresholdinlineexplicit
threshold() constlibsemigroups::SemiringWithThresholdinline
TropicalMaxPlusSemiring(int64_t threshold)libsemigroups::TropicalMaxPlusSemiringinlineexplicit
UNDEFINEDlibsemigroups::Semiring< int64_t >static
zero() const overridelibsemigroups::TropicalMaxPlusSemiringinlinevirtual
~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring.html b/classlibsemigroups_1_1_tropical_max_plus_semiring.html deleted file mode 100644 index b62c2698f..000000000 --- a/classlibsemigroups_1_1_tropical_max_plus_semiring.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::TropicalMaxPlusSemiring Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::TropicalMaxPlusSemiring Class Reference
-
-
- -

The tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\infty\). Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY. - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::TropicalMaxPlusSemiring:
-
-
Inheritance graph
- - - - - -
-
-Collaboration diagram for libsemigroups::TropicalMaxPlusSemiring:
-
-
Collaboration graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 TropicalMaxPlusSemiring (int64_t threshold)
 Construct from threshold. More...
 
int64_t one () const override
 Returns the multiplicative identity, or one, of the semiring. More...
 
int64_t plus (int64_t x, int64_t y) const override
 Returns the minimum of (the maximum of x and y) and the threshold of the semiring. More...
 
int64_t prod (int64_t x, int64_t y) const override
 Returns Semiring<int64_t>::MINUS_INFTY if x or y equals Semiring<int64_t>::MINUS_INFTY, otherwise returns the minimum of x + y and the threshold of the semiring. More...
 
int64_t zero () const override
 Returns the Semiring<int64_t>::MINUS_INFTY. More...
 
- Public Member Functions inherited from libsemigroups::SemiringWithThreshold
 SemiringWithThreshold (int64_t threshold)
 A class for semirings with a threshold. More...
 
int64_t threshold () const
 Returns the threshold of a semiring with threshold. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< int64_t >
virtual ~Semiring ()
 A default destructor. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< int64_t >
static const int64_t INFTY
 Value representing \(\infty\). More...
 
static const int64_t MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const int64_t UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

The tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\infty\). Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY.

-

Constructor & Destructor Documentation

- -

◆ TropicalMaxPlusSemiring()

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::TropicalMaxPlusSemiring::TropicalMaxPlusSemiring (int64_t threshold)
-
-inlineexplicit
-
- -

Construct from threshold.

-

The threshold is the largest integer in the semiring.

- -
-
-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::TropicalMaxPlusSemiring::one () const
-
-inlineoverridevirtual
-
- -

Returns the multiplicative identity, or one, of the semiring.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ plus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::TropicalMaxPlusSemiring::plus (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns the minimum of (the maximum of x and y) and the threshold of the semiring.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ prod()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::TropicalMaxPlusSemiring::prod (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns Semiring<int64_t>::MINUS_INFTY if x or y equals Semiring<int64_t>::MINUS_INFTY, otherwise returns the minimum of x + y and the threshold of the semiring.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ zero()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::TropicalMaxPlusSemiring::zero () const
-
-inlineoverridevirtual
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring.png b/classlibsemigroups_1_1_tropical_max_plus_semiring.png deleted file mode 100644 index 7daec4742..000000000 Binary files a/classlibsemigroups_1_1_tropical_max_plus_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.map b/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.map deleted file mode 100644 index c3221ac8f..000000000 --- a/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.md5 b/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.md5 deleted file mode 100644 index 8239ac0ad..000000000 --- a/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8f3212887a3b1a7d7b7b496b9dbe6654 \ No newline at end of file diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.png b/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.png deleted file mode 100644 index 2d925c1c1..000000000 Binary files a/classlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.map b/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.map deleted file mode 100644 index c3221ac8f..000000000 --- a/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.md5 deleted file mode 100644 index f93e02b8a..000000000 --- a/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -3e6514b4fad87b19182277a4f6d73743 \ No newline at end of file diff --git a/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.png b/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.png deleted file mode 100644 index 2d925c1c1..000000000 Binary files a/classlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring-members.html b/classlibsemigroups_1_1_tropical_min_plus_semiring-members.html deleted file mode 100644 index 562415e88..000000000 --- a/classlibsemigroups_1_1_tropical_min_plus_semiring-members.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::TropicalMinPlusSemiring Member List
-
-
- -

This is the complete list of members for libsemigroups::TropicalMinPlusSemiring, including all inherited members.

- - - - - - - - - - - - -
INFTYlibsemigroups::Semiring< int64_t >static
MINUS_INFTYlibsemigroups::Semiring< int64_t >static
one() const overridelibsemigroups::TropicalMinPlusSemiringinlinevirtual
plus(int64_t x, int64_t y) const overridelibsemigroups::TropicalMinPlusSemiringinlinevirtual
prod(int64_t x, int64_t y) const overridelibsemigroups::TropicalMinPlusSemiringinlinevirtual
SemiringWithThreshold(int64_t threshold)libsemigroups::SemiringWithThresholdinlineexplicit
threshold() constlibsemigroups::SemiringWithThresholdinline
TropicalMinPlusSemiring(int64_t threshold)libsemigroups::TropicalMinPlusSemiringinlineexplicit
UNDEFINEDlibsemigroups::Semiring< int64_t >static
zero() const overridelibsemigroups::TropicalMinPlusSemiringinlinevirtual
~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
- - - - diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring.html b/classlibsemigroups_1_1_tropical_min_plus_semiring.html deleted file mode 100644 index 4be800db3..000000000 --- a/classlibsemigroups_1_1_tropical_min_plus_semiring.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::TropicalMinPlusSemiring Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
libsemigroups::TropicalMinPlusSemiring Class Reference
-
-
- -

The tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\infty\). Infinity is represented by Semiring<int64_t>::INFTY. - More...

- -

#include <semiring.h>

-
-Inheritance diagram for libsemigroups::TropicalMinPlusSemiring:
-
-
Inheritance graph
- - - - - -
-
-Collaboration diagram for libsemigroups::TropicalMinPlusSemiring:
-
-
Collaboration graph
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 TropicalMinPlusSemiring (int64_t threshold)
 Construct from threshold. More...
 
int64_t one () const override
 Returns the integer 0. More...
 
int64_t plus (int64_t x, int64_t y) const override
 Returns Semiring<int64_t>::INFTY if either of x and y is Semiring<int64_t>::INFTY, and otherwise the minimum of x, y, and the threshold of the semiring. More...
 
int64_t prod (int64_t x, int64_t y) const override
 Returns Semiring<int64_t>::INFTY if x or y equals Semiring<int64_t>::INFTY, otherwise return the minimum of x + y and the threshold of the semiring. More...
 
int64_t zero () const override
 Returns the Semiring<int64_t>::INFTY. More...
 
- Public Member Functions inherited from libsemigroups::SemiringWithThreshold
 SemiringWithThreshold (int64_t threshold)
 A class for semirings with a threshold. More...
 
int64_t threshold () const
 Returns the threshold of a semiring with threshold. More...
 
- Public Member Functions inherited from libsemigroups::Semiring< int64_t >
virtual ~Semiring ()
 A default destructor. More...
 
- - - - - - - - - - - -

-Additional Inherited Members

- Static Public Attributes inherited from libsemigroups::Semiring< int64_t >
static const int64_t INFTY
 Value representing \(\infty\). More...
 
static const int64_t MINUS_INFTY
 Value representing \(-\infty\). More...
 
static const int64_t UNDEFINED
 Value representing an undefined quantity. More...
 
-

Detailed Description

-

The tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\infty\). Infinity is represented by Semiring<int64_t>::INFTY.

-

Constructor & Destructor Documentation

- -

◆ TropicalMinPlusSemiring()

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::TropicalMinPlusSemiring::TropicalMinPlusSemiring (int64_t threshold)
-
-inlineexplicit
-
- -

Construct from threshold.

-

The threshold is the largest integer in the semiring.

- -
-
-

Member Function Documentation

- -

◆ one()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::TropicalMinPlusSemiring::one () const
-
-inlineoverridevirtual
-
- -

Returns the integer 0.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ plus()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::TropicalMinPlusSemiring::plus (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns Semiring<int64_t>::INFTY if either of x and y is Semiring<int64_t>::INFTY, and otherwise the minimum of x, y, and the threshold of the semiring.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ prod()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
int64_t libsemigroups::TropicalMinPlusSemiring::prod (int64_t x,
int64_t y 
) const
-
-inlineoverridevirtual
-
- -

Returns Semiring<int64_t>::INFTY if x or y equals Semiring<int64_t>::INFTY, otherwise return the minimum of x + y and the threshold of the semiring.

- -

Implements libsemigroups::Semiring< int64_t >.

- -
-
- -

◆ zero()

- -
-
- - - - - -
- - - - - - - -
int64_t libsemigroups::TropicalMinPlusSemiring::zero () const
-
-inlineoverridevirtual
-
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring.png b/classlibsemigroups_1_1_tropical_min_plus_semiring.png deleted file mode 100644 index cc0452343..000000000 Binary files a/classlibsemigroups_1_1_tropical_min_plus_semiring.png and /dev/null differ diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.map b/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.map deleted file mode 100644 index d80855a04..000000000 --- a/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.md5 b/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.md5 deleted file mode 100644 index 7c3721235..000000000 --- a/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -945e2f0f87f86466c211a17effd39997 \ No newline at end of file diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.png b/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.png deleted file mode 100644 index a339444ff..000000000 Binary files a/classlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.map b/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.map deleted file mode 100644 index d80855a04..000000000 --- a/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.md5 b/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.md5 deleted file mode 100644 index 8d26958a8..000000000 --- a/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -2810d78cd7f9b9974e8fcca424dba91b \ No newline at end of file diff --git a/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.png b/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.png deleted file mode 100644 index a339444ff..000000000 Binary files a/classlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/classlibsemigroups_1_1fpsemigroup_1_1_knuth_bendix-members.html b/classlibsemigroups_1_1fpsemigroup_1_1_knuth_bendix-members.html deleted file mode 100644 index 66d2219e1..000000000 --- a/classlibsemigroups_1_1fpsemigroup_1_1_knuth_bendix-members.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups::fpsemigroup::KnuthBendix Member List
-
-
- -

This is the complete list of members for libsemigroups::fpsemigroup::KnuthBendix, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::libsemigroups::congruence::KnuthBendix (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendixfriend
::libsemigroups::KBE (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendixfriend
add_rule(std::string const &, std::string const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
add_rule(word_type const &, word_type const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
add_rule(std::initializer_list< size_t >, std::initializer_list< size_t >) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
add_rule(relation_type rel) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
add_rule(std::pair< std::string, std::string >) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
add_rules(FroidurePinBase &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
add_rules(std::vector< std::pair< std::string, std::string >> const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
alphabet() const noexcept (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
cbegin_rules() const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
cend_rules() const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
char_to_uint(char) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
confluent() constlibsemigroups::fpsemigroup::KnuthBendix
const_iterator typedef (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
equal_to(std::string const &, std::string const &) override (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendix
equal_to(word_type const &, word_type const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBasevirtual
equal_to(std::initializer_list< letter_type >, std::initializer_list< letter_type >) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
FpSemiBase(FpSemiBase const &)=delete (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
FpSemiBase(FpSemiBase &&)=delete (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
FpSemiBase() (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
froidure_pin() (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
has_froidure_pin() const noexcept (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
identity() const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
inverses() const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
is_obviously_finite() (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
is_obviously_infinite() (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
knuth_bendix()libsemigroups::fpsemigroup::KnuthBendix
knuth_bendix_by_overlap_length()libsemigroups::fpsemigroup::KnuthBendix
KnuthBendix(ReductionOrdering *)libsemigroups::fpsemigroup::KnuthBendixexplicit
KnuthBendix(FroidurePinBase &) (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendixexplicit
KnuthBendix(KnuthBendix const *) (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendixexplicit
KnuthBendix()libsemigroups::fpsemigroup::KnuthBendix
normal_form(std::string const &) override (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendix
normal_form(word_type const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBasevirtual
normal_form(std::initializer_list< letter_type >) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
nr_active_rules() const noexceptlibsemigroups::fpsemigroup::KnuthBendix
nr_rules() const noexcept (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
operator<<(std::ostream &, KnuthBendix const &)libsemigroups::fpsemigroup::KnuthBendixfriend
operator=(FpSemiBase const &)=delete (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
operator=(FpSemiBase &&)=delete (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
overlap_policy enum namelibsemigroups::fpsemigroup::KnuthBendix
rewrite(std::string *) constlibsemigroups::fpsemigroup::KnuthBendix
rewrite(std::string) constlibsemigroups::fpsemigroup::KnuthBendix
rules() constlibsemigroups::fpsemigroup::KnuthBendix
run() override (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendix
set_alphabet(std::string const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
set_alphabet(size_t) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
set_check_confluence_interval(size_t)libsemigroups::fpsemigroup::KnuthBendix
set_identity(std::string const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
set_identity(letter_type) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
set_inverses(std::string const &) (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
set_max_overlap(size_t)libsemigroups::fpsemigroup::KnuthBendix
set_max_rules(size_t)libsemigroups::fpsemigroup::KnuthBendix
set_overlap_policy(overlap_policy)libsemigroups::fpsemigroup::KnuthBendix
size() override (defined in libsemigroups::fpsemigroup::KnuthBendix)libsemigroups::fpsemigroup::KnuthBendix
string_to_word(std::string const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
to_gap_string() (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
uint_to_char(size_t) const noexcept (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_letter(char) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_letter(letter_type) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_relation(std::string const &, std::string const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_relation(std::pair< std::string, std::string > const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_relation(relation_type const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_relation(word_type const &, word_type const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_word(std::string const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
validate_word(word_type const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBaseprotected
word_to_string(word_type const &) const (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBase
~FpSemiBase() (defined in libsemigroups::FpSemiBase)libsemigroups::FpSemiBasevirtual
~KnuthBendix()libsemigroups::fpsemigroup::KnuthBendix
- - - - diff --git a/classlibsemigroups_1_1fpsemigroup_1_1_knuth_bendix.html b/classlibsemigroups_1_1fpsemigroup_1_1_knuth_bendix.html deleted file mode 100644 index d11e70716..000000000 --- a/classlibsemigroups_1_1fpsemigroup_1_1_knuth_bendix.html +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::fpsemigroup::KnuthBendix Class Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Public Types | -Public Member Functions | -Friends | -List of all members
-
-
libsemigroups::fpsemigroup::KnuthBendix Class Reference
-
-
- -

This class is used to represent a string rewriting system defining a finitely presented monoid or semigroup. - More...

- -

#include <knuth-bendix.hpp>

- -

Inherits libsemigroups::FpSemiBase.

- - - - - -

-Public Types

enum  overlap_policy { ABC = 0, -AB_BC = 1, -MAX_AB_BC = 2 - }
 The values in this enum determine how a rewriting system measures the length \(d(AB, BC)\) of the overlap of two words \(AB\) and \(BC\): More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 KnuthBendix (ReductionOrdering *)
 Constructs rewriting system with no rules and the reduction ordering order. More...
 
KnuthBendix (FroidurePinBase &)
 
KnuthBendix (KnuthBendix const *)
 
 KnuthBendix ()
 Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering. More...
 
 ~KnuthBendix ()
 A default destructor. More...
 
bool confluent () const
 Returns true if the rewriting system is confluent and false if it is not. More...
 
-bool equal_to (std::string const &, std::string const &) override
 
void knuth_bendix ()
 Run the Knuth-Bendix algorithm on the rewriting system. More...
 
void knuth_bendix_by_overlap_length ()
 This method runs the Knuth-Bendix algorithm on the rewriting system by considering all overlaps of a given length \(n\) (according to the KnuthBendix::overlap_measure) before those overlaps of length \(n + 1\). More...
 
-std::string normal_form (std::string const &) override
 
size_t nr_active_rules () const noexcept
 Returns the current number of active rules in the rewriting system. More...
 
std::string * rewrite (std::string *) const
 Rewrites the word w in-place according to the current rules in the rewriting system, and returns it. More...
 
std::string rewrite (std::string) const
 Rewrites a copy of the word w rewritten according to the current rules in the rewriting system. More...
 
std::vector< std::pair< std::string, std::string > > rules () const
 This method returns a vector consisting of the pairs of strings which represent the rules of the rewriting system. The first entry in every such pair is greater than the second according to the reduction ordering of the rewriting system. The rules are sorted according to the reduction ordering used by the rewriting system, on the first entry. More...
 
-void run () override
 
void set_check_confluence_interval (size_t)
 The method KnuthBendix::knuth_bendix periodically checks if the system is already confluent. This method can be used to set how frequently this happens, it is the number of new overlaps that should be considered before checking confluence. Setting this value too low can adversely affect the performance of KnuthBendix::knuth_bendix. More...
 
void set_max_overlap (size_t)
 This method can be used to specify the maximum length of the overlap of two left hand sides of rules that should be considered in KnuthBendix::knuth_bendix. More...
 
void set_max_rules (size_t)
 This method sets the (approximate) maximum number of rules that the system should contain. If this is number is exceeded in calls to KnuthBendix::knuth_bendix or KnuthBendix::knuth_bendix_by_overlap_length, then these methods will terminate and the system may not be confluent. More...
 
void set_overlap_policy (overlap_policy)
 This method can be used to determine the way that the length of an overlap of two words in the system is meaasured. More...
 
-size_t size () override
 
- - - - - - - - -

-Friends

-class ::libsemigroups::congruence::KnuthBendix
 
-class ::libsemigroups::KBE
 
std::ostream & operator<< (std::ostream &, KnuthBendix const &)
 This method allows a KnuthBendix object to be left shifted into a std::ostream, such as std::cout. The currently active rules of the system are represented in the output. More...
 
-

Detailed Description

-

This class is used to represent a string rewriting system defining a finitely presented monoid or semigroup.

-

Member Enumeration Documentation

- -

◆ overlap_policy

- -
-
- - - - - -
- - - - -
enum libsemigroups::fpsemigroup::KnuthBendix::overlap_policy
-
-strong
-
- -

The values in this enum determine how a rewriting system measures the length \(d(AB, BC)\) of the overlap of two words \(AB\) and \(BC\):

-
    -
  • ABC: \(d(AB, BC) = |A| + |B| + |C|\)
  • -
  • AB_BC: \(d(AB, BC) = |AB| + |BC|\)
  • -
  • MAX_AB_BC: \(d(AB, BC) = max(|AB|, |BC|)\)
  • -
-
See also
KnuthBendix::set_overlap_policy.
- -
-
-

Constructor & Destructor Documentation

- -

◆ KnuthBendix() [1/2]

- -
-
- - - - - -
- - - - - - - - -
libsemigroups::fpsemigroup::KnuthBendix::KnuthBendix (ReductionOrdering)
-
-explicit
-
- -

Constructs rewriting system with no rules and the reduction ordering order.

-

This constructs a rewriting system with no rules, and with the reduction ordering ReductionOrdering specifed by the parameter order.

- -
-
- -

◆ KnuthBendix() [2/2]

- -
-
- - - - - - - -
libsemigroups::fpsemigroup::KnuthBendix::KnuthBendix ()
-
- -

Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering.

- -
-
- -

◆ ~KnuthBendix()

- -
-
- - - - - - - -
libsemigroups::fpsemigroup::KnuthBendix::~KnuthBendix ()
-
- -

A default destructor.

-

This deletes the reduction order used to construct the object, and the rules in the system.

- -
-
-

Member Function Documentation

- -

◆ confluent()

- -
-
- - - - - - - -
bool libsemigroups::fpsemigroup::KnuthBendix::confluent () const
-
- -

Returns true if the rewriting system is confluent and false if it is not.

- -
-
- -

◆ knuth_bendix()

- -
-
- - - - - - - -
void libsemigroups::fpsemigroup::KnuthBendix::knuth_bendix ()
-
- -

Run the Knuth-Bendix algorithm on the rewriting system.

-
Warning
This will terminate when the rewriting system is confluent, which might be never.
-
See also
knuth_bendix_by_overlap_length.
- -
-
- -

◆ knuth_bendix_by_overlap_length()

- -
-
- - - - - - - -
void libsemigroups::fpsemigroup::KnuthBendix::knuth_bendix_by_overlap_length ()
-
- -

This method runs the Knuth-Bendix algorithm on the rewriting system by considering all overlaps of a given length \(n\) (according to the KnuthBendix::overlap_measure) before those overlaps of length \(n + 1\).

-
Warning
This will terminate when the rewriting system is confluent, which might be never.
-
See also
KnuthBendix::knuth_bendix.
- -
-
- -

◆ nr_active_rules()

- -
-
- - - - - -
- - - - - - - -
size_t libsemigroups::fpsemigroup::KnuthBendix::nr_active_rules () const
-
-noexcept
-
- -

Returns the current number of active rules in the rewriting system.

- -
-
- -

◆ rewrite() [1/2]

- -
-
- - - - - - - - -
std::string* libsemigroups::fpsemigroup::KnuthBendix::rewrite (std::string * ) const
-
- -

Rewrites the word w in-place according to the current rules in the rewriting system, and returns it.

- -
-
- -

◆ rewrite() [2/2]

- -
-
- - - - - - - - -
std::string libsemigroups::fpsemigroup::KnuthBendix::rewrite (std::string ) const
-
- -

Rewrites a copy of the word w rewritten according to the current rules in the rewriting system.

- -
-
- -

◆ rules()

- -
-
- - - - - - - -
std::vector<std::pair<std::string, std::string> > libsemigroups::fpsemigroup::KnuthBendix::rules () const
-
- -

This method returns a vector consisting of the pairs of strings which represent the rules of the rewriting system. The first entry in every such pair is greater than the second according to the reduction ordering of the rewriting system. The rules are sorted according to the reduction ordering used by the rewriting system, on the first entry.

- -
-
- -

◆ set_check_confluence_interval()

- -
-
- - - - - - - - -
void libsemigroups::fpsemigroup::KnuthBendix::set_check_confluence_interval (size_t )
-
- -

The method KnuthBendix::knuth_bendix periodically checks if the system is already confluent. This method can be used to set how frequently this happens, it is the number of new overlaps that should be considered before checking confluence. Setting this value too low can adversely affect the performance of KnuthBendix::knuth_bendix.

-

The default value is 4096, and should be set to KnuthBendix::UNBOUNDED if KnuthBendix::knuth_bendix should never check if the system is already confluent.

-
See also
KnuthBendix::knuth_bendix.
- -
-
- -

◆ set_max_overlap()

- -
-
- - - - - - - - -
void libsemigroups::fpsemigroup::KnuthBendix::set_max_overlap (size_t )
-
- -

This method can be used to specify the maximum length of the overlap of two left hand sides of rules that should be considered in KnuthBendix::knuth_bendix.

-

If this value is less than the longest left hand side of a rule, then KnuthBendix::knuth_bendix can terminate without the system being confluent.

-
See also
KnuthBendix::knuth_bendix.
- -
-
- -

◆ set_max_rules()

- -
-
- - - - - - - - -
void libsemigroups::fpsemigroup::KnuthBendix::set_max_rules (size_t )
-
- -

This method sets the (approximate) maximum number of rules that the system should contain. If this is number is exceeded in calls to KnuthBendix::knuth_bendix or KnuthBendix::knuth_bendix_by_overlap_length, then these methods will terminate and the system may not be confluent.

-
See also
KnuthBendix::knuth_bendix and KnuthBendix::knuth_bendix.
- -
-
- -

◆ set_overlap_policy()

- -
-
- - - - - - - - -
void libsemigroups::fpsemigroup::KnuthBendix::set_overlap_policy (overlap_policy )
-
- -

This method can be used to determine the way that the length of an overlap of two words in the system is meaasured.

-
See also
KnuthBendix::overlap_measure.
- -
-
-

Friends And Related Function Documentation

- -

◆ operator<<

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
std::ostream& operator<< (std::ostream & ,
KnuthBendix const &  
)
-
-friend
-
- -

This method allows a KnuthBendix object to be left shifted into a std::ostream, such as std::cout. The currently active rules of the system are represented in the output.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/closed.png b/closed.png deleted file mode 100644 index 98cc2c909..000000000 Binary files a/closed.png and /dev/null differ diff --git a/cong-base_8hpp_source.html b/cong-base_8hpp_source.html deleted file mode 100644 index 0770c06ff..000000000 --- a/cong-base_8hpp_source.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: include/cong-base.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
cong-base.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains a base class for congruence-like classes.
20 
21 #ifndef LIBSEMIGROUPS_INCLUDE_CONG_BASE_HPP_
22 #define LIBSEMIGROUPS_INCLUDE_CONG_BASE_HPP_
23 
24 #include <stddef.h> // for size_t
25 #include <string> // for string
26 #include <vector> // for vector
27 
28 #include "owned_ptr.hpp" // owned_ptr
29 #include "runner.hpp" // for Runner
30 #include "types.hpp" // for word_type, letter_type, relation_type
31 
32 namespace libsemigroups {
33  class FroidurePinBase; // Forward declaration, for function members
34  class Congruence; // Forward declaration, for friendship
35 
36  enum class congruence_type { LEFT = 0, RIGHT = 1, TWOSIDED = 2 };
37  enum class result_type { TRUE, FALSE, UNKNOWN };
38 
39  class CongBase : public internal::Runner {
40  // Allows Congruence to use set_parent_semigroup on the Runner's it
41  // contains
42  friend class Congruence;
43 
44  public:
46  // CongBase - typedefs + enums - public
48 
50  using class_index_type = size_t;
51  using non_trivial_classes_type = std::vector<std::vector<word_type>>;
52  using non_trivial_class_iterator = non_trivial_classes_type::const_iterator;
53 
55  // CongBase - constructors + destructor - public
57 
58  // CongBase is non-copyable, and non-movable.
59  CongBase() = delete;
60  CongBase(CongBase const&) = delete;
61  CongBase& operator=(CongBase const&) = delete;
62  CongBase(CongBase&&) = delete;
63  CongBase& operator=(CongBase&&) = delete;
64 
66  explicit CongBase(congruence_type);
67 
69  virtual ~CongBase();
70 
72  // CongBase - pure virtual methods - public
74 
92  virtual class_index_type word_to_class_index(word_type const&) = 0;
93  virtual word_type class_index_to_word(class_index_type) = 0;
94 
103  virtual size_t nr_classes() = 0;
104 
106  // CongBase - non-pure virtual methods - public
108 
118  virtual bool contains(word_type const&, word_type const&);
119 
120  // Same as the above but only uses the so far computed information to
121  // answer. In particular, does not call this->run(). This method may
122  // return false negatives, but must not return false positives.
123  virtual result_type const_contains(word_type const&,
124  word_type const&) const;
125 
142  virtual bool less(word_type const&, word_type const&);
143 
145  // CongBase - non-virtual methods - public
147 
148  void set_nr_generators(size_t);
149  void add_pair(word_type const&, word_type const&);
150  void add_pair(std::initializer_list<letter_type>,
151  std::initializer_list<letter_type>);
152 
153  using const_iterator = std::vector<relation_type>::const_iterator;
154  const_iterator cbegin_generating_pairs() const;
155  const_iterator cend_generating_pairs() const;
156 
165 
166  non_trivial_class_iterator cbegin_ntc();
167  non_trivial_class_iterator cend_ntc();
168 
169  size_t nr_generators() const noexcept;
170  size_t nr_generating_pairs() const noexcept;
171  size_t nr_non_trivial_classes();
172 
176  FroidurePinBase& quotient_semigroup();
177  bool has_quotient_semigroup() const noexcept;
178 
182  FroidurePinBase& parent_semigroup() const;
183  bool has_parent_semigroup() const noexcept;
184 
187  congruence_type type() const noexcept;
188 
189  bool is_quotient_obviously_finite();
190  bool is_quotient_obviously_infinite();
191 
192  protected:
194  // CongBase - non-virtual methods - protected
196 
197  void set_parent_semigroup(FroidurePinBase&);
198 
199  bool validate_letter(letter_type) const;
200  void validate_word(word_type const&) const;
201  void validate_relation(word_type const&, word_type const&) const;
202  void validate_relation(relation_type const&) const;
203 
205  // CongBase - non-virtual static methods - protected
207 
208  static std::string const& congruence_type_to_string(congruence_type);
209 
210  private:
212  // CongBase - pure virtual methods - private
214 
215  virtual void add_pair_impl(word_type const&, word_type const&) = 0;
216  virtual internal::owned_ptr<FroidurePinBase> quotient_impl() = 0;
217 
219  // CongBase - non-pure virtual methods - private
221 
222  // const_word_to_class_index is private, because the answer returned
223  // depends on the state of the object, but word_to_class_index does not
224  // (i.e the return value should not change).
225  virtual class_index_type const_word_to_class_index(word_type const&) const;
226  virtual void set_nr_generators_impl(size_t);
227  virtual std::shared_ptr<non_trivial_classes_type>
228  non_trivial_classes_impl();
229  virtual bool is_quotient_obviously_finite_impl();
230  virtual bool is_quotient_obviously_infinite_impl();
231 
233  // CongBase - non-virtual methods - private
235 
236  void init_non_trivial_classes();
237 
238  // Reset all mutable data to "not known" and set finished() to false.
239  // Any call to a non-const member function should call reset, if it
240  // actually does anything.
241  void reset();
242 
243  void set_is_quotient_obviously_infinite(bool) const;
244  void set_is_quotient_obviously_finite(bool) const;
245 
247  // CongBase - non-mutable data members - private
249 
250  // Only data members which (potentially) change the mathematical object
251  // defined by *this are non-mutable.
252 
253  std::vector<relation_type> _gen_pairs;
254  size_t _nr_gens;
255  FroidurePinBase* _parent;
256  congruence_type _type;
257 
259  // CongBase - mutable data members - private
261 
262  mutable bool _init_ntc_done;
263  mutable bool _is_obviously_finite;
264  mutable bool _is_obviously_infinite;
265  mutable internal::owned_ptr<FroidurePinBase> _quotient;
266  mutable std::shared_ptr<non_trivial_classes_type> _non_trivial_classes;
267 
269  // CongBase - static data members - private
271 
272  static const std::string STRING_TWOSIDED;
273  static const std::string STRING_LEFT;
274  static const std::string STRING_RIGHT;
275  };
276 } // namespace libsemigroups
277 #endif // LIBSEMIGROUPS_INCLUDE_CONG_BASE_HPP_
std::pair< word_type, word_type > relation_type
Type for a pair of word_type (a relation) of a semigroup.
Definition: types.hpp:56
-
Definition: kbe.hpp:198
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
size_t letter_type
Type for the index of a generator of a semigroup.
Definition: types.hpp:50
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/cong-pair-impl_8hpp_source.html b/cong-pair-impl_8hpp_source.html deleted file mode 100644 index 230e6760d..000000000 --- a/cong-pair-impl_8hpp_source.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: include/cong-pair-impl.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
cong-pair-impl.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains implementations of the methods for congruence::P.
20 
21 // TODO(later):
22 // 1. the type of the congruence defined by class P could be a template
23 // parameter
24 // 2. use shared_ptr rather than raw pointer to fpsemigroup::KnuthBendix in
25 // KBP class.
26 
27 #ifndef LIBSEMIGROUPS_INCLUDE_CONG_PAIR_IMPL_HPP_
28 #define LIBSEMIGROUPS_INCLUDE_CONG_PAIR_IMPL_HPP_
29 
30 #define TEMPLATE \
31  template <typename TElementType, \
32  typename TElementHash, \
33  typename TElementEqual, \
34  class TTraits>
35 #define P_CLASS P<TElementType, TElementHash, TElementEqual, TTraits>
36 
37 #define VOID TEMPLATE void
38 #define SIZE_T TEMPLATE size_t
39 #define CLASS_INDEX_TYPE TEMPLATE CongBase::class_index_type
40 #define SHARED_PTR_NON_TRIV_CLASSES \
41  TEMPLATE std::shared_ptr<CongBase::non_trivial_classes_type>
42 
43 namespace libsemigroups {
44  namespace congruence {
46  // P - constructor - protected
48 
49  TEMPLATE
50  P_CLASS::P(congruence_type type)
51  : CongBase(type),
52  _class_lookup(),
53  _found_pairs(),
54  _init_done(false),
55  _lookup(0),
56  _map(),
57  _map_next(0),
58  _next_class(0),
59  _nr_non_trivial_classes(UNDEFINED),
60  _nr_non_trivial_elemnts(UNDEFINED),
61  _pairs_to_mult(),
62  _reverse_map(),
63  _tmp1(),
64  _tmp2() {}
65 
67  // P - constructor + destructor - public
69 
70  TEMPLATE
71  P_CLASS::P(congruence_type type, FroidurePinBase& S) : P(type) {
72  set_nr_generators(S.nr_generators());
73  set_parent_semigroup(S);
74  }
75 
76  TEMPLATE
77  P_CLASS::~P() {
78  delete_tmp_storage();
79  this->internal_free(_tmp1);
80  this->internal_free(_tmp2);
81  for (auto& x : _map) {
82  this->internal_free(const_cast<internal_element_type>(x.first));
83  }
84  }
85 
87  // Runner - pure virtual methods - public
89 
90  VOID P_CLASS::run() {
91  if (finished() || dead()) {
92  return;
93  }
94  internal::Timer t;
95  init();
96 
97  size_t tid = REPORTER.thread_id(std::this_thread::get_id());
98  while (!_pairs_to_mult.empty() && !dead() && !timed_out()) {
99  // Get the next pair
100  auto& current_pair = _pairs_to_mult.front();
101 
102  auto prnt = static_cast<froidure_pin_type&>(parent_semigroup());
103  // Add its left and/or right multiples
104  for (size_t i = 0; i < prnt.nr_generators(); i++) {
105  const_reference gen = prnt.generator(i);
106  if (type() == congruence_type::LEFT
107  || type() == congruence_type::TWOSIDED) {
108  product()(
109  _tmp1, this->to_internal_const(gen), current_pair.first, tid);
110  product()(
111  _tmp2, this->to_internal_const(gen), current_pair.second, tid);
112  internal_add_pair(_tmp1, _tmp2);
113  }
114  if (type() == congruence_type::RIGHT
115  || type() == congruence_type::TWOSIDED) {
116  product()(
117  _tmp1, current_pair.first, this->to_internal_const(gen), tid);
118  product()(
119  _tmp2, current_pair.second, this->to_internal_const(gen), tid);
120  internal_add_pair(_tmp1, _tmp2);
121  }
122  }
123  _pairs_to_mult.pop();
124  if (report()) {
125  REPORT("found ",
126  _found_pairs.size(),
127  " pairs: ",
128  _map_next,
129  " elements in ",
130  _lookup.nr_blocks(),
131  " classes, ",
132  _pairs_to_mult.size(),
133  " pairs on the stack");
134  }
135  }
136 
137  if (!dead() && !timed_out()) {
138  // Make a normalised class lookup (class numbers {0, .., n-1}, in
139  // order)
140  if (_lookup.get_size() > 0) {
141  _class_lookup.reserve(_lookup.get_size());
142  _next_class = 1;
143  size_t max = 0;
144  LIBSEMIGROUPS_ASSERT(_lookup.find(0) == 0);
145  _class_lookup.push_back(0);
146  for (size_t i = 1; i < _lookup.get_size(); i++) {
147  size_t nr = _lookup.find(i);
148  if (nr > max) {
149  _class_lookup.push_back(_next_class++);
150  max = nr;
151  } else {
152  _class_lookup.push_back(_class_lookup[nr]);
153  }
154  }
155  }
156 
157  // Record information about non-trivial classes
158  _nr_non_trivial_classes = _next_class;
159  _nr_non_trivial_elemnts = _map_next;
160  }
161 
162  REPORT("stopping with ",
163  _found_pairs.size(),
164  " pairs: ",
165  _map_next,
166  " elements in ",
167  _lookup.nr_blocks(),
168  " classes");
169  REPORT("elapsed time = ", t);
170  report_why_we_stopped();
171  if (!dead() && !timed_out()) {
172  set_finished(true);
173  delete_tmp_storage();
174  }
175  }
176 
178  // CongBase - pure virtual methods - public
180 
181  WORD_TYPE P_CLASS::class_index_to_word(class_index_type) {
182  // FIXME(now) actually implement this
183  LIBSEMIGROUPS_EXCEPTION("not yet implemented");
184  }
185 
186  SIZE_T P_CLASS::nr_classes() {
187  run();
188  return parent_semigroup().size() - _class_lookup.size() + _next_class;
189  }
190 
191  CLASS_INDEX_TYPE P_CLASS::word_to_class_index(word_type const& w) {
192  run();
193  LIBSEMIGROUPS_ASSERT(finished());
194  return const_word_to_class_index(w);
195  }
196 
198  // CongBase - non-pure virtual methods - protected
200 
201  CLASS_INDEX_TYPE
202  P_CLASS::const_word_to_class_index(word_type const& w) const {
203  if (!finished()) {
204  return UNDEFINED;
205  }
206  auto fp = static_cast<froidure_pin_type&>(parent_semigroup());
207  auto x = fp.word_to_element(w);
208  size_t ind_x = get_index(this->to_internal_const(x));
209  this->external_free(x);
210  LIBSEMIGROUPS_ASSERT(ind_x < _class_lookup.size());
211  LIBSEMIGROUPS_ASSERT(_class_lookup.size() == _map.size());
212  return _class_lookup[ind_x];
213  }
214 
216  // CongBase - pure virtual methods - private
218 
219  VOID P_CLASS::add_pair_impl(word_type const& u, word_type const& v) {
220  if (!has_parent_semigroup()) {
221  LIBSEMIGROUPS_EXCEPTION("cannot add generating pairs before "
222  "the parent semigroup is defined");
223  }
224  auto prnt = static_cast<froidure_pin_type&>(parent_semigroup());
225  auto x = prnt.word_to_element(u);
226  auto y = prnt.word_to_element(v);
227  internal_add_pair(this->to_internal(x), this->to_internal(y));
228  this->external_free(x);
229  this->external_free(y);
230  }
231 
232  TEMPLATE
233  internal::owned_ptr<FroidurePinBase> P_CLASS::quotient_impl() {
234  // FIXME(now) actually implement this
235  LIBSEMIGROUPS_EXCEPTION("not yet implemented");
236  }
237 
239  // CongBase - non-pure virtual methods - private
241 
242  SHARED_PTR_NON_TRIV_CLASSES P_CLASS::non_trivial_classes_impl() {
243  run();
244  LIBSEMIGROUPS_ASSERT(_reverse_map.size() >= _nr_non_trivial_elemnts);
245  LIBSEMIGROUPS_ASSERT(_class_lookup.size() >= _nr_non_trivial_elemnts);
246  LIBSEMIGROUPS_ASSERT(has_parent_semigroup());
247 
248  auto ntc = non_trivial_classes_type(_nr_non_trivial_classes,
249  std::vector<word_type>());
250  auto fp = static_cast<froidure_pin_type&>(parent_semigroup());
251  for (size_t ind = 0; ind < _nr_non_trivial_elemnts; ++ind) {
252  word_type word = fp.factorisation(this->to_external(_reverse_map[ind]));
253  ntc[_class_lookup[ind]].push_back(word);
254  }
255  return std::make_shared<non_trivial_classes_type>(ntc);
256  }
257 
259  // P - methods - protected
261 
262  VOID P_CLASS::internal_add_pair(internal_const_element_type x,
263  internal_const_element_type y) {
264  if (!internal_equal_to()(x, y)) {
265  internal_element_type xx, yy;
266  bool xx_new = false, yy_new = false;
267  size_t i, j;
268 
269  auto it_x = _map.find(x);
270  if (it_x == _map.end()) {
271  xx_new = true;
272  xx = this->internal_copy(x);
273  i = add_index(xx);
274  } else {
275  i = it_x->second;
276  }
277 
278  auto it_y = _map.find(y);
279  if (it_y == _map.end()) {
280  yy_new = true;
281  yy = this->internal_copy(y);
282  j = add_index(yy);
283  } else {
284  j = it_y->second;
285  }
286 
287  LIBSEMIGROUPS_ASSERT(i != j);
288  std::pair<internal_element_type, internal_element_type> pair;
289  if (xx_new || yy_new) { // it's a new pair
290  xx = internal_element_type(xx_new ? xx : it_x->first);
291  yy = internal_element_type(yy_new ? yy : it_y->first);
292  pair = (i < j ? std::make_pair(xx, yy) : std::make_pair(yy, xx));
293  } else {
294  pair = (i < j ? std::make_pair(internal_element_type(it_x->first),
295  internal_element_type(it_y->first))
296  : std::make_pair(internal_element_type(it_y->first),
297  internal_element_type(it_x->first)));
298  if (_found_pairs.find(pair) != _found_pairs.end()) {
299  return;
300  }
301  }
302  _found_pairs.insert(pair);
303  _pairs_to_mult.push(pair);
304  _lookup.unite(i, j);
305  }
306  }
307 
309  // P - methods - private
311 
312  SIZE_T P_CLASS::add_index(internal_element_type x) const {
313  LIBSEMIGROUPS_ASSERT(_reverse_map.size() == _map_next);
314  LIBSEMIGROUPS_ASSERT(_map.size() == _map_next);
315  _map.emplace(x, _map_next);
316  _reverse_map.push_back(x);
317  _lookup.add_entry();
318  if (finished()) {
319  _class_lookup.push_back(_next_class++);
320  }
321  return _map_next++;
322  }
323 
324  VOID P_CLASS::delete_tmp_storage() {
325  std::unordered_set<
326  std::pair<internal_element_type, internal_element_type>,
327  PHash,
328  PEqual>()
329  .swap(_found_pairs);
330  std::queue<std::pair<internal_element_type, internal_element_type>>()
331  .swap(_pairs_to_mult);
332  }
333 
334  SIZE_T P_CLASS::get_index(internal_const_element_type x) const {
335  auto it = _map.find(x);
336  if (it == _map.end()) {
337  return add_index(this->internal_copy(x));
338  }
339  return it->second;
340  }
341 
342  VOID P_CLASS::init() {
343  if (!_init_done) {
344  LIBSEMIGROUPS_ASSERT(has_parent_semigroup());
345  LIBSEMIGROUPS_ASSERT(parent_semigroup().nr_generators() > 0);
346  auto fp = static_cast<froidure_pin_type&>(parent_semigroup());
347  _tmp1 = this->internal_copy(this->to_internal_const(fp.generator(0)));
348  _tmp2 = this->internal_copy(_tmp1);
349  _init_done = true;
350  }
351  }
352  } // namespace congruence
353 } // namespace libsemigroups
354 #endif // LIBSEMIGROUPS_INCLUDE_CONG_PAIR_IMPL_HPP_
Definition: kbe.hpp:198
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/cong-pair_8hpp_source.html b/cong-pair_8hpp_source.html deleted file mode 100644 index 7a7d26d35..000000000 --- a/cong-pair_8hpp_source.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: include/cong-pair.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
cong-pair.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains methods for enumerating a congruence by attempting to
20 // find all pairs of related elements using brute force. This does not work
21 // very well in most cases, due to the high complexity of the approach.
22 
23 #ifndef LIBSEMIGROUPS_INCLUDE_CONG_PAIR_HPP_
24 #define LIBSEMIGROUPS_INCLUDE_CONG_PAIR_HPP_
25 
26 #include <stddef.h> // for size_t
27 
28 #include <queue> // for queue
29 #include <unordered_map> // for unordered_map
30 #include <unordered_set> // for unordered_set
31 #include <utility> // for pair
32 #include <vector> // for vector
33 
34 #include "adapters.hpp" // for product
35 #include "cong-base.hpp" // for CongBase::class_index_type, congruence_type
36 #include "froidure-pin.hpp" // for FroidurePin<>::element_index_type, FroidurePin
37 #include "kbe.hpp" // for KBE
38 #include "knuth-bendix.hpp" // for fpsemigroup::KnuthBendix
39 #include "stl.hpp" // for equal_to, hash
40 #include "traits.hpp" // for TraitsHashEqual
41 #include "types.hpp" // for word_type
42 #include "uf.hpp" // for UF
43 #include "wrap.hpp" // for WrappedCong
44 
45 // TODO(now) forward declare owned_ptr or include it
46 
47 namespace libsemigroups {
48  class Element; // Forward declaration, for default template parameter
49  class FroidurePinBase; // Forward declaration, for constructor parameter
50  namespace congruence {
51  // Implemented in cong-pair-impl.hpp
52  template <typename TElementType = Element const*,
53  typename TElementHash = internal::hash<TElementType>,
54  typename TElementEqual = internal::equal_to<TElementType>,
55  class TTraits
56  = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
57  class P : public CongBase, protected TTraits {
58  protected:
59  using froidure_pin_type
60  = FroidurePin<TElementType, TElementHash, TElementEqual, TTraits>;
61 
62  protected:
64  // P - typedefs - protected
66 
67  using const_reference = typename froidure_pin_type::const_reference;
68  using internal_element_type = typename TTraits::internal_element_type;
69  using internal_const_element_type =
70  typename TTraits::internal_const_element_type;
71 
72  using internal_equal_to = typename TTraits::internal_equal_to;
73  using internal_hash = typename TTraits::internal_hash;
74 
75  using product = ::libsemigroups::product<internal_element_type>;
76 
78  // P - constructor - protected
80  // This is protected because it is not possible to create a P object
81  // without it being defined over a parent semigroup.
82 
83  explicit P(congruence_type);
84 
85  public:
87  // P - constructor + destructor - public
89 
90  P(congruence_type, FroidurePinBase&);
91  ~P();
92 
94  // Runner - pure virtual methods - public
96 
97  void run() override;
98 
100  // CongBase - pure virtual methods - public
102 
103  word_type class_index_to_word(class_index_type) override;
104  size_t nr_classes() override;
105  class_index_type word_to_class_index(word_type const& w) override;
106 
107  protected:
109  // CongBase - non-pure virtual methods - protected
111 
112  class_index_type
113  const_word_to_class_index(word_type const&) const override;
114 
115  // non_trivial_classes_impl is private in CongBase but protected here
116  // since uses it and derives from class P.
117  std::shared_ptr<non_trivial_classes_type>
118  non_trivial_classes_impl() override;
119 
121  // P - methods - protected
123 
124  void internal_add_pair(internal_const_element_type,
125  internal_const_element_type);
126 
127  private:
129  // CongBase - pure virtual methods - private
131 
132  void add_pair_impl(word_type const&, word_type const&) override;
133  internal::owned_ptr<FroidurePinBase> quotient_impl() override;
134 
136  // P - methods - private
138 
139  size_t add_index(internal_element_type) const;
140  void delete_tmp_storage();
141  size_t get_index(internal_const_element_type) const;
142  void init();
143 
145  // P - inner structs - private
147 
148  struct PHash {
149  public:
150  size_t
151  operator()(std::pair<internal_const_element_type,
152  internal_const_element_type> const& pair) const {
153  return internal_hash()(pair.first)
154  + 17 * internal_hash()(pair.second);
155  }
156  };
157 
158  struct PEqual {
159  size_t operator()(std::pair<internal_const_element_type,
160  internal_const_element_type> pair1,
161  std::pair<internal_const_element_type,
162  internal_const_element_type> pair2) const {
163  return internal_equal_to()(pair1.first, pair2.first)
164  && internal_equal_to()(pair1.second, pair2.second);
165  }
166  };
167 
169  // P - data - private
171 
172  mutable std::vector<class_index_type> _class_lookup;
173  std::unordered_set<
174  std::pair<internal_element_type, internal_element_type>,
175  PHash,
176  PEqual>
177  _found_pairs;
178  bool _init_done;
179  mutable UF _lookup;
180  mutable std::unordered_map<internal_const_element_type,
181  size_t,
182  internal_hash,
183  internal_equal_to>
184  _map;
185  mutable size_t _map_next;
186  mutable class_index_type _next_class;
187  size_t _nr_non_trivial_classes;
188  size_t _nr_non_trivial_elemnts;
189  std::queue<std::pair<internal_element_type, internal_element_type>>
190  _pairs_to_mult;
191  mutable std::vector<internal_element_type> _reverse_map;
192  internal_element_type _tmp1;
193  internal_element_type _tmp2;
194  };
195 
197  // The next class is for calculating congruences on a finitely presented
198  // semigroup using KnuthBendix on the fp semigroup and then the pairs
199  // algorithm to compute the congruence. Implemented in cong-pair.cpp.
201 
202  class KBP : public P<KBE,
203  internal::hash<KBE>,
204  internal::equal_to<KBE>,
205  TraitsHashEqual<KBE,
206  internal::hash<KBE>,
207  internal::equal_to<KBE>>> {
209  // KBP - typedefs - private
211 
212  using p_type = P<
213  KBE,
214  internal::hash<KBE>,
215  internal::equal_to<KBE>,
216  TraitsHashEqual<KBE, internal::hash<KBE>, internal::equal_to<KBE>>>;
217 
218  public:
220  // KBP - constructors - public
222 
223  KBP(congruence_type, fpsemigroup::KnuthBendix&);
224 
226  // P - virtual methods - public
228 
229  void run() override;
230 
231  private:
233  // P - pure virtual methods - private
235 
236  // Override the method for the class P to avoid having to know the parent
237  // semigroup (found as part of KBP::run) to add a pair.
238  void add_pair_impl(word_type const&, word_type const&) override;
239 
241  // CongBase - non-pure virtual methods - private
243 
244  using p_type::non_trivial_classes_impl;
245 
247  // KBP - data - private
249 
250  fpsemigroup::KnuthBendix& _kb;
251  };
252 
253  } // namespace congruence
254 
255  namespace fpsemigroup {
256  template <typename TElementType = Element const*,
257  typename TElementHash = internal::hash<TElementType>,
258  typename TElementEqual = internal::equal_to<TElementType>,
259  class TTraits
260  = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
261  using P = WrappedCong<
262  congruence::P<TElementType, TElementHash, TElementEqual, TTraits>,
263  false>;
264  // The false in the template of the previous line, is so that we do not add
265  // the rules from any underlying semigroup to the P.
266  } // namespace fpsemigroup
267 } // namespace libsemigroups
268 
269 #include "cong-pair-impl.hpp"
270 #endif // LIBSEMIGROUPS_INCLUDE_CONG_PAIR_HPP_
This file contains a declaration of the class template FroidurePin which implements the Froidure-Pin ...
-
This file contains the declaration of the class KBE, which can be used as the element_type for a Froi...
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
This file contains function templates for adapting a user-defined type so that it can be used with li...
-
- - - - diff --git a/cong_8h_source.html b/cong_8h_source.html deleted file mode 100644 index 695583d65..000000000 --- a/cong_8h_source.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -libsemigroups: src/cong.h Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
cong.h
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2016 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef LIBSEMIGROUPS_SRC_CONG_H_
20 #define LIBSEMIGROUPS_SRC_CONG_H_
21 
22 #include <algorithm>
23 #include <atomic>
24 #include <mutex>
25 #include <stack>
26 #include <string>
27 #include <utility>
28 #include <vector>
29 
30 #include "partition.h"
31 #include "report.h"
32 #include "semigroups.h"
33 
34 #define RETURN_FALSE nullptr
35 
36 namespace libsemigroups {
37 
54  class Congruence {
55  private:
56  // The different types of congruence.
57  enum cong_t {
58  // Left congruence
59  LEFT = 0,
60  // Right congruence
61  RIGHT = 1,
62  // 2-sided congruence
63  TWOSIDED = 2
64  };
65 
68  static const size_t LIMIT_MAX = std::numeric_limits<size_t>::max();
69 
70  public:
72  typedef size_t class_index_t;
73 
104  Congruence(std::string type,
105  size_t nrgens,
106  std::vector<relation_t> const& relations,
107  std::vector<relation_t> const& extra);
108 
129  Congruence(std::string type,
130  Semigroup* semigroup,
131  std::vector<relation_t> const& genpairs);
132 
138  delete_data();
139  }
140 
157  DATA* data = get_data();
158  LIBSEMIGROUPS_ASSERT(data->is_done());
159  return data->word_to_class_index(word);
160  }
161 
171  bool test_equals(word_t const& w1, word_t const& w2) {
172  if (w1 == w2) {
173  return true;
174  }
175  DATA* data;
176  if (is_done()) {
177  data = _data;
178  } else {
179  std::function<bool(DATA*)> words_func = [&w1, &w2](DATA* d) {
180  return d->current_equals(w1, w2) != DATA::result_t::UNKNOWN;
181  };
182  data = get_data(words_func);
183  }
184  DATA::result_t result = data->current_equals(w1, w2);
185  LIBSEMIGROUPS_ASSERT(result != DATA::result_t::UNKNOWN);
186  return result == DATA::result_t::TRUE;
187  }
188 
206  bool test_less_than(word_t const& w1, word_t const& w2) {
207  DATA* data;
208  if (is_done()) {
209  data = _data;
210  } else {
211  std::function<bool(DATA*)> words_func = [&w1, &w2](DATA* d) {
212  return d->current_less_than(w1, w2) != DATA::result_t::UNKNOWN;
213  };
214  data = get_data(words_func);
215  }
216 
217  if (!_partial_data.empty()) {
218  LIBSEMIGROUPS_ASSERT(_data == nullptr);
219  // Delete the losers and clear _partial_data
220  for (size_t i = 0; i < _partial_data.size(); i++) {
221  if (_partial_data[i] != data) {
222  delete _partial_data[i];
223  }
224  }
225  _partial_data.clear();
226  }
227  _data = data;
228 
229  DATA::result_t result = data->current_less_than(w1, w2);
230  LIBSEMIGROUPS_ASSERT(result != DATA::result_t::UNKNOWN);
231  return result == DATA::result_t::TRUE;
232  }
233 
242  size_t nr_classes() {
243  DATA* data = get_data();
244  LIBSEMIGROUPS_ASSERT(data->is_done());
245  return data->nr_classes();
246  }
247 
257 
259  bool is_done() const {
260  if (_data == nullptr) {
261  return false;
262  }
263  return _data->is_done();
264  }
265 
271  std::vector<relation_t> const& relations() {
272  init_relations(_semigroup);
273  return _relations;
274  }
275 
278  std::vector<relation_t> const& extra() const {
279  return _extra;
280  }
281 
288 
289  // FIXME it would be better to provide a constructor from another
290  // congruence that copied the relations.
291  void set_relations(std::vector<relation_t> const& relations) {
292  LIBSEMIGROUPS_ASSERT(_relations.empty()); // _extra can be non-empty!
293  _relations = relations;
294  }
295 
297  //
300  void set_report(bool val) const {
301  glob_reporter.set_report(val);
302  LIBSEMIGROUPS_ASSERT(glob_reporter.get_report() == val);
303  }
304 
321  void set_prefill(RecVec<class_index_t> const& table) {
322  if (_data == nullptr) {
323  _prefill = table;
324  }
325  }
326 
336  void set_max_threads(size_t nr_threads) {
337  unsigned int n
338  = static_cast<unsigned int>(nr_threads == 0 ? 1 : nr_threads);
339  _max_threads = std::min(n, std::thread::hardware_concurrency());
340  }
341 
346  void set_pack(size_t val) {
347  if (_data != nullptr) {
348  _data->set_pack(val);
349  }
350  }
351 
355  void set_report_interval(size_t val) {
356  if (_data != nullptr) {
357  _data->set_report_interval(val);
358  }
359  }
360 
375  void force_tc();
376 
400  void force_tc_prefill();
401 
419  void force_p();
420 
451  void force_kbp();
452 
475  void force_kbfp();
476 
483  bool is_obviously_infinite();
484 
485  private:
486  // Subclasses of DATA
487  class KBFP; // Knuth-Bendix followed by Froidure-Pin
488  class KBP; // Knuth-Bendix followed by P
489  class P; // Orbit of pairs
490  class TC; // Todd-Coxeter
491 
492  // Abstract base class for nested classes containing methods for actually
493  // enumerating the classes etc of a congruence
494  class DATA {
495  friend KBFP;
496  friend KBP;
497  friend P;
498  friend TC;
499 
500  public:
501  // Default constructor
502  DATA(Congruence& cong,
503  size_t default_nr_steps,
504  size_t report_interval = 1000)
505  : _cong(cong),
506  _default_nr_steps(default_nr_steps),
507  _killed(false),
508  _report_interval(report_interval),
509  _report_next(0) {}
510 
511  // Default destructor, does nothing
512  virtual ~DATA() {}
513 
514  // This method runs the algorithm used to determine the congruence, i.e.
515  // Todd-Coxeter, Knuth-Bendix, etc., until completion.
516  virtual void run() = 0;
517 
518  // This method runs the algorithm for a while, then stops after a
519  // certain amount of work or when done \p steps the amount of work to do
520  // before returning.
521  virtual void run(size_t steps) = 0;
522 
523  // This method returns true if a DATA object's run method has been run to
524  // conclusion, i.e. that it has not been killed by another instance.
525  virtual bool is_done() const = 0;
526 
527  // This method returns the number of classes of the congruence.
528  virtual size_t nr_classes() = 0;
529 
530  // This method returns the index of the congruence class containing the
531  // element of the semigroup defined by word.
532  virtual class_index_t word_to_class_index(word_t const& word) = 0;
533 
534  // Possible result of questions that might not be answerable.
535  enum result_t { TRUE = 0, FALSE = 1, UNKNOWN = 2 };
536 
537  // This method returns \c true if the two words are known to describe
538  // elements in the same congruence class, \c false if they are known to
539  // lie in different classes, and **UNKNOWN** if the information has not
540  // yet been discovered.
541  virtual result_t current_equals(word_t const& w1, word_t const& w2) = 0;
542 
543  // This method returns \c true if the two words are known to be in
544  // distinct classes, where w1's class is less than w2's class by some
545  // total ordering; \c false if this is known to be untrue; and
546  // **UNKNOWN** if the information has not yet been discovered.
547  // \p w1 const reference to the first word
548  // \p w2 const reference to the second word
549  virtual result_t current_less_than(word_t const& w1, word_t const& w2) {
550  if (is_done()) {
552  ? result_t::TRUE
553  : result_t::FALSE;
554  } else if (current_equals(w1, w2) == result_t::TRUE) {
555  return result_t::FALSE; // elements are equal
556  }
557  return result_t::UNKNOWN;
558  }
559 
560  // This method returns the non-trivial classes of the congruence.
561  virtual Partition<word_t>* nontrivial_classes();
562 
563  // This method kills a given instance of a DATA object.
564  void kill() {
565  // TODO add killed-by-thread
566  _killed = true;
567  }
568 
569  // This method sets a given instance of a DATA object to "not killed"
570  void unkill() {
571  _killed = false;
572  }
573 
574  // This method can be used to tell whether or not a given DATA object has
575  // been killed by another instance.
576  std::atomic<bool>& is_killed() {
577  return _killed;
578  }
579 
580  // \p goal_func a function to test whether we can stop running
581  //
582  // This function calls DATA::run in batches until goal_func returns
583  // true. If goal_func is RETURN_FALSE, then the object ! is instead run
584  // to completion.
585  void run_until(std::function<bool(DATA*)> goal_func) {
586  if (is_done()) {
587  return;
588  }
589  if (goal_func != RETURN_FALSE) {
590  while (!_killed && !is_done() && !goal_func(this)) {
591  run(_default_nr_steps);
592  }
593  } else {
594  run();
595  }
596  }
597 
598  virtual void set_pack(size_t val) {
599  (void) val;
600  }
601 
602  void set_report_interval(size_t val) {
603  _report_interval = val;
604  }
605 
606  private:
607  Congruence& _cong;
608  size_t _default_nr_steps;
609  std::atomic<bool> _killed;
610  size_t _report_interval;
611  size_t _report_next;
612  typedef std::vector<word_t*> class_t;
613  typedef std::vector<class_t*> partition_t;
614  };
615 
616  // This deletes all DATA objects stored in this congruence, including
617  // finished objects and partially-enumerated objects.
618  void delete_data();
619 
620  // Set the relations of a Congruence object to the relations of the
621  // semigroup over which the Congruence is defined (if any). Report is here
622  // in case of any enumeration of the underlying semigroup.
623  void init_relations(Semigroup* semigroup, std::atomic<bool>& killed);
624 
625  void init_relations(Semigroup* semigroup) {
626  std::atomic<bool> killed(false);
627  init_relations(semigroup, killed);
628  }
629 
630  DATA* cget_data() const {
631  return _data;
632  }
633 
634  DATA* get_data(std::function<bool(DATA*)> goal_func = RETURN_FALSE);
635 
636  DATA* winning_data(std::vector<DATA*>& data,
637  std::vector<std::function<void(DATA*)>>& funcs,
638  bool ignore_max_threads = false,
639  std::function<bool(DATA*)> goal_func = RETURN_FALSE);
640 
641  Congruence(cong_t type,
642  size_t nrgens,
643  std::vector<relation_t> const& relations,
644  std::vector<relation_t> const& extra);
645 
646  Congruence(cong_t type,
647  Semigroup* semigroup,
648  std::vector<relation_t> const& extra);
649 
650  cong_t type_from_string(std::string);
651 
652  DATA* _data;
653  std::vector<relation_t> _extra;
654  std::mutex _init_mtx;
655  std::mutex _kill_mtx;
656  size_t _max_threads;
657  size_t _nrgens;
658  std::vector<DATA*> _partial_data;
659  RecVec<class_index_t> _prefill;
660  std::vector<relation_t> _relations;
661  std::atomic<bool> _relations_done;
662  Semigroup* _semigroup;
663  cong_t _type;
664 
665  static size_t const INFTY;
666  static size_t const UNDEFINED;
667  };
668 } // namespace libsemigroups
669 #endif // LIBSEMIGROUPS_SRC_CONG_H_
void set_report_interval(size_t val)
Sets how often the core methods of Congruence report.
Definition: cong.h:355
-
void force_kbp()
Use the Knuth-Bendix algorithm on a rewriting system RWS with rules obtained from Congruence::relatio...
Definition: cong.cc:309
-
Partition< word_t > * nontrivial_classes()
Returns the non-trivial classes of the congruence.
Definition: cong.cc:321
-
~Congruence()
A default destructor.
Definition: cong.h:137
-
bool is_obviously_infinite()
This method tries to quickly determine whether or not the Congruence has infinitely many classes.
Definition: cong.cc:246
-
std::vector< letter_t > word_t
Type for a word over the generators of a semigroup.
Definition: semigroups.h:55
-
bool test_equals(word_t const &w1, word_t const &w2)
Returns true if the words w1 and w2 belong to the same congruence class.
Definition: cong.h:171
-
Class for partitions of a set used by Congruence::nontrivial_classes.
Definition: partition.h:33
-
bool test_less_than(word_t const &w1, word_t const &w2)
Returns true if the congruence class of w1 is less than that of w2.
Definition: cong.h:206
-
class_index_t word_to_class_index(word_t const &word)
Returns the index of the congruence class corresponding to word.
Definition: cong.h:156
-
std::vector< relation_t > const & relations()
Returns the vector of relations used to define the semigroup over which the congruence is defined.
Definition: cong.h:271
-
void set_prefill(RecVec< class_index_t > const &table)
Specify a partial coset table for the Todd-Coxeter algorithm.
Definition: cong.h:321
-
void force_tc()
Use the Todd-Coxeter algorithm.
Definition: cong.cc:291
-
std::vector< relation_t > const & extra() const
Returns the vector of extra relations (or equivalently, generating pairs) used to define the congruen...
Definition: cong.h:278
-
void force_kbfp()
Use the Knuth-Bendix algorithm on a rewriting system RWS with rules obtained from Congruence::relatio...
Definition: cong.cc:315
-
Class for congruence on a semigroup or fintely presented semigroup.
Definition: cong.h:54
-
void set_pack(size_t val)
Set the maximum number of active cosets in Todd-Coxeter before entering packing phase.
Definition: cong.h:346
-
size_t nr_classes()
Returns the number of congruences classes of this.
Definition: cong.h:242
-
Namespace for everything in the libsemigroups library.
Definition: blocks.cc:32
-
void set_max_threads(size_t nr_threads)
Set the maximum number of threads for a Congruence over a Semigroup.
Definition: cong.h:336
-
void force_tc_prefill()
Use the Todd-Coxeter algorithm after prefilling the table.
Definition: cong.cc:297
-
void set_report(bool val) const
Turn reporting on or off.
Definition: cong.h:300
-
Congruence(std::string type, size_t nrgens, std::vector< relation_t > const &relations, std::vector< relation_t > const &extra)
Constructor for congruences over a finitely presented semigroup.
Definition: cong.cc:64
-
Class for semigroups generated by instances of Element.
Definition: semigroups.h:68
-
void set_relations(std::vector< relation_t > const &relations)
Define the relations defining the semigroup over which this is defined.
Definition: cong.h:291
-
void force_p()
Use an elementary orbit algorithm which enumerates pairs of Element objects that are related in this.
Definition: cong.cc:303
-
bool is_done() const
Returns true if the structure of the congruence is known.
Definition: cong.h:259
-
size_t class_index_t
Type for indices of congruence classes in a Congruence object.
Definition: cong.h:72
-
- - - - diff --git a/cong_8hpp_source.html b/cong_8hpp_source.html deleted file mode 100644 index b2b746e4d..000000000 --- a/cong_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/cong.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
cong.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains stuff for creating congruence over FroidurePin objects or
20 // over FpSemigroup objects.
21 
22 #ifndef LIBSEMIGROUPS_INCLUDE_CONG_HPP_
23 #define LIBSEMIGROUPS_INCLUDE_CONG_HPP_
24 
25 #include <stddef.h> // for size_t
26 
27 #include "cong-base.hpp" // for congruence_type, CongBase::class_index_type
28 #include "race.hpp" // for Race
29 #include "runner.hpp" // for Runner
30 #include "types.hpp" // for word_type
31 
32 namespace libsemigroups {
33  class FpSemigroup; // Forward declaration
34  class FroidurePinBase; // Forward declaration, constructor parameters
35  namespace congruence {
36  class KnuthBendix;
37  class ToddCoxeter;
38  } // namespace congruence
39 
40  namespace internal {
41  template <class TPtrType>
42  class owned_ptr;
43  } // namespace internal
44 
45  class Congruence : public CongBase {
46  public:
47  // Execution policy:
48  // - standard: means run 1 variant of everything
49  // - none: means no methods are added, and at least one must be added
50  // manually via add_method
51  enum class policy { standard = 0, none = 1 };
52 
54  // Congruence - constructors - public
56 
57  explicit Congruence(congruence_type type);
58 
59  Congruence(congruence_type type,
60  FroidurePinBase&,
61  policy = policy::standard);
62 
63  Congruence(congruence_type type, FpSemigroup&, policy = policy::standard);
64 
66  // Runner - pure virtual methods - public
68 
69  void run() override;
70 
72  // Runner - non-pure virtual methods - protected
74 
75  bool finished_impl() const override;
76 
78  // CongBase - pure virtual methods - public
80 
81  word_type class_index_to_word(class_index_type) override;
82  size_t nr_classes() override;
83  class_index_type word_to_class_index(word_type const&) override;
84 
86  // CongBase - non-pure virtual methods - public
88 
89  bool contains(word_type const&, word_type const&) override;
90  result_type const_contains(word_type const&,
91  word_type const&) const override;
92  bool is_quotient_obviously_finite_impl() override;
93  bool is_quotient_obviously_infinite_impl() override;
94 
96  // Congruence - methods - public
98 
99  void add_method(internal::Runner*);
100 
101  bool has_knuth_bendix() const;
102  bool has_todd_coxeter() const;
103  congruence::KnuthBendix& knuth_bendix() const;
104  congruence::ToddCoxeter& todd_coxeter() const;
105 
106  private:
108  // CongBase - pure virtual methods - private
110 
111  void add_pair_impl(word_type const&, word_type const&) override;
112  internal::owned_ptr<FroidurePinBase> quotient_impl() override;
113 
115  // CongBase - non-pure virtual methods - private
117 
118  std::shared_ptr<CongBase::non_trivial_classes_type>
119  non_trivial_classes_impl() override;
120 
122  // Congruence - methods - private
124 
125  template <class TCongBaseSubclass>
126  TCongBaseSubclass* find_method() const;
127 
129  // Congruence - data - private
131 
132  internal::Race _race;
133  };
134 } // namespace libsemigroups
135 
136 #endif // LIBSEMIGROUPS_INCLUDE_CONG_HPP_
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/constants_8hpp_source.html b/constants_8hpp_source.html deleted file mode 100644 index ff7908fbc..000000000 --- a/constants_8hpp_source.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: include/constants.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
constants.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains definitions of certain constants for libsemigroups. These
20 // are classes that correspond to integer values (in some sense). This file
21 // exists to avoid having to redeclare static constants like UNDEFINED, for
22 // every integer type. For example, the struct UNDEFINED can be implicitly
23 // converted to any integral type, and has a value specified by
24 // std::numeric_limits<TIntegralType>::max() minus a compile-time offset (where
25 // TIntegralType is a member function template, and can hence be any integral
26 // type), and we overload operator== for UNDEFINED and every integral type. So,
27 // UNDEFINED can be used as if it was an integral type (say -1), for the
28 // purposes of storing it in a data member and for comparisons. This allows us
29 // to avoid duplicating code for constants like UNDEFINED, and makes UNDEFINED
30 // more straightforward to use (no template parameters, or qualifications are
31 // required, as they used to be). FIXME update this comment
32 //
33 // This approach also has some drawbacks, if UNDEFINED is implicitly converted
34 // to two different integral types and then these are compared, this will yield
35 // false, and so == of UNDEFINED and itself is not transitive, so beware.
36 
37 #ifndef LIBSEMIGROUPS_INCLUDE_CONSTANTS_HPP_
38 #define LIBSEMIGROUPS_INCLUDE_CONSTANTS_HPP_
39 
40 #include <cinttypes> // for int64_t
41 #include <limits> // for numeric_limits
42 #include <type_traits> // for is_integral
43 
44 namespace libsemigroups {
45  struct Min {
46  template <typename TIntegralType>
47  constexpr TIntegralType operator()() const noexcept {
48  static_assert(std::is_integral<TIntegralType>::value,
49  "can only call Min with an integral type");
50  return std::numeric_limits<TIntegralType>::min();
51  }
52  };
53 
54  struct Max {
55  template <typename TIntegralType>
56  constexpr TIntegralType operator()() const noexcept {
57  static_assert(std::is_integral<TIntegralType>::value,
58  "can only call Max with an integral type");
59  return std::numeric_limits<TIntegralType>::max();
60  }
61  };
62 
63  template <int64_t TOffset, class TMaxOrMin = Max>
64  struct Constant {
65  static_assert(std::is_same<TMaxOrMin, Max>::value
66  || std::is_same<TMaxOrMin, Min>::value,
67  "template parameter TMaxOrMin must be Max or Min");
68 
69  template <typename TIntegralType>
70  constexpr operator TIntegralType() const noexcept {
71  static_assert(
72  std::is_integral<TIntegralType>::value,
73  "can only implicitly convert a Constant to an integral type");
74  return TMaxOrMin().template operator()<TIntegralType>() + TOffset;
75  }
76 
77  template <typename TIntegralType>
78  constexpr TIntegralType get_value() const noexcept {
79  static_assert(
80  std::is_integral<TIntegralType>::value,
81  "the template parameter TIntegralType must be an integral type");
82  return this->operator TIntegralType();
83  }
84  };
85 
86  template <typename TIntegralType, int64_t TOffset, class TMaxOrMin>
87  bool operator==(TIntegralType const& lhs,
88  Constant<TOffset, TMaxOrMin> const& rhs) noexcept {
89  static_assert(std::is_integral<TIntegralType>::value,
90  "can only compare constants and integral types");
91  return lhs == rhs.operator TIntegralType();
92  }
93 
94  template <typename TIntegralType, int64_t TOffset, class TMaxOrMin>
95  bool operator!=(TIntegralType const& lhs,
96  Constant<TOffset, TMaxOrMin> const& rhs) noexcept {
97  static_assert(std::is_integral<TIntegralType>::value,
98  "can only compare constants and integral types");
99  return !(lhs == rhs);
100  }
101 
107  const struct UNDEFINED : public Constant<0> {
108  // Older versions of some compilers require this . . .
109  UNDEFINED() {}
110  } UNDEFINED;
111 
113  const struct POSITIVE_INFINITY : public Constant<-1> {
114  // Older versions of some compilers require this . . .
115  POSITIVE_INFINITY() {}
117 
118  template <typename TIntegralType>
119  constexpr bool operator<(TIntegralType const&,
120  struct POSITIVE_INFINITY const&) noexcept {
121  static_assert(std::is_integral<TIntegralType>::value,
122  "can only compare constants and integral types");
123  return true;
124  }
125 
126  template <typename TIntegralType>
127  constexpr bool operator<(struct POSITIVE_INFINITY const&,
128  TIntegralType const&) noexcept {
129  static_assert(std::is_integral<TIntegralType>::value,
130  "can only compare constants and integral types");
131  return false;
132  }
133 
135  const struct NEGATIVE_INFINITY : public Constant<0, Min> {
136  // Older versions of some compilers require this . . .
137  NEGATIVE_INFINITY() {}
139 
140  template <typename TIntegralType>
141  constexpr bool operator<(TIntegralType const&,
142  struct NEGATIVE_INFINITY const&) noexcept {
143  static_assert(std::is_integral<TIntegralType>::value,
144  "can only compare constants and integral types");
145  return false;
146  }
147 
148  template <typename TIntegralType>
149  constexpr bool operator<(struct NEGATIVE_INFINITY const&,
150  TIntegralType const&) noexcept {
151  static_assert(std::is_integral<TIntegralType>::value,
152  "can only compare constants and integral types");
153  return true;
154  }
155 
156  constexpr bool operator<(struct NEGATIVE_INFINITY const&,
157  struct POSITIVE_INFINITY const&) noexcept {
158  return true;
159  }
160 
161  constexpr bool operator<(struct POSITIVE_INFINITY const&,
162  struct NEGATIVE_INFINITY const&) noexcept {
163  return false;
164  }
165 
167  const struct LIMIT_MAX : public Constant<-2> {
168  // Older versions of some compilers require this . . .
169  LIMIT_MAX() {}
170  } LIMIT_MAX;
171 
172  template <typename TIntegralType>
173  bool operator<(TIntegralType const& lhs,
174  struct LIMIT_MAX const& rhs) noexcept {
175  static_assert(std::is_integral<TIntegralType>::value,
176  "operator< only defined for constants and integral types");
177  return lhs < rhs.get_value<TIntegralType>();
178  }
179 
180  template <typename TIntegralType>
181  bool operator<(struct LIMIT_MAX const& lhs,
182  TIntegralType const& rhs) noexcept {
183  static_assert(std::is_integral<TIntegralType>::value,
184  "operator< only defined for constants and integral types");
185  return lhs.get_value<TIntegralType>() < rhs;
186  }
187 
188  template <typename TIntegralType>
189  bool operator>(TIntegralType const& lhs,
190  struct LIMIT_MAX const& rhs) noexcept {
191  static_assert(std::is_integral<TIntegralType>::value,
192  "operator< only defined for constants and integral types");
193  return rhs < lhs;
194  }
195 
196  template <typename TIntegralType>
197  bool operator>(struct LIMIT_MAX const& lhs,
198  TIntegralType const& rhs) noexcept {
199  static_assert(std::is_integral<TIntegralType>::value,
200  "operator< only defined for constants and integral types");
201  return rhs < lhs;
202  }
203 
204  template <typename TIntegralType>
205  TIntegralType operator-(TIntegralType const& lhs,
206  struct LIMIT_MAX const& rhs) noexcept {
207  static_assert(std::is_integral<TIntegralType>::value,
208  "operator- only defined for constants and integral types");
209  return lhs - rhs.get_value<TIntegralType>();
210  }
211 
212  template <typename TIntegralType>
213  TIntegralType operator-(struct LIMIT_MAX const& lhs,
214  TIntegralType const& rhs) noexcept {
215  static_assert(std::is_integral<TIntegralType>::value,
216  "operator- only defined for constants and integral types");
217  return lhs.get_value<TIntegralType>() - rhs;
218  }
219 } // namespace libsemigroups
220 #endif // LIBSEMIGROUPS_INCLUDE_CONSTANTS_HPP_
UNDEFINED value.
Definition: constants.hpp:107
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
Value representing .
Definition: constants.hpp:113
-
Value representing .
Definition: constants.hpp:135
-
- - - - diff --git a/containers_8hpp_source.html b/containers_8hpp_source.html deleted file mode 100644 index a928fe86a..000000000 --- a/containers_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/containers.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
containers.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef LIBSEMIGROUPS_INCLUDE_CONTAINERS_HPP_
20 #define LIBSEMIGROUPS_INCLUDE_CONTAINERS_HPP_
21 
22 #include <algorithm>
23 #include <array>
24 #include <vector>
25 
26 #include "libsemigroups-debug.hpp"
27 
28 namespace libsemigroups {
29  namespace internal {
30 
34 
35  template <typename T, class A = std::allocator<T>>
36  class RecVec {
37  // So that RecVec<T> can access private data members of RecVec<S> and vice
38  // versa.
39  template <typename S, class B>
40  friend class RecVec;
41 
42  public:
43  typedef A allocator_type;
44  typedef typename std::vector<T, A>::value_type value_type;
45  typedef typename std::vector<T, A>::reference reference;
46  typedef typename std::vector<T, A>::const_reference const_reference;
47  typedef typename std::vector<T, A>::difference_type difference_type;
48  typedef typename std::vector<T, A>::size_type size_type;
49 
50  // Constructs a <RecVec> with the specified number of columns and rows and
51  // initialises every position with the default value.
52  explicit RecVec(size_t nr_cols = 0, size_t nr_rows = 0, T default_val = 0)
53  : _vec(),
54  _nr_used_cols(nr_cols),
55  _nr_unused_cols(0),
56  _nr_rows(0),
57  _default_val(default_val) {
58  this->add_rows(nr_rows);
59  }
60 
61  // Constructs a copy of the given <RecVec> with the same number of rows as
62  // the original and with some additional columns.
63  template <typename S, class B>
64  RecVec(RecVec<S, B> const& copy, size_t nr_cols_to_add = 0)
65  : _vec(),
66  _nr_used_cols(copy._nr_used_cols),
67  _nr_unused_cols(copy._nr_unused_cols),
68  _nr_rows(copy.nr_rows()),
69  _default_val(copy._default_val) {
70  if (nr_cols_to_add <= _nr_unused_cols) {
71  _vec.reserve(copy._vec.size());
72  for (auto const& x : copy._vec) {
73  _vec.push_back(static_cast<T>(x));
74  }
75  _nr_used_cols += nr_cols_to_add;
76  _nr_unused_cols -= nr_cols_to_add;
77  return;
78  }
79 
80  size_t new_nr_cols
81  = std::max(5 * nr_cols() / 4 + 4, nr_cols_to_add + nr_cols());
82  _nr_used_cols += nr_cols_to_add;
83  _nr_unused_cols = new_nr_cols - _nr_used_cols;
84 
85  _vec.reserve(new_nr_cols * _nr_rows);
86 
87  for (size_t i = 0; i < _nr_rows; i++) {
88  size_t j;
89  for (j = 0; j < copy._nr_used_cols; j++) {
90  _vec.push_back(copy.get(i, j));
91  }
92  for (; j < new_nr_cols; j++) {
93  _vec.push_back(_default_val);
94  }
95  }
96  }
97 
98  RecVec<T, A>& operator=(RecVec<T, A> that) {
99  swap(that);
100  return *this;
101  }
102 
103  ~RecVec() {}
104 
105  // Required methods to make RecVec STL container like
106  bool operator==(RecVec<T, A> const& that) const {
107  if (_nr_used_cols != that._nr_used_cols || _nr_rows != that._nr_rows) {
108  return false;
109  }
110  return std::equal(cbegin(), cend(), that.cbegin());
111  }
112 
113  bool operator!=(RecVec<T, A> const& that) const {
114  return !operator==(that);
115  }
116 
117  bool empty() const {
118  return _nr_rows == 0;
119  }
120 
121  size_t size() const {
122  return _nr_rows * _nr_used_cols;
123  }
124 
125  size_t max_size() const {
126  return _vec.max_size();
127  }
128 
129  void swap(RecVec<T, A>& that) {
130  _vec.swap(that._vec);
131  std::swap(_nr_used_cols, that._nr_used_cols);
132  std::swap(_nr_unused_cols, that._nr_unused_cols);
133  std::swap(_nr_rows, that._nr_rows);
134  }
135 
136  void clear() {
137  _nr_unused_cols += _nr_used_cols;
138  _nr_used_cols = 0;
139  _nr_rows = 0;
140  _vec.clear();
141  }
142 
143  // Adds the specified number of rows to the <RecVec>. Every new position
144  // is initialised with the default value specified when the <RecVec> was
145  // constructed.
146  void inline add_rows(size_t nr) {
147  _nr_rows += nr;
148  if (nr != 0) {
149  _vec.resize(_vec.size() + (_nr_used_cols + _nr_unused_cols) * nr,
150  _default_val);
151  }
152  }
153 
154  void inline set_default_value(T val) {
155  _default_val = val;
156  }
157 
158  // Adds the specified number of columns to the <RecVec>. Every new
159  // position is initialised with the default value specified when the
160  // <RecVec> was constructed.
161  //
162  // The underlying vector reserves more space than is required to add the
163  // specified number of columns so that repeated calls to this method
164  // require fewer reallocations.
165  void add_cols(size_t nr) {
166  if (nr <= _nr_unused_cols) {
167  _nr_used_cols += nr;
168  _nr_unused_cols -= nr;
169  return;
170  }
171 
172  size_t old_nr_cols = _nr_used_cols + _nr_unused_cols;
173  size_t new_nr_cols
174  = std::max(5 * old_nr_cols / 4 + 4, nr + old_nr_cols);
175  if (_nr_rows != 0) {
176  _vec.resize(new_nr_cols * _nr_rows, _default_val);
177 
178  typename std::vector<T>::iterator old_it(
179  _vec.begin() + (old_nr_cols * _nr_rows) - old_nr_cols);
180  typename std::vector<T>::iterator new_it(
181  _vec.begin() + (new_nr_cols * _nr_rows) - new_nr_cols);
182 
183  while (old_it != _vec.begin()) {
184  std::move(old_it, old_it + _nr_used_cols, new_it);
185  old_it -= old_nr_cols;
186  new_it -= new_nr_cols;
187  }
188  }
189  _nr_used_cols += nr;
190  _nr_unused_cols = new_nr_cols - _nr_used_cols;
191  }
192 
193  // Sets the position specified by the row and column to the given value.
194  //
195  // Asserts whether the specified row and column are within the bounds of
196  // the <RecVec>.
197  void inline set(size_t i, size_t j, T val) {
198  LIBSEMIGROUPS_ASSERT(i < _nr_rows && j < _nr_used_cols);
199  _vec[i * (_nr_used_cols + _nr_unused_cols) + j] = val;
200  }
201 
202  // Returns the value in the specified row and column.
203  //
204  // Asserts whether the specified row and column are within the bounds of
205  // the <RecVec>.
206  T inline get(size_t i, size_t j) const {
207  LIBSEMIGROUPS_ASSERT(i < _nr_rows && j < _nr_used_cols);
208  return _vec[i * (_nr_used_cols + _nr_unused_cols) + j];
209  }
210 
211  // Returns the number of rows (first dimension).
212  size_t nr_rows() const {
213  return _nr_rows;
214  }
215 
216  // Returns the number of columns (second dimension).
217  size_t nr_cols() const {
218  return _nr_used_cols;
219  }
220 
221  // The parameter \p copy must be a compatible RecVec with equal number of
222  // columns.
223  //
224  // Appends \p copy to the end of \c this given that the number of columns
225  // of \c this and \p copy are equal.
226  //
227  // Asserts that the numbers of columns are equal.
228  template <typename S, class B>
229  void append(const RecVec<S, B>& copy) {
230  LIBSEMIGROUPS_ASSERT(copy._nr_used_cols == _nr_used_cols);
231 
232  size_t old_nr_rows = _nr_rows;
233  add_rows(copy._nr_rows);
234 
235  if (copy._nr_unused_cols == _nr_unused_cols) {
236  std::copy(copy._vec.begin(),
237  copy._vec.end(),
238  _vec.begin()
239  + (_nr_used_cols + _nr_unused_cols) * old_nr_rows);
240  } else { // TODO(JDM) improve this
241  for (size_t i = old_nr_rows; i < _nr_rows; i++) {
242  for (size_t j = 0; j < _nr_used_cols; j++) {
243  set(i, j, copy.get(i - old_nr_rows, j));
244  }
245  }
246  }
247  }
248 
249  void reserve(size_t nr_rows) {
250  _vec.reserve(nr_rows * (_nr_unused_cols + _nr_used_cols));
251  }
252 
253  private:
254  std::vector<T, A> _vec;
255  size_t _nr_used_cols;
256  size_t _nr_unused_cols;
257  size_t _nr_rows;
258  T _default_val;
259 
260  private:
261  template <typename iterator_type,
262  typename reference_type,
263  typename pointer_type>
264  class iterator_base {
265  struct iterator_methods;
266 
267  public:
268  typedef typename std::vector<T, A>::size_type size_type;
269  typedef typename std::vector<T, A>::difference_type difference_type;
270  typedef typename std::vector<T, A>::value_type value_type;
271  typedef reference_type reference;
272  typedef pointer_type pointer;
273  typedef reference_type const_reference;
274  typedef pointer_type const_pointer;
275  typedef std::random_access_iterator_tag iterator_category;
276 
277  iterator_base(iterator_type it_vec, iterator_methods const* methods)
278  : _it_vec(it_vec), _methods(methods) {}
279 
280  iterator_base(RecVec<T, A> const& rv, iterator_type it_vec)
281  : _it_vec(it_vec), _methods(nullptr) {
282  if (rv._nr_unused_cols == 0) {
283  if (_fast_methods == nullptr) {
284  _fast_methods = new typename RecVec<T, A>::template iterator_base<
285  iterator_type,
286  reference_type,
287  pointer_type>::fast_iterator_methods();
288  }
289  _methods = _fast_methods;
290  } else {
291  _methods = new slow_iterator_methods(rv);
292  }
293  }
294 
295  iterator_base(iterator_base const& that)
296  : iterator_base(that._it_vec, that._methods->copy()) {}
297 
298  iterator_base& operator=(iterator_base const& that) {
299  _it_vec = that._it_vec;
300  _methods = that._methods->copy();
301  return *this;
302  }
303 
304  static iterator_base column_iterator(RecVec<T, A> const& rv,
305  iterator_type it_vec) {
306  return iterator_base(it_vec, new column_iterator_methods(rv));
307  }
308 
309  ~iterator_base() {
310  if (_methods != _fast_methods) {
311  delete _methods;
312  }
313  }
314 
315  bool operator==(iterator_base const& that) const {
316  return _it_vec == that._it_vec;
317  }
318 
319  bool operator!=(iterator_base const& that) const {
320  return _it_vec != that._it_vec;
321  }
322 
323  bool operator<(iterator_base const& that) const {
324  return _it_vec < that._it_vec;
325  }
326 
327  bool operator>(iterator_base const& that) const {
328  return _it_vec > that._it_vec;
329  }
330 
331  bool operator<=(iterator_base const& that) const {
332  return operator<(that) || operator==(that);
333  }
334 
335  bool operator>=(iterator_base const& that) const {
336  return operator>(that) || operator==(that);
337  }
338 
339  // postfix
340  iterator_base operator++(int) {
341  iterator_base tmp(*this);
342  iterator_base::operator++();
343  return tmp;
344  }
345 
346  iterator_base operator--(int) {
347  iterator_base tmp(*this);
348  iterator_base::operator--();
349  return tmp;
350  }
351 
352  iterator_base operator+(size_type val) const {
353  iterator_base out(*this);
354  return out += val;
355  }
356 
357  friend iterator_base operator+(size_type val, iterator_base const& it) {
358  return it + val;
359  }
360 
361  iterator_base operator-(size_type val) const {
362  iterator_base out(*this);
363  return out -= val;
364  }
365 
366  reference_type operator*() const {
367  return *_it_vec;
368  }
369 
370  pointer_type operator->() const {
371  return &(*_it_vec);
372  }
373 
374  reference_type operator[](size_type pos) const {
375  return *(*this + pos);
376  }
377 
378  iterator_base& operator++() { // prefix
379  _methods->prefix_increment(*this);
380  return *this;
381  }
382 
383  iterator_base& operator--() {
384  _methods->prefix_decrement(*this);
385  return *this;
386  }
387 
388  iterator_base& operator+=(size_type val) {
389  _methods->increment(*this, val);
390  return *this;
391  }
392 
393  iterator_base& operator-=(size_type val) {
394  _methods->decrement(*this, val);
395  return *this;
396  }
397 
398  difference_type operator-(iterator_base that) const {
399  return _methods->difference(*this, that);
400  }
401 
402  private:
403  iterator_type _it_vec;
404  iterator_methods const* _methods;
405  static iterator_methods const* _fast_methods;
406 
407  struct iterator_methods {
408  virtual iterator_methods const* copy() const = 0;
409  virtual ~iterator_methods() {}
410 
411  virtual inline void
412  prefix_increment(iterator_base& it) const { // prefix
413  this->increment(it, 1);
414  }
415 
416  virtual inline void prefix_decrement(iterator_base& it) const {
417  this->decrement(it, 1);
418  }
419 
420  virtual void increment(iterator_base& it, size_type val) const = 0;
421  virtual void decrement(iterator_base& it, size_type val) const = 0;
422 
423  virtual difference_type difference(iterator_base const& it,
424  iterator_base that) const = 0;
425  };
426 
427  struct fast_iterator_methods : public iterator_methods {
428  iterator_methods const* copy() const final {
429  return this;
430  }
431 
432  inline void
433  prefix_increment(iterator_base& it) const final { // prefix
434  ++it._it_vec;
435  }
436 
437  inline void prefix_decrement(iterator_base& it) const final {
438  --it._it_vec;
439  }
440 
441  inline void increment(iterator_base& it, size_type val) const final {
442  it._it_vec += val;
443  }
444 
445  inline void decrement(iterator_base& it, size_type val) const final {
446  it._it_vec -= val;
447  }
448 
449  inline difference_type difference(iterator_base const& it,
450  iterator_base that) const final {
451  return it._it_vec - that._it_vec;
452  }
453  };
454 
455  struct slow_iterator_methods : public iterator_methods {
456  explicit slow_iterator_methods(RecVec<T, A> const& rv) : _rv(rv) {}
457 
458  iterator_methods const* copy() const override {
459  return new slow_iterator_methods(_rv);
460  }
461 
462  inline void increment(iterator_base& it,
463  size_type val) const override {
464  size_type s = _rv._nr_used_cols;
465  size_type n = _rv._nr_unused_cols;
466 
467  size_type q = val / s;
468  size_type r = val % s;
469 
470  difference_type p = it._it_vec - _rv._vec.begin();
471 
472  it._it_vec += q * (s + n) + r;
473  if (r + remainder(p, s + n) >= s) {
474  it._it_vec += n;
475  }
476  }
477 
478  inline void decrement(iterator_base& it,
479  size_type val) const override {
480  size_type s = _rv._nr_used_cols;
481  size_type n = _rv._nr_unused_cols;
482 
483  size_type q = val / s;
484  size_type r = val % s;
485 
486  difference_type p = it._it_vec - _rv._vec.begin();
487 
488  it._it_vec -= (q * (s + n) + r);
489  if (remainder(p, s + n) < r) {
490  it._it_vec -= n;
491  }
492  }
493 
494  inline difference_type difference(iterator_base const& it,
495  iterator_base that) const override {
496  difference_type s = _rv._nr_used_cols;
497  difference_type n = _rv._nr_unused_cols;
498  difference_type b = it._it_vec - _rv._vec.begin();
499  difference_type a = that._it_vec - _rv._vec.begin();
500  return (b - a) - n * (quotient(b, s + n) - quotient(a, s + n));
501  }
502 
503  static inline size_type remainder(difference_type a,
504  difference_type b) {
505  if (a >= 0) {
506  return a % b;
507  } else {
508  return (a % b) + b;
509  }
510  }
511 
512  static inline size_type quotient(difference_type a,
513  difference_type b) {
514  if (a % b >= 0) {
515  return a / b;
516  } else {
517  return (a / b) - 1;
518  }
519  }
520  RecVec<T, A> const& _rv;
521  };
522 
523  struct column_iterator_methods : public slow_iterator_methods {
524  using slow_iterator_methods::slow_iterator_methods;
525 
526  iterator_methods const* copy() const final {
527  return new column_iterator_methods(this->_rv);
528  }
529 
530  inline void increment(iterator_base& it, size_type val) const final {
531  it._it_vec
532  += val * (this->_rv._nr_used_cols + this->_rv._nr_unused_cols);
533  }
534 
535  inline void decrement(iterator_base& it, size_type val) const final {
536  it._it_vec
537  -= val * (this->_rv._nr_used_cols + this->_rv._nr_unused_cols);
538  }
539 
540  inline difference_type difference(iterator_base const& it,
541  iterator_base that) const final {
542  return (it._it_vec - that._it_vec)
543  / static_cast<difference_type>(this->_rv._nr_used_cols
544  + this->_rv._nr_unused_cols);
545  }
546  };
547  }; // iterator_base definition ends
548 
549  public:
550  typedef iterator_base<typename std::vector<T, A>::iterator,
551  typename std::vector<T, A>::reference,
552  typename std::vector<T, A>::pointer>
553  iterator;
554 
555  typedef iterator_base<typename std::vector<T, A>::const_iterator,
556  typename std::vector<T, A>::const_reference,
557  typename std::vector<T, A>::const_pointer>
558  const_iterator;
559 
560  iterator begin() {
561  return iterator(*this, _vec.begin());
562  }
563 
564  iterator end() {
565  return iterator(*this, _vec.end());
566  }
567 
568  const_iterator cbegin() const {
569  return const_iterator(*this, _vec.begin());
570  }
571 
572  const_iterator cend() const {
573  return const_iterator(*this, _vec.end());
574  }
575 
576  typedef std::reverse_iterator<iterator> reverse_iterator;
577  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
578 
579  reverse_iterator rbegin() {
580  return reverse_iterator(end());
581  }
582 
583  reverse_iterator rend() {
584  return reverse_iterator(begin());
585  }
586 
587  const_reverse_iterator rbegin() const {
588  return const_reverse_iterator(end());
589  }
590 
591  const_reverse_iterator rend() const {
592  return const_reverse_iterator(begin());
593  }
594 
595  const_reverse_iterator crbegin() const {
596  return const_reverse_iterator(cend());
597  }
598 
599  const_reverse_iterator crend() const {
600  return const_reverse_iterator(cbegin());
601  }
602 
603  iterator begin_row(size_t row_index) {
604  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
605  return iterator(*this,
606  _vec.begin()
607  + (_nr_used_cols + _nr_unused_cols) * row_index);
608  }
609 
610  iterator end_row(size_t row_index) {
611  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
612  return begin_row(row_index) + _nr_used_cols;
613  }
614 
615  iterator begin_column(size_t col_index) {
616  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
617  return iterator::column_iterator(*this, _vec.begin() + col_index);
618  }
619 
620  iterator end_column(size_t col_index) {
621  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
622  return iterator::column_iterator(*this, _vec.end() + col_index);
623  }
624 
625  const_iterator cbegin_row(size_t row_index) const {
626  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
627  return const_iterator(
628  *this,
629  _vec.begin() + (_nr_used_cols + _nr_unused_cols) * row_index);
630  }
631 
632  const_iterator cend_row(size_t row_index) const {
633  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
634  return cbegin_row(row_index) + _nr_used_cols;
635  }
636 
637  const_iterator cbegin_column(size_t col_index) {
638  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
639  return const_iterator::column_iterator(*this, _vec.begin() + col_index);
640  }
641 
642  const_iterator cend_column(size_t col_index) {
643  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
644  return const_iterator::column_iterator(*this, _vec.end() + col_index);
645  }
646  // TODO reverse row and column iterators
647  };
648 
649  template <typename T, class A>
650  template <typename iterator_type,
651  typename reference_type,
652  typename pointer_type>
653  typename RecVec<T, A>::template iterator_base<
654  iterator_type,
655  reference_type,
656  pointer_type>::iterator_methods const*
657  RecVec<T, A>::iterator_base<iterator_type,
658  reference_type,
659  pointer_type>::_fast_methods
660  = new typename RecVec<T, A>::template iterator_base<
661  iterator_type,
662  reference_type,
663  pointer_type>::fast_iterator_methods();
664 
665  template <typename T, size_t N>
666  class SquareVector {
667  // So that SquareVector<T, N> can access private data members of
668  // SquareVector<S, M> and vice versa.
669  template <typename S, size_t M>
670  friend class SquareVector;
671 
672  public:
673  SquareVector() : _arrays(), _sizes() {
674  clear();
675  }
676 
677  void clear() {
678  _sizes.fill(0);
679  }
680 
681  void push_back(size_t depth, T x) {
682  LIBSEMIGROUPS_ASSERT(depth < N);
683  LIBSEMIGROUPS_ASSERT(_sizes[depth] < N);
684  _arrays[depth][_sizes[depth]] = x;
685  _sizes[depth]++;
686  }
687 
688  inline T back(size_t depth) const noexcept {
689  LIBSEMIGROUPS_ASSERT(depth < N);
690  return _arrays[depth][_sizes[depth] - 1];
691  }
692 
693  inline T const& at(size_t depth, size_t index) const {
694  LIBSEMIGROUPS_ASSERT(depth < N);
695  LIBSEMIGROUPS_ASSERT(index < _sizes[depth]);
696  return _arrays[depth][index];
697  }
698 
699  inline size_t size(size_t depth) const noexcept {
700  LIBSEMIGROUPS_ASSERT(depth < N);
701  return _sizes[depth];
702  }
703 
704  inline typename std::array<T, N>::const_iterator
705  cbegin(size_t depth) const {
706  LIBSEMIGROUPS_ASSERT(depth < N);
707  return _arrays[depth].cbegin();
708  }
709 
710  inline typename std::array<T, N>::const_iterator
711  cend(size_t depth) const {
712  LIBSEMIGROUPS_ASSERT(depth < N);
713  return _arrays[depth].cbegin() + _sizes[depth];
714  }
715 
716  inline typename std::array<T, N>::iterator begin(size_t depth) {
717  LIBSEMIGROUPS_ASSERT(depth < N);
718  return _arrays[depth].begin();
719  }
720 
721  inline typename std::array<T, N>::iterator end(size_t depth) const {
722  LIBSEMIGROUPS_ASSERT(depth < N);
723  return _arrays[depth].begin() + _sizes[depth];
724  }
725 
726  private:
727  std::array<std::array<T, N>, N> _arrays;
728  std::array<size_t, N> _sizes;
729  };
730 
731  template <typename T, size_t N>
732  class SquareArray {
733  // So that SquareArray<T, N> can access private data members of
734  // SquareArray<S, M> and vice versa.
735  template <typename S, size_t M>
736  friend class SquareArray;
737 
738  public:
739  SquareArray() : _arrays() {}
740 
741  inline void fill(T const& value) {
742  for (auto& x : _arrays) {
743  x.fill(value);
744  }
745  }
746 
747  inline std::array<T, N>& operator[](size_t depth) noexcept {
748  LIBSEMIGROUPS_ASSERT(depth < N);
749  return _arrays[depth];
750  }
751 
752  inline T const& at(size_t depth, size_t index) const {
753  LIBSEMIGROUPS_ASSERT(depth < N);
754  LIBSEMIGROUPS_ASSERT(index < N);
755  return _arrays.at(depth).at(index);
756  }
757 
758  inline typename std::array<T, N>::const_iterator
759  cbegin(size_t depth) const {
760  LIBSEMIGROUPS_ASSERT(depth < N);
761  return _arrays[depth].cbegin();
762  }
763 
764  inline typename std::array<T, N>::const_iterator
765  cend(size_t depth) const {
766  LIBSEMIGROUPS_ASSERT(depth < N);
767  return _arrays[depth].cend();
768  }
769 
770  inline typename std::array<T, N>::iterator begin(size_t depth) {
771  LIBSEMIGROUPS_ASSERT(depth < N);
772  return _arrays[depth].begin();
773  }
774 
775  inline typename std::array<T, N>::iterator end(size_t depth) const {
776  LIBSEMIGROUPS_ASSERT(depth < N);
777  return _arrays[depth].end();
778  }
779 
780  private:
781  std::array<std::array<T, N>, N> _arrays;
782  };
783  } // namespace internal
784 } // namespace libsemigroups
785 #endif // LIBSEMIGROUPS_INCLUDE_CONTAINERS_HPP_
size_t nr_cols(BMat8 const &)
Returns the number of non-zero rows in this.
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/digraph_8hpp.html b/digraph_8hpp.html deleted file mode 100644 index 74745d775..000000000 --- a/digraph_8hpp.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -libsemigroups: include/digraph.hpp File Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-Classes | -Namespaces
-
-
digraph.hpp File Reference
-
-
- -

This file contains an implementation of out-regular digraph which represents the action of a semigroup on a set. -More...

-
#include <queue>
-#include <random>
-#include <stack>
-#include <stddef.h>
-#include <type_traits>
-#include <vector>
-#include "containers.hpp"
-#include "forest.hpp"
-#include "iterator.hpp"
-#include "libsemigroups-debug.hpp"
-#include "libsemigroups-exception.hpp"
-#include "range.hpp"
-
-Include dependency graph for digraph.hpp:
-
-
- - - - - - - - - - - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - - - -
-
-

Go to the source code of this file.

- - - - - -

-Classes

class  libsemigroups::ActionDigraph< TIntType >
 Class for out-regular digraphs. More...
 
- - - - -

-Namespaces

 libsemigroups
 Namespace for everything in the libsemigroups library.
 
-

Detailed Description

-

This file contains an implementation of out-regular digraph which represents the action of a semigroup on a set.

-
- - - - diff --git a/digraph_8hpp__dep__incl.map b/digraph_8hpp__dep__incl.map deleted file mode 100644 index 666da173e..000000000 --- a/digraph_8hpp__dep__incl.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/digraph_8hpp__dep__incl.md5 b/digraph_8hpp__dep__incl.md5 deleted file mode 100644 index 19129a1a1..000000000 --- a/digraph_8hpp__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -f2c6ebd2c5552d7d9130de60bb9b1ac9 \ No newline at end of file diff --git a/digraph_8hpp__dep__incl.png b/digraph_8hpp__dep__incl.png deleted file mode 100644 index 291f72887..000000000 Binary files a/digraph_8hpp__dep__incl.png and /dev/null differ diff --git a/digraph_8hpp__incl.map b/digraph_8hpp__incl.map deleted file mode 100644 index 87e54efaa..000000000 --- a/digraph_8hpp__incl.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/digraph_8hpp__incl.md5 b/digraph_8hpp__incl.md5 deleted file mode 100644 index 6df6ff8bb..000000000 --- a/digraph_8hpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -84f96886cbe4afcf9450cca197278dd2 \ No newline at end of file diff --git a/digraph_8hpp__incl.png b/digraph_8hpp__incl.png deleted file mode 100644 index 2eabc3da6..000000000 Binary files a/digraph_8hpp__incl.png and /dev/null differ diff --git a/digraph_8hpp_source.html b/digraph_8hpp_source.html deleted file mode 100644 index 88b5c85e2..000000000 --- a/digraph_8hpp_source.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -libsemigroups: include/digraph.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
digraph.hpp
-
-
-Go to the documentation of this file.
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 Finn Smith
4 // Copyright (C) 2018 James D. Mitchell
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 //
19 
20 // TODO(FLS)
21 // 1. Complete the doc
22 // 2. Double-check that validate_whatever is used wherever it should be
23 // 3. More benchmarks (that don't seg fault)
24 // 4. Check for noexcept (that it's used correctly, and not missing somewhere
25 // it could be used.
26 
31 
32 #ifndef LIBSEMIGROUPS_INCLUDE_DIGRAPH_HPP_
33 #define LIBSEMIGROUPS_INCLUDE_DIGRAPH_HPP_
34 
35 #include <queue> // for queue
36 #include <random> // for mt19937
37 #include <stack> // for stack
38 #include <stddef.h> // for size_t
39 #include <type_traits> // for is_integral, is_unsigned
40 #include <vector> // for vector
41 
42 #include "containers.hpp" // for RecVec
43 #include "forest.hpp" // for Forest
44 #include "iterator.hpp" // for iterator_base
45 #include "libsemigroups-debug.hpp" // for LIBSEMIGROUPS_ASSERT
46 #include "libsemigroups-exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
47 #include "range.hpp" // for IntegralRange
48 
49 namespace libsemigroups {
58  template <typename TIntType>
59  class ActionDigraph {
60  static_assert(std::is_integral<TIntType>(),
61  "TIntType is not an integer type!");
62  static_assert(std::is_unsigned<TIntType>(), "TIntType is not unsigned!");
63 
65  // ActionDigraph - iterator - private
67 
68  struct iterator_methods_scc_roots {
69  TIntType const& indirection(
70  typename std::vector<std::vector<TIntType>>::const_iterator it)
71  const {
72  return *(*it).cbegin();
73  }
74 
75  TIntType const*
76  addressof(typename std::vector<std::vector<TIntType>>::const_iterator it)
77  const {
78  return &(*(*it).cbegin());
79  }
80  };
81 
82  public:
84  // ActionDigraph - typedefs - public
86 
88  using node_type = TIntType;
89 
91  using label_type = TIntType;
92 
95  using scc_index_type = TIntType;
96 
98  using const_iterator_nodes =
99  typename IntegralRange<TIntType>::const_iterator;
100 
103  using const_iterator_edges =
104  typename internal::RecVec<TIntType>::const_iterator;
105 
108  using const_iterator_scc = typename std::vector<TIntType>::const_iterator;
109 
112  using const_iterator_sccs =
113  typename std::vector<std::vector<TIntType>>::const_iterator;
114 
118  = internal::iterator_base<std::vector<TIntType>,
119  node_type const*,
120  node_type const&,
121  node_type,
122  iterator_methods_scc_roots>;
123 
125  // ActionDigraph - constructors + destructor - public
127 
129 
135  explicit ActionDigraph(TIntType nr_ndes = 0, TIntType dgree = 0)
136  : _degree(dgree),
137  _nr_nodes(nr_ndes),
138  _recvec(_degree, _nr_nodes, UNDEFINED),
139  _scc_back_forest(),
140  _scc_forest(),
141  _scc() {}
142 
143  ActionDigraph(ActionDigraph const&) = default;
144  ActionDigraph(ActionDigraph&&) = default;
145  ActionDigraph& operator=(ActionDigraph const&) = default;
146  ActionDigraph& operator=(ActionDigraph&&) = default;
147  ~ActionDigraph() = default;
148 
149  static ActionDigraph
150  random(TIntType nr_ndes, TIntType dgree, std::mt19937 mt = std::mt19937()) {
151  std::uniform_int_distribution<TIntType> dist(0, nr_ndes - 1);
152  ActionDigraph<TIntType> g(nr_ndes, dgree);
153  LIBSEMIGROUPS_ASSERT(g._recvec.nr_rows() == nr_ndes);
154  LIBSEMIGROUPS_ASSERT(g._recvec.nr_cols() == dgree);
155  std::generate(g._recvec.begin(), g._recvec.end(), [&dist, &mt]() {
156  return dist(mt);
157  });
158  return g;
159  }
160 
162 
164  // ActionDigraph - modifiers - public
167 
174  void inline add_nodes(size_t nr) {
175  if (nr > _recvec.nr_rows() - _nr_nodes) {
176  _recvec.add_rows(nr - (_recvec.nr_rows() - _nr_nodes));
177  }
178  _nr_nodes += nr;
179  reset();
180  }
181 
187  void inline add_to_out_degree(size_t nr) {
188  if (nr > _recvec.nr_cols() - _degree) {
189  _recvec.add_cols(nr - (_recvec.nr_cols() - _degree));
190  }
191  _degree += nr;
192  reset();
193  }
194 
205  void inline add_edge(node_type i, node_type j, label_type lbl) {
206  validate_node(i);
207  validate_node(j);
208  validate_label(lbl);
209  _recvec.set(i, lbl, j);
210  reset();
211  }
212 
221  void reserve(TIntType nr_ndes, TIntType out_dgree) const noexcept {
222  _recvec.add_cols(out_dgree - _recvec.nr_cols());
223  // TODO exception guarantee
224  _recvec.add_rows(nr_ndes - _recvec.nr_rows());
225  }
227 
229  // ActionDigraph - nodes, neighbors, etc - public
231 
233 
240  TIntType inline neighbor(node_type v, label_type lbl) const {
241  validate_node(v);
242  validate_label(lbl);
243  return _recvec.get(v, lbl);
244  }
245 
249  TIntType inline nr_nodes() const noexcept {
250  return _nr_nodes;
251  }
252 
256  size_t nr_edges() const noexcept {
257  return _recvec.nr_rows() * _recvec.nr_cols()
258  - std::count(_recvec.cbegin(), _recvec.cend(), UNDEFINED);
259  }
260 
262  TIntType out_degree() const noexcept {
263  return _degree;
264  }
265 
267  bool validate() const noexcept {
268  return nr_edges() == nr_nodes() * out_degree();
269  }
270 
271  const_iterator_nodes cbegin_nodes() const {
272  return IntegralRange<TIntType>(0, nr_nodes()).cbegin();
273  }
274 
275  const_iterator_nodes cend_nodes() const {
276  return IntegralRange<TIntType>(0, nr_nodes()).cend();
277  }
278 
279  const_iterator_edges cbegin_edges(node_type i) const {
280  validate_node(i);
281  return _recvec.cbegin_row(i);
282  }
283 
284  const_iterator_edges cend_edges(node_type i) const {
285  validate_node(i);
286  return _recvec.cend_row(i);
287  }
289 
291  // ActionDigraph - strongly connected components - public
293 
295 
301  TIntType scc_id(node_type nd) const {
302  validate_node(nd);
303  gabow_scc();
304  LIBSEMIGROUPS_ASSERT(nd < _scc._id.size());
305  return _scc._id[nd];
306  }
307 
312  TIntType nr_scc() const {
313  gabow_scc();
314  return _scc._comps.size();
315  }
316 
317  node_type root_of_scc(node_type nd) const {
318  // nd is validated in scc_id
319  return *cbegin_scc(scc_id(nd));
320  }
321 
322  const_iterator_sccs cbegin_sccs() const {
323  gabow_scc();
324  return _scc._comps.cbegin();
325  }
326 
327  const_iterator_sccs cend_sccs() const {
328  gabow_scc();
329  return _scc._comps.cend();
330  }
331 
332  const_iterator_scc cbegin_scc(scc_index_type i) const {
333  gabow_scc();
334  validate_scc_index(i);
335  return _scc._comps[i].cbegin();
336  }
337 
338  const_iterator_scc cend_scc(scc_index_type i) const {
339  gabow_scc();
340  validate_scc_index(i);
341  return _scc._comps[i].cend();
342  }
343 
344  const_iterator_scc_roots cbegin_scc_roots() const {
345  return const_iterator_scc_roots(cbegin_sccs());
346  }
347 
348  const_iterator_scc_roots cend_scc_roots() const {
349  return const_iterator_scc_roots(cend_sccs());
350  }
352 
354  // ActionDigraph - spanning forests - public
356 
358 
365  Forest const& spanning_forest() const {
366  if (!_scc_forest._defined) {
367  // Validity checked in gabow_scc
368  gabow_scc();
369 
370  std::vector<bool> seen(nr_nodes(), false);
371  std::queue<TIntType> queue;
372 
373  _scc_forest._forest.clear();
374  _scc_forest._forest.add_nodes(nr_nodes());
375 
376  for (size_t i = 0; i < nr_scc(); ++i) {
377  queue.push(_scc._comps[i][0]);
378  seen[_scc._comps[i][0]] = true;
379  do {
380  size_t x = queue.front();
381  for (size_t j = 0; j < _degree; ++j) {
382  size_t y = _recvec.get(x, j);
383  if (!seen[y] && _scc._id[y] == _scc._id[x]) {
384  _scc_forest._forest.set(y, x, j);
385  queue.push(y);
386  seen[y] = true;
387  }
388  }
389  queue.pop();
390  } while (!queue.empty());
391  }
392  _scc_forest._defined = true;
393  }
394  return _scc_forest._forest;
395  }
396 
397  Forest const& reverse_spanning_forest() const {
398  if (!_scc_back_forest._defined) {
399  // Validity checked in gabow_scc
400  gabow_scc();
401 
402  _scc_back_forest._forest.clear();
403  _scc_back_forest._forest.add_nodes(nr_nodes());
404 
405  std::vector<std::vector<TIntType>> reverse_edges(
406  nr_nodes(), std::vector<TIntType>());
407  std::vector<std::vector<TIntType>> reverse_labels(
408  nr_nodes(), std::vector<TIntType>());
409 
410  for (size_t i = 0; i < nr_nodes(); ++i) {
411  size_t const scc_id_i = scc_id(i);
412  for (size_t j = 0; j < out_degree(); ++j) {
413  size_t const k = _recvec.get(i, j);
414  if (scc_id(k) == scc_id_i) {
415  reverse_edges[k].push_back(i);
416  reverse_labels[k].push_back(j);
417  }
418  }
419  }
420  std::queue<size_t> queue;
421  std::vector<bool> seen(nr_nodes(), false);
422 
423  for (size_t i = 0; i < nr_scc(); ++i) {
424  LIBSEMIGROUPS_ASSERT(queue.empty());
425  queue.push(_scc._comps[i][0]);
426  seen[_scc._comps[i][0]] = true;
427  while (!queue.empty()) {
428  size_t x = queue.front();
429  for (size_t j = 0; j < reverse_edges[x].size(); ++j) {
430  size_t y = reverse_edges[x][j];
431  if (!seen[y]) {
432  queue.push(y);
433  seen[y] = true;
434  _scc_back_forest._forest.set(y, x, reverse_labels[x][j]);
435  }
436  }
437  queue.pop();
438  }
439  }
440  _scc_back_forest._defined = true;
441  }
442  return _scc_back_forest._forest;
443  }
445 
446  private:
448  // ActionDigraph - validation - private
450 
451  void validate_node(node_type v) const {
452  if (v >= nr_nodes()) {
453  LIBSEMIGROUPS_EXCEPTION("node value out of bounds, got "
454  << v << ", expected at most "
455  << nr_nodes() - 1);
456  }
457  }
458 
459  void validate_label(label_type lbl) const {
460  if (lbl >= out_degree()) {
461  LIBSEMIGROUPS_EXCEPTION("label value out of bounds, got "
462  << lbl << ", expected at most "
463  << out_degree() - 1);
464  }
465  }
466 
467  void validate_scc_index(scc_index_type i) const {
468  if (i >= nr_scc()) {
469  LIBSEMIGROUPS_EXCEPTION("scc index out of bounds, got "
470  << i << ", expected at most " << nr_scc() - 1);
471  }
472  }
473 
475  // ActionDigraph - reset (after calling a modifier) - private
477 
478  void reset() {
479  _scc_back_forest._defined = false;
480  _scc._defined = false;
481  _scc_forest._defined = false;
482  }
483 
485  // ActionDigraph - strongly connected components - private
487 
488  void gabow_scc() const {
489  if (_scc._defined) {
490  return;
491  } else if (!validate()) {
492  LIBSEMIGROUPS_EXCEPTION("digraph not fully defined, cannot find "
493  "strongly connected components");
494  }
495  _scc._comps.clear();
496  _scc._id.assign(nr_nodes(), UNDEFINED);
497 
498  static std::stack<TIntType> stack1;
499  static std::stack<TIntType> stack2;
500  static std::stack<std::pair<TIntType, TIntType>> frame;
501  static std::vector<TIntType> preorder;
502  preorder.assign(nr_nodes(), UNDEFINED);
503  LIBSEMIGROUPS_ASSERT(stack1.empty());
504  LIBSEMIGROUPS_ASSERT(stack2.empty());
505  LIBSEMIGROUPS_ASSERT(frame.empty());
506 
507  TIntType C = 0;
508  TIntType index = 0;
509 
510  for (TIntType w = 0; w < nr_nodes(); ++w) {
511  if (_scc._id[w] == UNDEFINED) {
512  frame.emplace(w, 0);
513  dfs_start:
514  LIBSEMIGROUPS_ASSERT(!frame.empty());
515  TIntType v = frame.top().first;
516  TIntType i = frame.top().second;
517 
518  preorder[v] = C++;
519  stack1.push(v);
520  stack2.push(v);
521  for (; i < _degree; ++i) {
522  dfs_end:
523  LIBSEMIGROUPS_ASSERT(v < nr_nodes() && i < _degree);
524  TIntType u = _recvec.get(v, i);
525  if (preorder[u] == UNDEFINED) {
526  frame.top().second = i;
527  frame.emplace(u, 0);
528  goto dfs_start;
529  } else if (_scc._id[u] == UNDEFINED) {
530  LIBSEMIGROUPS_ASSERT(!stack2.empty());
531  while (preorder[stack2.top()] > preorder[u]) {
532  stack2.pop();
533  }
534  }
535  }
536  if (v == stack2.top()) {
537  _scc._comps.emplace_back();
538  TIntType x;
539  do {
540  LIBSEMIGROUPS_ASSERT(!stack1.empty());
541  x = stack1.top();
542  _scc._id[x] = index;
543  _scc._comps[index].push_back(x);
544  stack1.pop();
545  } while (x != v);
546  ++index;
547  LIBSEMIGROUPS_ASSERT(!stack2.empty());
548  stack2.pop();
549  }
550  LIBSEMIGROUPS_ASSERT(!frame.empty());
551  frame.pop();
552  if (!frame.empty()) {
553  v = frame.top().first;
554  i = frame.top().second;
555  goto dfs_end;
556  }
557  }
558  }
559  _scc._defined = true;
560  }
561 
563  // ActionDigraph - data members - private
565 
566  TIntType _degree;
567  TIntType _nr_nodes;
568  mutable internal::RecVec<TIntType> _recvec;
569 
570  struct Attr {
571  Attr() : _defined(false) {}
572  bool _defined;
573  };
574 
575  mutable struct SCCBackForest : public Attr {
576  SCCBackForest() : Attr(), _forest() {}
577  Forest _forest;
578  } _scc_back_forest;
579 
580  mutable struct SCCForwardForest : public Attr {
581  SCCForwardForest() : Attr(), _forest() {}
582  Forest _forest;
583  } _scc_forest;
584 
585  mutable struct SCC : public Attr {
586  SCC() : Attr(), _comps(), _id() {}
587  std::vector<std::vector<size_t>> _comps;
588  std::vector<TIntType> _id;
589  } _scc;
590  };
591 
592 } // namespace libsemigroups
593 #endif // LIBSEMIGROUPS_INCLUDE_DIGRAPH_HPP_
typename internal::RecVec< size_t >::const_iterator const_iterator_edges
Alias for the type of an iterator pointing to the out-edges of a node in a digraph.
Definition: digraph.hpp:104
-
TIntType neighbor(node_type v, label_type lbl) const
Returns the node adjacent to v via the edge labelled lbl. If there is no such node, then Libsemigroups::UNDEFINED is returned.
Definition: digraph.hpp:240
-
Class for out-regular digraphs.
Definition: digraph.hpp:59
-
TIntType nr_scc() const
Returns the number of strongly connected components in this.
Definition: digraph.hpp:312
-
size_t node_type
Alias for the type of nodes in a digraph.
Definition: digraph.hpp:88
-
typename std::vector< std::vector< size_t > >::const_iterator const_iterator_sccs
Alias for the type of an iterator pointing to the strongly connected components of a digraph...
Definition: digraph.hpp:113
-
bool validate() const noexcept
Check every node has exactly out_degree() out-edges.
Definition: digraph.hpp:267
-
TIntType nr_nodes() const noexcept
Returns the number of nodes of this.
Definition: digraph.hpp:249
-
void add_to_out_degree(size_t nr)
Adds nr to the out-degree of this.
Definition: digraph.hpp:187
-
void add_edge(node_type i, node_type j, label_type lbl)
Add an edge from i to j labelled lbl.
Definition: digraph.hpp:205
-
UNDEFINED value.
Definition: constants.hpp:107
-
typename std::vector< size_t >::const_iterator const_iterator_scc
Alias for the type of an iterator pointing to the nodes in a strongly connected component of a digrap...
Definition: digraph.hpp:108
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
internal::iterator_base< std::vector< size_t >, node_type const *, node_type const &, node_type, iterator_methods_scc_roots > const_iterator_scc_roots
Alias for the type of an iterator pointing to the roots of a strongly connected components of a digra...
Definition: digraph.hpp:122
-
size_t label_type
Alias for the type of edge labels in a digraph.
Definition: digraph.hpp:91
-
typename IntegralRange< size_t >::const_iterator const_iterator_nodes
Alias for the type of an iterator pointing to the nodes of a digraph.
Definition: digraph.hpp:99
-
ActionDigraph(TIntType nr_ndes=0, TIntType dgree=0)
Constructor.
Definition: digraph.hpp:135
-
Forest const & spanning_forest() const
Returns a Forest comprised of spanning trees for each SCC.
Definition: digraph.hpp:365
-
size_t nr_edges() const noexcept
Returns the number of edges of this.
Definition: digraph.hpp:256
-
size_t scc_index_type
Alias for the type of an index in a strongly connected component of a digraph.
Definition: digraph.hpp:95
-
void reserve(TIntType nr_ndes, TIntType out_dgree) const noexcept
Reserve capacity.
Definition: digraph.hpp:221
-
TIntType out_degree() const noexcept
Returns the out-degree of this.
Definition: digraph.hpp:262
-
void add_nodes(size_t nr)
Adds nr nodes to this.
Definition: digraph.hpp:174
-
TIntType scc_id(node_type nd) const
Returns the id of the strongly connected component of a node.
Definition: digraph.hpp:301
-
- - - - diff --git a/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dir_68267d1309a1af8e8297ef4c3efbcdba.html deleted file mode 100644 index 4634b5390..000000000 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: src Directory Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
src Directory Reference
-
-
-
- - - - diff --git a/dir_81a7707f4dc407105ed1bf1265925d90.html b/dir_81a7707f4dc407105ed1bf1265925d90.html deleted file mode 100644 index 3311755c5..000000000 --- a/dir_81a7707f4dc407105ed1bf1265925d90.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -libsemigroups: semigroups Directory Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
semigroups Directory Reference
-
-
-
- - - - diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html deleted file mode 100644 index 79c953616..000000000 --- a/dir_d44c64559bbebec7f509842c48db8b23.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -libsemigroups: include Directory Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
include Directory Reference
-
-
- - - - - - - - - - - - - - - - - - - - -

-Files

file  adapters.hpp [code]
 This file contains function templates for adapting a user-defined type so that it can be used with libsemigroups.
 
file  digraph.hpp [code]
 This file contains an implementation of out-regular digraph which represents the action of a semigroup on a set.
 
file  froidure-pin.hpp [code]
 This file contains a declaration of the class template FroidurePin which implements the Froidure-Pin algorithm as described in Algorithms for computing finite semigroups
 
file  kbe.hpp [code]
 This file contains the declaration of the class KBE, which can be used as the element_type for a FroidurePin instance. This class essentially wraps a reduced word of a KnuthBendix instance.
 
file  libsemigroups.hpp [code]
 This file includes all the headers in libsemigroups, for convenience.
 
file  orb.hpp [code]
 This file contains a generic implementation of a class Orb which represents the action of a semigroup on a set.
 
-
- - - - diff --git a/doc.png b/doc.png deleted file mode 100644 index 17edabff9..000000000 Binary files a/doc.png and /dev/null differ diff --git a/doxygen.css b/doxygen.css deleted file mode 100644 index e2515926c..000000000 --- a/doxygen.css +++ /dev/null @@ -1,1764 +0,0 @@ -/* The standard CSS for doxygen 1.8.15 */ - -body, table, div, p, dl { - font: 400 14px/22px Roboto,sans-serif; -} - -p.reference, p.definition { - font: 400 14px/22px Roboto,sans-serif; -} - -/* @group Heading Levels */ - -h1.groupheader { - font-size: 150%; -} - -.title { - font: 400 14px/28px Roboto,sans-serif; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2.groupheader { - border-bottom: 1px solid #879ECB; - color: #354C7B; - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px cyan; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -p.interli { -} - -p.interdd { -} - -p.intertd { -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #FFFFFF; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #FFFFFF; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -ul { - overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ -} - -#side-nav ul { - overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ -} - -#main-nav ul { - overflow: visible; /* reset ul rule for the navigation bar drop down lists */ -} - -.fragment { - text-align: left; - direction: ltr; - overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ - overflow-y: hidden; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: monospace, fixed; - font-size: 105%; -} - -div.fragment { - padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ - margin: 4px 8px 4px 2px; - background-color: #FBFCFD; - border: 1px solid #C4CFE5; -} - -div.line { - font-family: monospace, fixed; - font-size: 13px; - min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line:after { - content:"\000A"; - white-space: pre; -} - -div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; -} - - -span.lineno { - padding-right: 4px; - text-align: right; - border-right: 2px solid #0F0; - background-color: #E8E8E8; - white-space: pre; -} -span.lineno a { - background-color: #D8D8D8; -} - -span.lineno a:hover { - background-color: #C8C8C8; -} - -.lineno { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.ah, span.ah { - background-color: black; - font-weight: bold; - color: #FFFFFF; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); -} - -div.classindex ul { - list-style: none; - padding-left: 0; -} - -div.classindex span.ai { - display: inline-block; -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl, img.inline { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -blockquote.DocNodeRTL { - border-left: 0; - border-right: 2px solid #9CAFD4; - margin: 0 4px 0 24px; - padding: 0 16px 0 12px; -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: cyan; - box-shadow: 0 0 15px cyan; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memSeparator { - border-bottom: 1px solid #DEE4F0; - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtitle { - padding: 8px; - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - border-top-right-radius: 4px; - border-top-left-radius: 4px; - margin-bottom: -1px; - background-image: url('nav_f.png'); - background-repeat: repeat-x; - background-color: #E2E8F2; - line-height: 1.25; - font-weight: 300; - float:left; -} - -.permalink -{ - font-size: 65%; - display: inline-block; - vertical-align: middle; -} - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px cyan; -} - -.memname { - font-weight: 400; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-color: #DFE5F1; - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 4px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 4px; - -} - -.overload { - font-family: "courier new",courier,monospace; - font-size: 65%; -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 10px 2px 10px; - background-color: #FBFCFD; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: #FFFFFF; - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} -.paramname code { - line-height: 14px; -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname, .tparams .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype, .tparams .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir, .tparams .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: #728DC1; - border-top:1px solid #5373B4; - border-left:1px solid #5373B4; - border-right:1px solid #C4CFE5; - border-bottom:1px solid #C4CFE5; - text-shadow: none; - color: white; - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view inside a (index) page */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid #9CAFD4; - border-bottom: 1px solid #9CAFD4; - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.even { - padding-left: 6px; - background-color: #F7F8FB; -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: #3D578C; -} - -.arrow { - color: #9CAFD4; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #728DC1; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderopen.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderclosed.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('doc.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -table.directory { - font: 400 14px Roboto,sans-serif; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable caption { - caption-side: top; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - /*width: 100%;*/ - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - /*width: 100%;*/ -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - font-weight: 400; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; - color: #283A5D; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -table.classindex -{ - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -.PageDocRTL-title div.headertitle { - text-align: right; - direction: rtl; -} - -dl { - padding: 0 0 0 0; -} - -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ -dl.section { - margin-left: 0px; - padding-left: 0px; -} - -dl.section.DocNodeRTL { - margin-right: 0px; - padding-right: 0px; -} - -dl.note { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #D0C000; -} - -dl.note.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #FF0000; -} - -dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00D000; -} - -dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #00D000; -} - -dl.deprecated { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #505050; -} - -dl.deprecated.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #505050; -} - -dl.todo { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00C0E0; -} - -dl.todo.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #00C0E0; -} - -dl.test { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #3030E0; -} - -dl.test.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #3030E0; -} - -dl.bug { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #C08050; -} - -dl.bug.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #C08050; -} - -dl.section dd { - margin-bottom: 6px; -} - - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectalign -{ - vertical-align: middle; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.plantumlgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: #F4F6FA; - border: 1px solid #D8DFEE; - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 8px 10px 10px; - width: 200px; -} - -.PageDocRTL-title div.toc { - float: left !important; - text-align: right; -} - -div.toc li { - background: url("bdwn.png") no-repeat scroll 0 5px transparent; - font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -.PageDocRTL-title div.toc li { - background-position-x: right !important; - padding-left: 0 !important; - padding-right: 10px; -} - -div.toc h3 { - font: bold 12px/1.2 Arial,FreeSans,sans-serif; - color: #4665A2; - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 30px; -} - -div.toc li.level4 { - margin-left: 45px; -} - -.PageDocRTL-title div.toc li.level1 { - margin-left: 0 !important; - margin-right: 0; -} - -.PageDocRTL-title div.toc li.level2 { - margin-left: 0 !important; - margin-right: 15px; -} - -.PageDocRTL-title div.toc li.level3 { - margin-left: 0 !important; - margin-right: 30px; -} - -.PageDocRTL-title div.toc li.level4 { - margin-left: 0 !important; - margin-right: 45px; -} - -.inherit_header { - font-weight: bold; - color: gray; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - white-space: nowrap; - background-color: white; - border: 1px solid gray; - border-radius: 4px 4px 4px 4px; - box-shadow: 1px 1px 7px gray; - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: grey; - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: #006318; -} - -#powerTip div { - margin: 0px; - padding: 0px; - font: 12px/16px Roboto,sans-serif; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #FFFFFF; - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before { - border-top-color: #808080; - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #FFFFFF; - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: #808080; - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: #FFFFFF; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: #FFFFFF; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - -/* @group Markdown */ - -/* -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.markdownTableHead tr { -} - -table.markdownTableBodyLeft td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft { - text-align: left -} - -th.markdownTableHeadRight { - text-align: right -} - -th.markdownTableHeadCenter { - text-align: center -} -*/ - -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.markdownTable tr { -} - -th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft, td.markdownTableBodyLeft { - text-align: left -} - -th.markdownTableHeadRight, td.markdownTableBodyRight { - text-align: right -} - -th.markdownTableHeadCenter, td.markdownTableBodyCenter { - text-align: center -} - -.DocNodeRTL { - text-align: right; - direction: rtl; -} - -.DocNodeLTR { - text-align: left; - direction: ltr; -} - -table.DocNodeRTL { - width: auto; - margin-right: 0; - margin-left: auto; -} - -table.DocNodeLTR { - width: auto; - margin-right: auto; - margin-left: 0; -} - -tt, code, kbd, samp -{ - display: inline-block; - direction:ltr; -} -/* @end */ - -u { - text-decoration: underline; -} - diff --git a/doxygen.png b/doxygen.png deleted file mode 100644 index 3ff17d807..000000000 Binary files a/doxygen.png and /dev/null differ diff --git a/dynsections.js b/dynsections.js deleted file mode 100644 index ea0a7b39a..000000000 --- a/dynsections.js +++ /dev/null @@ -1,120 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} - -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); -} - -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l - - - - - - -libsemigroups: include/element.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
element.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2016-18 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains the declaration of the element class and its subclasses.
20 
21 // TODO(later)
22 // 1. split this file into several files
23 
24 #ifndef LIBSEMIGROUPS_INCLUDE_ELEMENT_HPP_
25 #define LIBSEMIGROUPS_INCLUDE_ELEMENT_HPP_
26 
27 #include <math.h> // for sqrt, pow
28 #include <stddef.h> // for size_t
29 
30 #include <algorithm> // for max_element
31 #include <cstdint> // for uint32_t, int32_t, int64_t
32 #include <limits> // for numeric_limits
33 #include <numeric> // for iota
34 #include <ostream> // for ostream
35 #include <sstream> // for ostringstream
36 #include <string> // for string
37 #include <vector> // for vector
38 
39 #include "adapters.hpp" // for complexity, degree, increase_degree_by, . . .
40 #include "constants.hpp" // for UNDEFINED
41 #include "containers.hpp" // for internal::internal::RecVec
42 #include "hpcombi.hpp" // HPCombi::Perm16, Transf16, . . .
43 #include "libsemigroups-debug.hpp" // for LIBSEMIGROUPS_ASSERT
44 #include "libsemigroups-exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
45 #include "stl.hpp" // for internal::to_string, hash, equal_to, less
46 #include "traits.hpp" // for Traits
47 #include "types.hpp" // for SmallestInteger
48 
49 namespace libsemigroups {
50  // Forward declarations
51  class Blocks;
52  struct BooleanSemiring;
53  template <typename T>
54  class Semiring;
55 
61  class Element {
62  public:
64  Element();
65 
69  explicit Element(size_t);
70 
72  virtual ~Element() = default;
73 
78  virtual bool operator==(Element const&) const = 0;
79 
86  virtual bool operator<(Element const&) const = 0;
87 
92  bool operator>(Element const& that) const;
93 
98  bool operator!=(Element const& that) const;
99 
104  bool operator<=(Element const& that) const;
105 
110  bool operator>=(Element const& that) const;
111 
125  virtual size_t complexity() const = 0;
126 
137  virtual size_t degree() const = 0;
138 
144  inline size_t hash_value() const {
145  if (_hash_value == UNDEFINED) {
146  this->cache_hash_value();
147  }
148  return this->_hash_value;
149  }
150 
154  virtual void swap(Element&) = 0;
155 
166  virtual void redefine(Element const&, Element const&);
167 
172  void redefine(Element const*, Element const*);
173 
193  virtual void redefine(Element const&, Element const&, size_t);
194 
199  void redefine(Element const*, Element const*, size_t);
200 
201 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
202  virtual Element* empty_key() const = 0;
203 #endif
204 
207  virtual void increase_degree_by(size_t);
208 
217  virtual Element* heap_copy() const = 0;
218 
223  virtual Element* heap_identity() const = 0;
224 
225  protected:
229  virtual void cache_hash_value() const = 0;
230 
237  void reset_hash_value() const;
238 
244  mutable size_t _hash_value;
245  };
246 
261  template <typename TValueType, class TSubclass>
263  public:
268 
272  explicit ElementWithVectorData(size_t n) : Element(), _vector(n) {}
273 
280  explicit ElementWithVectorData(std::vector<TValueType> const& vector)
281  : Element(), _vector(vector) {}
282 
291  explicit ElementWithVectorData(std::vector<TValueType>&& vec)
292  : Element(), _vector(std::move(vec)) {}
293 
302  : Element(copy._hash_value),
303  _vector(copy._vector.cbegin(), copy._vector.cend()) {}
304 
309  virtual TSubclass operator*(ElementWithVectorData const& y) const {
310  TSubclass xy(y.degree());
311  xy.Element::redefine(*this, y);
312  return xy;
313  }
314 
320  inline TValueType operator[](size_t pos) const {
321  return _vector[pos];
322  }
323 
328  inline TValueType at(size_t pos) const {
329  return _vector.at(pos);
330  }
331 
336  bool operator==(Element const& that) const override {
337  return static_cast<ElementWithVectorData const&>(that)._vector
338  == this->_vector;
339  }
340 
346  bool operator<(Element const& that) const override {
347  auto& ewvd = static_cast<ElementWithVectorData const&>(that);
348  if (this->_vector.size() != ewvd._vector.size()) {
349  return this->_vector.size() < ewvd._vector.size();
350  }
351  return this->_vector < ewvd._vector;
352  }
353 
361  void swap(Element& x) override {
362  LIBSEMIGROUPS_ASSERT(x.degree() == this->degree());
363  auto& xx = static_cast<ElementWithVectorData&>(x);
364  _vector.swap(xx._vector);
365  std::swap(this->_hash_value, xx._hash_value);
366  }
367 
368  void swap(Element&& x) {
369  LIBSEMIGROUPS_ASSERT(x.degree() == this->degree());
370  auto&& xx = static_cast<ElementWithVectorData&&>(x);
371  _vector.swap(xx._vector);
372  std::swap(this->_hash_value, xx._hash_value);
373  }
374 
375 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
376  Element* empty_key() const override {
377  // + 2 since bipartition must be of even degree!
378  std::vector<TValueType> vector(this->degree() + 2);
379  return new TSubclass(std::move(vector));
380  }
381 #endif
382 
387  inline typename std::vector<TValueType>::const_iterator begin() const {
388  return _vector.begin();
389  }
390 
395  inline typename std::vector<TValueType>::const_iterator end() const {
396  return _vector.end();
397  }
398 
403  inline typename std::vector<TValueType>::const_iterator cbegin() const {
404  return _vector.cbegin();
405  }
406 
411  inline typename std::vector<TValueType>::const_iterator cend() const {
412  return _vector.cend();
413  }
414 
420  virtual TSubclass identity() const = 0;
421 
422  static TSubclass identity(size_t degree);
423 
429  Element* heap_identity() const override {
430  return this->identity().heap_copy();
431  }
432 
437  Element* heap_copy() const override {
438  return new TSubclass(*static_cast<TSubclass const*>(this));
439  }
440 
445  friend std::ostringstream& operator<<(std::ostringstream& os,
446  ElementWithVectorData const& elt) {
447  os << elt._vector;
448  return os;
449  }
450 
455  friend std::ostream& operator<<(std::ostream& os,
456  ElementWithVectorData const& elt) {
457  os << internal::to_string(elt);
458  return os;
459  }
460 
461  protected:
462  // Cannot declare cache_hash_value here, since PBR's are vectors of
463  // vectors, and there is not std::hash<vector<whatever>>.
466  template <typename T>
467  static inline size_t vector_hash(std::vector<T> const& vec) {
468  size_t seed = 0;
469  for (auto const& x : vec) {
470  seed ^= std::hash<T>{}(x) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
471  }
472  return seed;
473  }
474 
478  std::vector<TValueType> _vector;
479  };
480 
487  template <typename TValueType, class TSubclass>
489  : public ElementWithVectorData<TValueType, TSubclass> {
490  public:
494 
495  protected:
502  void cache_hash_value() const override {
503  this->_hash_value = this->vector_hash(this->_vector);
504  }
505  };
506 
537  template <typename TValueType, typename TSubclass>
539  : public ElementWithVectorDataDefaultHash<TValueType, TSubclass> {
540  public:
542  ElementWithVectorDataDefaultHash;
543 
548  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>() {}
549 
557  explicit PartialTransformation(std::vector<TValueType> const& vec)
558  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(vec) {
559  validate();
560  }
561 
566  PartialTransformation(std::initializer_list<TValueType> imgs)
567  : PartialTransformation<TValueType, TSubclass>(
568  std::vector<TValueType>(imgs)) {}
569 
575  void validate() const {
576  for (auto const& val : this->_vector) {
577  if ((val < 0 || val >= this->degree()) && val != UNDEFINED) {
578  LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
579  << static_cast<size_t>(val)
580  << ", must be less than " << this->degree());
581  }
582  }
583  }
584 
590  size_t complexity() const override {
591  return this->_vector.size();
592  }
593 
599  size_t degree() const final {
600  return this->_vector.size();
601  }
602 
608  size_t crank() const {
609  _lookup.clear();
610  _lookup.resize(degree(), false);
611  size_t r = 0;
612  for (auto const& x : this->_vector) {
613  if (x != UNDEFINED && !_lookup[x]) {
614  _lookup[x] = true;
615  r++;
616  }
617  }
618  return r;
619  }
620 
626  TSubclass identity() const override {
627  std::vector<TValueType> vector(this->degree());
628  std::iota(vector.begin(), vector.end(), 0);
629  return TSubclass(std::move(vector));
630  }
631 
632  static TSubclass identity(size_t n) {
633  std::vector<TValueType> vector(n);
634  std::iota(vector.begin(), vector.end(), 0);
635  return TSubclass(std::move(vector));
636  }
637 
638  private:
639  // Used for determining rank, FIXME not thread-safe
640  static std::vector<bool> _lookup;
641  };
642 
643  template <typename TValueType, typename TSubclass>
644  std::vector<bool> PartialTransformation<TValueType, TSubclass>::_lookup
645  = std::vector<bool>();
646 
647  // Base class for method redefine for Permutations and Transformations
648  template <typename TValueType, typename TSubclass>
649  class TransfBase : public PartialTransformation<TValueType, TSubclass> {
650  public:
652  TransfBase() : PartialTransformation<TValueType, TSubclass>() {}
653 
660  void redefine(Element const& x, Element const& y) override {
661  LIBSEMIGROUPS_ASSERT(x.degree() == y.degree());
662  LIBSEMIGROUPS_ASSERT(x.degree() == this->degree());
663  LIBSEMIGROUPS_ASSERT(&x != this && &y != this);
664  auto const& xx = static_cast<TransfBase<TValueType, TSubclass> const&>(x);
665  auto const& yy = static_cast<TransfBase<TValueType, TSubclass> const&>(y);
666  size_t const n = this->_vector.size();
667  for (TValueType i = 0; i < n; i++) {
668  (this->_vector)[i] = yy[xx[i]];
669  }
670  this->reset_hash_value();
671  }
672  };
673 
685  template <typename TValueType>
687  : public TransfBase<TValueType, Transformation<TValueType>> {
688  static_assert(std::is_integral<TValueType>::value,
689  "template parameter TValueType must be an integral type");
690  static_assert(!std::numeric_limits<TValueType>::is_signed,
691  "template parameter TValueType must be unsigned");
692 
693  public:
694  using TransfBase<TValueType, Transformation<TValueType>>::TransfBase;
695  Transformation() : TransfBase<TValueType, Transformation<TValueType>>() {}
696 
701  explicit Transformation(std::vector<TValueType> const& vec)
702  : TransfBase<TValueType, Transformation<TValueType>>(vec) {
703  validate();
704  }
705 
714  explicit Transformation(std::vector<TValueType>&& vec)
715  : TransfBase<TValueType, Transformation<TValueType>>(std::move(vec)) {
716  validate();
717  }
718 
723  Transformation(std::initializer_list<TValueType> imgs)
724  : Transformation<TValueType>(std::vector<TValueType>(imgs)) {}
725 
730  : TransfBase<TValueType, Transformation<TValueType>>(copy) {}
731 
736  void validate() const {
737  size_t deg = this->degree();
738  for (auto const& val : this->_vector) {
739  if (val >= deg) {
740  LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
741  << static_cast<size_t>(val)
742  << ", must be less than " << deg);
743  }
744  }
745  }
746 
747  void increase_degree_by(size_t m) override {
748  this->_vector.resize(this->_vector.size() + m);
749  std::iota(this->_vector.end() - m,
750  this->_vector.end(),
751  this->_vector.size() - m);
752  this->reset_hash_value();
753  }
754 
755  protected:
758  void cache_hash_value() const override {
759  size_t seed = 0;
760  size_t deg = this->_vector.size();
761  for (auto const& val : this->_vector) {
762  seed *= deg;
763  seed += val;
764  }
765  this->_hash_value = seed;
766  }
767  };
768 
782  template <typename TValueType>
784  : public PartialTransformation<TValueType, PartialPerm<TValueType>> {
785  static_assert(std::is_integral<TValueType>::value,
786  "template parameter TValueType must be an integral type");
787  static_assert(!std::numeric_limits<TValueType>::is_signed,
788  "template parameter TValueType must be unsigned");
789 
790  public:
791  using PartialTransformation<TValueType,
793 
798  explicit PartialPerm(std::vector<TValueType> const& vec)
799  : PartialTransformation<TValueType, PartialPerm<TValueType>>(vec) {
800  validate();
801  }
802 
811  explicit PartialPerm(std::vector<TValueType>&& vec)
812  : PartialTransformation<TValueType, PartialPerm<TValueType>>(
813  std::move(vec)) {
814  validate();
815  }
816 
820  PartialPerm(std::initializer_list<TValueType> imgs)
821  : PartialPerm<TValueType>(std::vector<TValueType>(imgs)) {}
822 
830  PartialPerm(std::vector<TValueType> const& dom,
831  std::vector<TValueType> const& ran,
832  size_t deg)
833  // The vector passed in the next line shouldn't be necessary, but with
834  // GCC5 PartialPerm fails to inherit the 0-param constructor from
835  // PartialTransformation.
836  : PartialTransformation<TValueType, PartialPerm<TValueType>>(
837  std::vector<TValueType>()) {
838  if (dom.size() != ran.size()) {
839  LIBSEMIGROUPS_EXCEPTION(
840  "domain and range size mismatch, domain has size "
841  << dom.size() << " but range has size " << ran.size());
842  } else if (!(dom.empty()
843  || deg > *std::max_element(dom.cbegin(), dom.cend()))) {
844  LIBSEMIGROUPS_EXCEPTION(
845  "domain value out of bounds, found "
846  << static_cast<size_t>(*std::max_element(dom.cbegin(), dom.cend()))
847  << ", must be less than " << deg);
848  }
849  this->_vector.resize(deg, UNDEFINED);
850  for (size_t i = 0; i < dom.size(); i++) {
851  this->_vector[dom[i]] = ran[i];
852  }
853  validate();
854  }
855 
860  PartialPerm(std::initializer_list<TValueType> dom,
861  std::initializer_list<TValueType> ran,
862  size_t deg)
863  : PartialPerm<TValueType>(std::vector<TValueType>(dom),
864  std::vector<TValueType>(ran),
865  deg) {}
866 
873  void validate() const {
874  size_t const deg = this->degree();
875  std::vector<bool> present(deg, false);
876  for (auto const& val : this->_vector) {
877  if (val != UNDEFINED) {
878  if (val < 0 || val >= this->degree()) {
879  LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
880  << static_cast<size_t>(val)
881  << ", must be less than "
882  << this->degree());
883  } else if (present[val]) {
884  LIBSEMIGROUPS_EXCEPTION("duplicate image value "
885  << static_cast<size_t>(val));
886  }
887  present[val] = true;
888  }
889  }
890  }
891 
894  : PartialTransformation<TValueType, PartialPerm<TValueType>>(copy) {}
895 
896  void increase_degree_by(size_t m) override {
897  this->_vector.insert(this->_vector.end(), m, UNDEFINED);
898  this->reset_hash_value();
899  }
900 
908  bool operator<(const Element& that) const override {
909  auto pp_this = static_cast<const PartialPerm<TValueType>*>(this);
910  auto pp_that = static_cast<const PartialPerm<TValueType>&>(that);
911 
912  size_t deg_this = pp_this->degree();
913  for (auto it = pp_this->_vector.end() - 1; it >= pp_this->_vector.begin();
914  it--) {
915  if (*it == UNDEFINED) {
916  deg_this--;
917  } else {
918  break;
919  }
920  }
921  size_t deg_that = pp_that.degree();
922  for (auto it = pp_that._vector.end() - 1;
923  it >= pp_that._vector.begin() && deg_that >= deg_this;
924  it--) {
925  if (*it == UNDEFINED) {
926  deg_that--;
927  } else {
928  break;
929  }
930  }
931 
932  if (deg_this != deg_that) {
933  return deg_this < deg_that;
934  }
935 
936  for (size_t i = 0; i < deg_this; i++) {
937  if ((*pp_this)[i] != pp_that[i]) {
938  return (*pp_this)[i] == UNDEFINED
939  || (pp_that[i] != UNDEFINED && (*pp_this)[i] < pp_that[i]);
940  }
941  }
942  return false;
943  }
944 
951  void redefine(Element const& x, Element const& y) override {
952  LIBSEMIGROUPS_ASSERT(x.degree() == y.degree());
953  LIBSEMIGROUPS_ASSERT(x.degree() == this->degree());
954  LIBSEMIGROUPS_ASSERT(&x != this && &y != this);
955  auto const& xx = static_cast<PartialPerm<TValueType> const&>(x);
956  auto const& yy = static_cast<PartialPerm<TValueType> const&>(y);
957  size_t const n = this->degree();
958  for (TValueType i = 0; i < n; i++) {
959  this->_vector[i] = (xx[i] == UNDEFINED ? UNDEFINED : yy[xx[i]]);
960  }
961  this->reset_hash_value();
962  }
963 
972  size_t crank() const {
973  return this->_vector.size()
974  - std::count(
975  this->_vector.cbegin(), this->_vector.cend(), UNDEFINED);
976  }
977 
978  PartialPerm<TValueType> right_one() const {
979  std::vector<TValueType> img(this->degree(),
980  static_cast<TValueType>(UNDEFINED));
981  size_t const size = this->_vector.size();
982  for (size_t i = 0; i < size; ++i) {
983  if (this->_vector[i] != UNDEFINED) {
984  img[this->_vector[i]] = this->_vector[i];
985  }
986  }
987  return PartialPerm<TValueType>(img);
988  }
989 
990  PartialPerm<TValueType> left_one() const {
991  std::vector<TValueType> dom(this->degree(),
992  static_cast<TValueType>(UNDEFINED));
993  size_t const size = this->_vector.size();
994  for (size_t i = 0; i < size; ++i) {
995  if (this->_vector[i] != UNDEFINED) {
996  dom[i] = i;
997  }
998  }
999  return PartialPerm<TValueType>(dom);
1000  }
1001 
1002 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
1003  Element* empty_key() const override {
1004  std::vector<TValueType> vector(this->degree() + 1);
1005  std::iota(vector.begin(), vector.end(), 0);
1006  return new PartialPerm(std::move(vector));
1007  }
1008 #endif
1009  };
1010 
1018 
1023 
1025  : public ElementWithVectorDataDefaultHash<uint32_t, Bipartition> {
1026  // TODO(later) add more explanation to the doc here
1027  public:
1031  Bipartition();
1032 
1036  explicit Bipartition(size_t);
1037 
1046  explicit Bipartition(std::vector<uint32_t> const&);
1047 
1056  explicit Bipartition(std::vector<uint32_t>&&);
1057 
1061  Bipartition(std::initializer_list<uint32_t> blocks);
1062 
1066  Bipartition(Bipartition const&) = default;
1067 
1074  Bipartition(std::initializer_list<std::vector<int32_t>> const&);
1075 
1085  void validate() const;
1086 
1091  size_t complexity() const override;
1092 
1097  size_t degree() const override;
1098 
1104  Bipartition identity() const override;
1105  static Bipartition identity(size_t);
1106 
1118  void redefine(Element const&, Element const&, size_t) override;
1119 
1125  size_t rank();
1126 
1131  uint32_t const_nr_blocks() const;
1132 
1136  uint32_t nr_blocks();
1137 
1143  uint32_t nr_left_blocks();
1144 
1150  uint32_t nr_right_blocks();
1151 
1159  bool is_transverse_block(size_t);
1160 
1166  Blocks* left_blocks();
1167 
1173  Blocks* right_blocks();
1174 
1180  void set_nr_blocks(size_t);
1181 
1188  void set_nr_left_blocks(size_t);
1189 
1195  void set_rank(size_t);
1196 
1197  private:
1198  static std::vector<uint32_t>
1199  blocks_to_list(std::vector<std::vector<int32_t>> blocks);
1200  uint32_t fuseit(std::vector<uint32_t>& fuse, uint32_t pos);
1201  void init_trans_blocks_lookup();
1202 
1203  static std::vector<std::vector<uint32_t>> _fuse;
1204  static std::vector<std::vector<uint32_t>> _lookup;
1205 
1206  size_t _nr_blocks;
1207  size_t _nr_left_blocks;
1208  std::vector<bool> _trans_blocks_lookup;
1209  size_t _rank;
1210  };
1211 
1227  template <typename TValueType, class TSubclass>
1229  : public ElementWithVectorDataDefaultHash<TValueType, TSubclass> {
1230  public:
1245  MatrixOverSemiringBase(std::vector<TValueType> const& matrix,
1247  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(matrix),
1248  _degree(sqrt(matrix.size())),
1249  _semiring(semiring) {
1250  validate();
1251  }
1252 
1269  MatrixOverSemiringBase(std::vector<TValueType>&& matrix,
1271  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(
1272  std::move(matrix)),
1273  _degree(sqrt(this->_vector.size())),
1274  _semiring(semiring) {
1275  validate();
1276  }
1277 
1299  MatrixOverSemiringBase(std::vector<std::vector<TValueType>> const& matrix,
1301  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(),
1302  _degree(),
1303  _semiring(semiring) {
1304  if (semiring == nullptr) {
1305  LIBSEMIGROUPS_EXCEPTION("semiring is nullptr");
1306  } else if (matrix.empty()) {
1307  LIBSEMIGROUPS_EXCEPTION("matrix has dimension 0");
1308  } else if (!all_of(matrix.cbegin(),
1309  matrix.cend(),
1310  [&matrix](std::vector<TValueType> row) {
1311  return row.size() == matrix.size();
1312  })) {
1313  LIBSEMIGROUPS_EXCEPTION("matrix is not square");
1314  }
1315  _degree = matrix[0].size();
1316  this->_vector.reserve(matrix.size() * matrix.size());
1317  for (auto const& row : matrix) {
1318  this->_vector.insert(this->_vector.end(), row.begin(), row.end());
1319  }
1320  validate();
1321  }
1322 
1328  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(copy._vector),
1329  _degree(copy._degree),
1330  _semiring(copy._semiring) {}
1331 
1336  void validate() const {
1337  if (this->degree() * this->degree() != this->_vector.size()) {
1338  LIBSEMIGROUPS_EXCEPTION(
1339  "matrix must have size that is a perfect square");
1340  }
1341  for (auto x : this->_vector) {
1342  if (!this->_semiring->contains(x)) {
1343  LIBSEMIGROUPS_EXCEPTION("matrix contains entry "
1344  << static_cast<size_t>(x)
1345  << " not in the underlying semiring");
1346  }
1347  }
1348  }
1349 
1352  return _semiring;
1353  }
1354 
1359  size_t complexity() const override {
1360  return pow(this->degree(), 3);
1361  }
1362 
1367  size_t degree() const override {
1368  return _degree;
1369  }
1370 
1376  TSubclass identity() const override {
1377  std::vector<TValueType> vector(this->_vector.size(), _semiring->zero());
1378  size_t n = this->degree();
1379  for (auto it = vector.begin(); it < vector.end(); it += n + 1) {
1380  (*it) = _semiring->one();
1381  }
1382  return TSubclass(vector, _semiring);
1383  }
1384 
1385  static TSubclass identity(size_t n, Semiring<TValueType>* sr) {
1386  std::vector<TValueType> vector(n, sr->zero());
1387  for (auto it = vector.begin(); it < vector.end(); it += n + 1) {
1388  (*it) = sr->one();
1389  }
1390  return TSubclass(vector, sr);
1391  }
1392 
1399  void redefine(Element const& x, Element const& y) override {
1400  auto xx = static_cast<MatrixOverSemiringBase const&>(x);
1401  auto yy = static_cast<MatrixOverSemiringBase const&>(y);
1402  LIBSEMIGROUPS_ASSERT(xx.degree() == yy.degree());
1403  LIBSEMIGROUPS_ASSERT(xx.degree() == this->degree());
1404  LIBSEMIGROUPS_ASSERT(&xx != this && &yy != this);
1405  // It can be that the elements are defined over semirings that are
1406  // distinct in memory but equal (for example, when one element comes
1407  // from a semigroup and another from an ideal of that semigroup).
1408  // LIBSEMIGROUPS_ASSERT(xx->semiring() == yy->semiring() &&
1409  // xx->semiring() == this->semiring());
1410  // TODO(later) verify that x, y, and this are defined over the same
1411  // semiring.
1412  size_t const deg = this->degree();
1413 
1414  for (size_t i = 0; i < deg; i++) {
1415  for (size_t j = 0; j < deg; j++) {
1416  int64_t v = _semiring->zero();
1417  for (size_t k = 0; k < deg; k++) {
1418  v = _semiring->plus(
1419  v, _semiring->prod(xx[i * deg + k], yy[k * deg + j]));
1420  }
1421  (this->_vector)[i * deg + j] = v;
1422  }
1423  }
1424  after(); // post process this
1425  this->reset_hash_value();
1426  }
1427 
1428 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
1429  Element* empty_key() const override {
1430  std::vector<TValueType> vector((this->degree() + 1)
1431  * (this->degree() + 1));
1432  return new TSubclass(std::move(vector), _semiring);
1433  }
1434 #endif
1435 
1436  protected:
1437  friend class ElementWithVectorData<TValueType, TSubclass>;
1441  explicit MatrixOverSemiringBase(std::vector<TValueType> const& matrix)
1442  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(matrix),
1443  _degree(sqrt(matrix.size())),
1444  _semiring(nullptr) {}
1445 
1449  explicit MatrixOverSemiringBase(TValueType = 0)
1450  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(),
1451  _degree(0),
1452  _semiring(nullptr) {}
1453 
1454  private:
1455  // A function applied after redefinition
1456  virtual inline void after() {}
1457  size_t _degree;
1458  Semiring<TValueType> const* _semiring;
1459  };
1460 
1467  template <typename TValueType>
1469  : public MatrixOverSemiringBase<TValueType,
1470  MatrixOverSemiring<TValueType>> {
1471  friend class ElementWithVectorData<TValueType,
1472  MatrixOverSemiring<TValueType>>;
1475 
1476  public:
1485  y) const override {
1487  std::vector<TValueType>(pow(y.degree(), 2)), this->semiring());
1488  xy.Element::redefine(*this, y);
1489  return xy;
1490  }
1491  };
1492 
1503  : public MatrixOverSemiringBase<int64_t, ProjectiveMaxPlusMatrix> {
1504  public:
1512  ProjectiveMaxPlusMatrix(std::vector<int64_t> const&,
1513  Semiring<int64_t> const*);
1514 
1522  ProjectiveMaxPlusMatrix(std::vector<std::vector<int64_t>> const&,
1523  Semiring<int64_t> const*);
1526 
1535  operator*(ElementWithVectorData const&) const override;
1536 
1537  private:
1538  // This constructor only exists to make the empty_key method for
1539  // ElementWithVectorData work, and because the compiler complains about the
1540  // Element::operator* without it.
1541  explicit ProjectiveMaxPlusMatrix(int64_t);
1542 
1543  friend class ElementWithVectorData<int64_t, ProjectiveMaxPlusMatrix>;
1544 
1545  // FIXME pass by value, really?
1546  explicit ProjectiveMaxPlusMatrix(std::vector<int64_t>);
1547 
1548  // A function applied after redefinition
1549  void after() final;
1550  };
1551 
1564  template <typename TValueType>
1565  class Permutation : public TransfBase<TValueType, Permutation<TValueType>> {
1566  public:
1567  using TransfBase<TValueType, Permutation<TValueType>>::TransfBase;
1568 
1574  void validate() const {
1575  std::vector<bool> present(this->degree(), false);
1576  for (auto const& val : this->_vector) {
1577  if (val < 0 || val >= this->degree()) {
1578  LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
1579  << static_cast<size_t>(val)
1580  << ", must be less than " << this->degree());
1581  } else if (present[val]) {
1582  LIBSEMIGROUPS_EXCEPTION("duplicate image value "
1583  << static_cast<size_t>(val));
1584  }
1585  present[val] = true;
1586  }
1587  }
1588 
1589  Permutation identity() const override {
1590  return this->PartialTransformation<TValueType,
1592  }
1593 
1594  static Permutation identity(size_t n) {
1595  return PartialTransformation<TValueType,
1597  }
1598 
1604  size_t const n = this->_vector.size();
1605  Permutation id = this->identity();
1606  for (TValueType i = 0; i < n; i++) {
1607  id._vector[this->_vector[i]] = i;
1608  }
1609  return id;
1610  }
1611  };
1612 
1620  class BooleanMat : public MatrixOverSemiringBase<bool, BooleanMat> {
1621  public:
1630  explicit BooleanMat(std::vector<bool> const&);
1631 
1637  explicit BooleanMat(std::vector<std::vector<bool>> const&);
1638 
1642  explicit BooleanMat(size_t);
1643 
1645  BooleanMat(BooleanMat const&);
1646 
1651  void redefine(Element const&, Element const&);
1652 
1653  // There is a specialization of std::hash for std::vector<bool> but for
1654  // some reason it causes a dramatic slow down in some of the benchmarks if
1655  // it is used by cache_hash_value below. So, we leave this commented out as
1656  // a reminder not to use it.
1657 
1658  // protected:
1659  // void cache_hash_value() const override {
1660  // this->_hash_value = std::hash<std::vector<bool>>{}(this->_vector);
1661  // }
1662 
1663  private:
1664  // This constructor only exists to make the empty_key method for
1665  // ElementWithVectorData work, and because the compiler complains about the
1666  // Element::operator* without it.
1667  explicit BooleanMat(bool);
1668 
1669  // The next constructor only exists to allow the identity method for
1670  // MatrixOverSemiringBase to work.
1671  friend class MatrixOverSemiringBase<bool, BooleanMat>;
1672  // FIXME pass by value?
1673  BooleanMat(std::vector<bool>, Semiring<bool> const*);
1674 
1675  static BooleanSemiring const* const _semiring;
1676  };
1677 
1683  class PBR : public ElementWithVectorData<std::vector<uint32_t>, PBR> {
1684  public:
1694 
1700  explicit PBR(std::initializer_list<std::vector<uint32_t>>);
1701 
1705  explicit PBR(size_t);
1706 
1714  PBR(std::initializer_list<std::vector<int32_t>> const&,
1715  std::initializer_list<std::vector<int32_t>> const&);
1716 
1726  void validate() const;
1727 
1732  size_t complexity() const override;
1733 
1739  size_t degree() const override;
1740 
1747  PBR identity() const override;
1748  static PBR identity(size_t);
1749 
1761  void redefine(Element const&, Element const&, size_t) override;
1762 
1766  friend std::ostringstream& operator<<(std::ostringstream&, PBR const&);
1767 
1771  friend std::ostream& operator<<(std::ostream&, PBR const&);
1772 
1773  protected:
1774  void cache_hash_value() const override;
1775 
1776  private:
1777  static std::vector<std::vector<uint32_t>>
1778  process_left_right(std::vector<std::vector<int32_t>> const&,
1779  std::vector<std::vector<int32_t>> const&);
1780 
1781  void unite_rows(internal::RecVec<bool>&,
1782  internal::RecVec<bool>&,
1783  size_t const&,
1784  size_t const&);
1785 
1786  void x_dfs(std::vector<bool>&,
1787  std::vector<bool>&,
1788  internal::RecVec<bool>&,
1789  uint32_t const&,
1790  uint32_t const&,
1791  PBR const* const,
1792  PBR const* const,
1793  size_t const&);
1794 
1795  void y_dfs(std::vector<bool>&,
1796  std::vector<bool>&,
1797  internal::RecVec<bool>&,
1798  uint32_t const&,
1799  uint32_t const&,
1800  PBR const* const,
1801  PBR const* const,
1802  size_t const&);
1803 
1804  static std::vector<std::vector<bool>> _x_seen;
1805  static std::vector<std::vector<bool>> _y_seen;
1806  static std::vector<internal::RecVec<bool>> _out;
1807  static std::vector<internal::RecVec<bool>> _tmp;
1808  };
1809 
1810  // Traits specialization for derived classes of Element.
1811  template <class TElementType>
1812  struct Traits<TElementType,
1813  typename std::enable_if<
1814  std::is_base_of<Element, TElementType>::value>::type> {
1815  static_assert(!std::is_pointer<TElementType>::value,
1816  "TElementType must not be a pointer");
1817  using element_type = TElementType;
1818  using const_element_type = TElementType const;
1819  using reference = TElementType&;
1820  using const_reference = TElementType const&;
1821  using pointer = TElementType*;
1822  using const_pointer = TElementType const*;
1823 
1824  using internal_element_type = TElementType*;
1825  using internal_const_element_type = TElementType const*;
1826  using internal_reference = internal_element_type&;
1827  using internal_const_reference = internal_const_element_type const&;
1828 
1829  inline internal_const_element_type
1830  to_internal_const(const_reference x) const {
1831  return &x;
1832  }
1833 
1834  inline internal_element_type to_internal(reference x) const {
1835  return &x;
1836  }
1837 
1838  inline const_reference
1839  to_external_const(internal_const_element_type x) const {
1840  return *x;
1841  }
1842 
1843  inline reference to_external(internal_element_type x) const {
1844  return *x;
1845  }
1846 
1847  // Value contains some memory shared with other values. Destroy the shared
1848  // part. Obviously, The caller should make sure that nothing is actually
1849  // shared.
1850  inline void internal_free(internal_element_type x) const {
1851  delete x;
1852  }
1853 
1854  inline void external_free(element_type) const {}
1855 
1856  inline internal_element_type
1857  internal_copy(internal_const_element_type x) const {
1858  return new element_type(*x);
1859  }
1860 
1861  inline element_type external_copy(internal_const_element_type x) const {
1862  return element_type(*x);
1863  }
1864  };
1865 
1866  // Specialization for Element* and Element const* . . .
1867  template <typename TElementType>
1868  struct Traits<
1869  TElementType,
1870  typename std::enable_if<
1871  std::is_same<TElementType, Element*>::value
1872  || std::is_same<TElementType, Element const*>::value>::type> {
1873  using element_type = Element*;
1874  using const_element_type = Element const*;
1875  using reference = element_type;
1876  using const_reference = const_element_type;
1877  using pointer = element_type;
1878  using const_pointer = const_element_type;
1879 
1880  using internal_element_type = element_type;
1881  using internal_const_element_type = const_element_type;
1882  using internal_reference = internal_element_type&;
1883  using internal_const_reference = internal_const_element_type const&;
1884 
1885  inline internal_const_element_type
1886  to_internal_const(const_element_type x) const {
1887  return x;
1888  }
1889 
1890  inline internal_element_type to_internal(element_type x) const {
1891  return x;
1892  }
1893 
1894  inline const_element_type
1895  to_external_const(internal_const_element_type x) const {
1896  return const_cast<element_type>(x);
1897  }
1898 
1899  inline element_type to_external(internal_element_type x) const {
1900  return x;
1901  }
1902 
1903  // Value are actually pointer to memory shared with other values.
1904  // Obviously, The caller should make sure that nothing is actually shared.
1905  inline void internal_free(internal_element_type x) const {
1906  delete x;
1907  }
1908 
1909  inline void external_free(element_type x) const {
1910  delete x;
1911  }
1912 
1913  inline internal_element_type
1914  internal_copy(internal_const_element_type x) const {
1915  return x->heap_copy();
1916  }
1917 
1918  inline element_type external_copy(internal_const_element_type x) const {
1919  return x->heap_copy();
1920  }
1921  };
1922 
1923  // Specialization of templates from adapters.hpp for classes // derived from
1924  // the class Element, such as Transformation<size_t> and so on . . .
1925  template <class TSubclass>
1926  struct complexity<TSubclass*,
1927  typename std::enable_if<
1928  std::is_base_of<Element, TSubclass>::value>::type> {
1929  inline size_t operator()(TSubclass const* x) const {
1930  return x->complexity();
1931  }
1932  };
1933 
1934  // TODO delete the next one
1935  template <class TSubclass>
1936  struct degree<TSubclass*,
1937  typename std::enable_if<
1938  std::is_base_of<Element, TSubclass>::value>::type> {
1939  inline size_t operator()(TSubclass const* x) const {
1940  return x->degree();
1941  }
1942  };
1943 
1944  template <class TSubclass>
1945  struct degree<TSubclass,
1946  typename std::enable_if<
1947  std::is_base_of<Element, TSubclass>::value>::type> {
1948  inline size_t operator()(TSubclass const& x) const {
1949  return x.degree();
1950  }
1951  };
1952 
1953  template <class TSubclass>
1954  struct increase_degree_by<
1955  TSubclass*,
1956  typename std::enable_if<
1957  std::is_base_of<Element, TSubclass>::value>::type> {
1958  inline void operator()(TSubclass* x, size_t n) const {
1959  return x->increase_degree_by(n);
1960  }
1961  };
1962 
1963  template <class TSubclass>
1964  struct less<TSubclass*,
1965  typename std::enable_if<
1966  std::is_base_of<Element, TSubclass>::value>::type> {
1967  inline bool operator()(TSubclass const* x, TSubclass const* y) const {
1968  return *x < *y;
1969  }
1970  };
1971 
1972  // FIXME delete this
1973  template <class TSubclass>
1974  struct one<TSubclass*,
1975  typename std::enable_if<
1976  std::is_base_of<Element, TSubclass>::value>::type> {
1977  TSubclass* operator()(Element const* x) const {
1978  // return new TSubclass(std::move(x->identity<TSubclass>()));
1979  return static_cast<TSubclass*>(x->heap_identity());
1980  }
1981 
1982  TSubclass* operator()(size_t n) {
1983  return new TSubclass(std::move(TSubclass::one(n)));
1984  }
1985  };
1986 
1987  template <class TSubclass>
1988  struct one<TSubclass,
1989  typename std::enable_if<
1990  std::is_base_of<Element, TSubclass>::value>::type> {
1991  TSubclass operator()(TSubclass const& x) const {
1992  return static_cast<TSubclass>(x.identity());
1993  }
1994 
1995  TSubclass operator()(size_t n) {
1996  return TSubclass(std::move(TSubclass::identity(n)));
1997  }
1998  };
1999 
2000  // TODO delete this one
2001  template <class TSubclass>
2002  struct product<TSubclass*,
2003  typename std::enable_if<
2004  std::is_base_of<Element, TSubclass>::value>::type> {
2005  void operator()(TSubclass* xy,
2006  TSubclass const* x,
2007  TSubclass const* y,
2008  size_t tid = 0) {
2009  xy->Element::redefine(*x, *y, tid);
2010  }
2011  };
2012 
2013  template <class TSubclass>
2014  struct product<TSubclass,
2015  typename std::enable_if<
2016  std::is_base_of<Element, TSubclass>::value>::type> {
2017  void operator()(TSubclass& xy,
2018  TSubclass const& x,
2019  TSubclass const& y,
2020  size_t tid = 0) {
2021  xy.Element::redefine(x, y, tid);
2022  }
2023  };
2024 
2025  template <class TSubclass>
2026  struct swap<TSubclass*,
2027  typename std::enable_if<
2028  std::is_base_of<Element, TSubclass>::value>::type> {
2029  void operator()(TSubclass* x, TSubclass* y) const {
2030  x->swap(*y);
2031  }
2032  };
2033 
2034  // TODO delete this one
2035  template <typename TValueType>
2036  struct action<Permutation<TValueType>*, TValueType> {
2037  TValueType operator()(Permutation<TValueType> const* x,
2038  TValueType const pt) {
2039  return (*x)[pt];
2040  }
2041  };
2042 
2043  template <typename TValueType>
2044  struct action<Permutation<TValueType>, TValueType> {
2045  TValueType operator()(Permutation<TValueType> const& x,
2046  TValueType const pt) {
2047  return x[pt];
2048  }
2049  };
2050 
2051  // TODO delete me
2052  template <typename TValueType>
2053  struct inverse<Permutation<TValueType>*> {
2054  Permutation<TValueType>* operator()(Permutation<TValueType>* x) {
2055  return new Permutation<TValueType>(std::move(x->inverse()));
2056  }
2057  };
2058 
2059  template <typename TValueType>
2060  struct inverse<Permutation<TValueType>> {
2061  Permutation<TValueType> operator()(Permutation<TValueType> const& x) {
2062  return x.inverse();
2063  }
2064  };
2065 
2066  template <class TSubclass>
2067  struct internal::hash<TSubclass,
2068  typename std::enable_if<
2069  std::is_base_of<Element, TSubclass>::value>::type> {
2071  size_t operator()(TSubclass const& x) const {
2072  return x.hash_value();
2073  }
2074  };
2075 
2082  template <class TSubclass>
2083  struct internal::hash<TSubclass*,
2084  typename std::enable_if<
2085  std::is_base_of<Element, TSubclass>::value>::type> {
2087  size_t operator()(TSubclass const* x) const {
2088  return x->hash_value();
2089  }
2090  };
2091 
2092  template <typename TIntType>
2093  struct right_action<PartialPerm<TIntType>, PartialPerm<TIntType>> {
2094  void operator()(PartialPerm<TIntType>& res,
2095  PartialPerm<TIntType> const& pt,
2096  PartialPerm<TIntType> const& x) const noexcept {
2097  res.redefine(pt, x);
2098  res.swap(res.right_one());
2099  }
2100  };
2101 
2102  template <typename TIntType>
2103  struct left_action<PartialPerm<TIntType>, PartialPerm<TIntType>> {
2104  void operator()(PartialPerm<TIntType>& res,
2105  PartialPerm<TIntType> const& pt,
2106  PartialPerm<TIntType> const& x) const noexcept {
2107  res.redefine(x, pt);
2108  res.swap(res.left_one());
2109  }
2110  };
2111 
2117  template <class TSubclass>
2118  struct internal::equal_to<
2119  TSubclass*,
2120  typename std::enable_if<
2121  std::is_base_of<libsemigroups::Element, TSubclass>::value>::type> {
2124  bool operator()(TSubclass const* x, TSubclass const* y) const {
2125  return *x == *y;
2126  }
2127  };
2128 
2129  template <typename TIntType>
2130  struct on_points<Permutation<TIntType>, TIntType> {
2131  void operator()(TIntType& res,
2132  TIntType const& pt,
2133  Permutation<TIntType> const& p) const noexcept {
2134  LIBSEMIGROUPS_ASSERT(pt < p.degree());
2135  res = p[pt];
2136  }
2137  };
2138 
2139  template <size_t N>
2140  struct OldTransfHelper {
2141 #ifdef LIBSEMIGROUPS_HPCOMBI
2142  using type = typename std::conditional<
2143  N >= 17,
2144  Transformation<typename SmallestInteger<N>::type>,
2145  HPCombi::Transf16>::type;
2146 #else
2147  using type = Transformation<typename SmallestInteger<N>::type>;
2148 #endif
2149  };
2150 
2151  template <size_t N>
2152  struct OldPPermHelper {
2153 #ifdef LIBSEMIGROUPS_HPCOMBI
2154  using type = typename std::conditional<
2155  N >= 17,
2156  PartialPerm<typename SmallestInteger<N>::type>,
2157  HPCombi::PPerm16>::type;
2158 #else
2159  using type = PartialPerm<typename SmallestInteger<N>::type>;
2160 #endif
2161  };
2162 
2163  template <size_t N>
2164  struct OldPermHelper {
2165 #ifdef LIBSEMIGROUPS_HPCOMBI
2166  using type = typename std::conditional<
2167  N >= 17,
2168  Permutation<typename SmallestInteger<N>::type>,
2169  HPCombi::Perm16>::type;
2170 #else
2171  using type = Permutation<typename SmallestInteger<N>::type>;
2172 #endif
2173  };
2174 
2175 #ifdef LIBSEMIGROUPS_HPCOMBI
2176  using BMat8 = HPCombi::BMat8;
2177 #else
2178  class BMat8; // Forward declaration
2179 #endif
2180  template <size_t N>
2181  struct BMat {
2182  using type = typename std::conditional<N >= 9, BooleanMat, BMat8>::type;
2183  };
2184 } // namespace libsemigroups
2185 #endif // LIBSEMIGROUPS_INCLUDE_ELEMENT_HPP_
Class for bipartitions.
Definition: element.hpp:1024
-
PartialPerm(std::vector< TValueType > const &dom, std::vector< TValueType > const &ran, size_t deg)
A constructor.
Definition: element.hpp:830
-
Blocks * right_blocks()
Return the left blocks of a bipartition.
-
Class for partitioned binary relations (PBR).
Definition: element.hpp:1683
-
ElementWithVectorData()
A constructor.
Definition: element.hpp:267
-
PartialPerm(std::vector< TValueType > &&vec)
A constructor.
Definition: element.hpp:811
-
Matrices over a semiring.
Definition: element.hpp:1468
-
virtual TSubclass operator*(ElementWithVectorData const &y) const
Returns the product of this and y.
Definition: element.hpp:309
-
This class its subclasses provide very basic functionality for creating semirings.
Definition: element.hpp:54
-
void redefine(Element const *, Element const *)
Multiplies x and y and stores the result in this.
-
bool operator!=(Element const &that) const
Returns true if this is not equal to that.
-
BooleanMat(std::vector< bool > const &)
A constructor.
-
virtual size_t degree() const =0
Returns the degree of an Element.
-
size_t degree() const override
Returns the degree of a PBR.
-
friend std::ostringstream & operator<<(std::ostringstream &, PBR const &)
Insertion operator.
-
Matrices over the boolean semiring.
Definition: element.hpp:1620
-
Class for signed partitions of the set .
Definition: blocks.hpp:43
-
bool operator<(Element const &that) const override
Returns true if this is less than that.
Definition: element.hpp:346
-
virtual Element * heap_identity() const =0
Returns an independent copy of the identity.
-
size_t complexity() const override
Returns the approximate time complexity of multiplying two partial transformations.
Definition: element.hpp:590
-
size_t degree() const override
Returns the degree of the bipartition.
-
bool operator>=(Element const &that) const
Returns true if this is less than or equal to that.
-
bool operator<=(Element const &that) const
Returns true if this is less than or equal to that.
-
std::vector< TValueType > _vector
The vector containing the defining data of this.
Definition: element.hpp:478
-
void redefine(Element const &x, Element const &y) override
Multiply x and y and stores the result in this.
Definition: element.hpp:951
-
virtual void cache_hash_value() const =0
Calculate and cache a hash value.
-
MatrixOverSemiringBase(std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)
A constructor.
Definition: element.hpp:1299
-
std::vector< TValueType >::const_iterator cend() const
Returns a const iterator.
Definition: element.hpp:411
-
size_t _hash_value
This data member holds a cached version of the hash value of an Element. It is stored here if it is e...
Definition: element.hpp:244
-
Abstract base class for elements using a vector to store their defining data.
Definition: element.hpp:262
-
virtual TSubclass identity() const =0
Returns the identity of the TSubclass.
-
void validate() const
Validates the data defining this.
Definition: element.hpp:1574
-
Definition: kbe.hpp:198
-
Abstract base class for semigroup elements.
Definition: element.hpp:61
-
static size_t vector_hash(std::vector< T > const &vec)
Returns a hash value for a vector provided there is a specialization of std::hash for the template ty...
Definition: element.hpp:467
-
Element * heap_identity() const override
Returns a new identity for TSubclass.
Definition: element.hpp:429
-
bool operator<(const Element &that) const override
Returns true if this is less than that.
Definition: element.hpp:908
-
void redefine(Element const &, Element const &)
Multiplies x and y and stores the result in this.
-
Transformation(std::vector< TValueType > const &vec)
A constructor.
Definition: element.hpp:701
-
MatrixOverSemiring operator*(ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType >> const &y) const override
Returns the product of this and y.
Definition: element.hpp:1483
-
Template class for permutations.
Definition: element.hpp:1565
-
void set_nr_left_blocks(size_t)
Set the cached number of left blocks.
-
size_t degree() const final
Returns the degree of a partial transformation.
Definition: element.hpp:599
-
size_t complexity() const override
Returns the approximate time complexity of multiplying two matrices.
Definition: element.hpp:1359
-
void validate() const
Validates the data defining this.
-
Transformation(std::initializer_list< TValueType > imgs)
A constructor.
Definition: element.hpp:723
-
virtual void redefine(Element const &, Element const &)
Multiplies x and y and stores the result in this.
-
Template class for partial permutations.
Definition: element.hpp:783
-
Matrices over a semiring.
Definition: element.hpp:1228
-
ElementWithVectorData(std::vector< TValueType > const &vector)
A constructor.
Definition: element.hpp:280
-
void increase_degree_by(size_t m) override
Increases the degree of this by deg. This does not make sense for all subclasses of Element...
Definition: element.hpp:747
-
Bipartition identity() const override
Returns an identity bipartition.
-
std::vector< TValueType >::const_iterator begin() const
Returns an iterator.
Definition: element.hpp:387
-
void set_nr_blocks(size_t)
Set the cached number of blocks.
-
void redefine(Element const &, Element const &, size_t) override
Multiply x and y and stores the result in this.
-
void reset_hash_value() const
Reset the cached value used by Element::hash_value.
-
Permutation inverse() const
Returns the inverse of a permutation.
Definition: element.hpp:1603
-
Bipartition()
A constructor.
-
MatrixOverSemiringBase(std::vector< TValueType > const &matrix)
Constructs a MatrixOverSemiringBase whose underlying semiring is not defined. The underlying semiring...
Definition: element.hpp:1441
-
TValueType operator[](size_t pos) const
Returns the pos entry in the vector containing the defining data.
Definition: element.hpp:320
-
virtual bool contains(T) const
Returns true if this contain the argument.
Definition: semiring.hpp:66
-
UNDEFINED value.
Definition: constants.hpp:107
-
void cache_hash_value() const override
Calculate and cache a hash value.
-
void swap(Element &x) override
Swap another Element with this.
Definition: element.hpp:361
-
void validate() const
Validates the data defining this.
Definition: element.hpp:736
-
void redefine(Element const &, Element const &, size_t) override
Multiply x and y and stores the result in this.
-
void cache_hash_value() const override
This method implements the default hash function for an ElementWithVectorData, which uses ElementWith...
Definition: element.hpp:502
-
virtual void increase_degree_by(size_t)
Increases the degree of this by deg. This does not make sense for all subclasses of Element...
-
PBR(std::initializer_list< std::vector< uint32_t >>)
A constructor.
-
Template class for transformations.
Definition: element.hpp:686
-
Blocks * left_blocks()
Return the left blocks of a bipartition.
-
MatrixOverSemiringBase(std::vector< TValueType > const &matrix, Semiring< TValueType > const *semiring)
A constructor.
Definition: element.hpp:1245
-
ElementWithVectorData(size_t n)
A constructor.
Definition: element.hpp:272
-
The usual Boolean semiring.
Definition: semiring.hpp:72
-
PartialPerm(std::initializer_list< TValueType > dom, std::initializer_list< TValueType > ran, size_t deg)
A constructor.
Definition: element.hpp:860
-
std::vector< TValueType >::const_iterator end() const
Returns an iterator.
Definition: element.hpp:395
-
Element()
A constructor.
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
ProjectiveMaxPlusMatrix operator*(ElementWithVectorData const &) const override
Returns the product of this and y.
-
void validate() const
Validates the data defining this.
Definition: element.hpp:1336
-
virtual void swap(Element &)=0
Swap another Element with this.
-
void validate() const
Validates the data defining this.
Definition: element.hpp:575
-
PartialTransformation(std::initializer_list< TValueType > imgs)
A constructor.
Definition: element.hpp:566
-
TSubclass identity() const override
Returns the identity matrix with dimension of this.
Definition: element.hpp:1376
-
size_t hash_value() const
Return the hash value of an Element.
Definition: element.hpp:144
-
virtual T prod(T, T) const =0
Returns the product, in the semiring, of the parameters.
-
friend std::ostringstream & operator<<(std::ostringstream &os, ElementWithVectorData const &elt)
Insertion operator.
Definition: element.hpp:445
-
virtual bool operator==(Element const &) const =0
Returns true if this equals that.
-
size_t complexity() const override
Returns the approximate time complexity of multiplication.
-
PartialTransformation(std::vector< TValueType > const &vec)
A constructor.
Definition: element.hpp:557
-
Abstract base class for elements using a vector to store their defining data and the default hash fun...
Definition: element.hpp:488
-
bool operator>(Element const &that) const
Returns true if this is greater than that.
-
void cache_hash_value() const override
This method is included because it seems to give superior performance in some benchmarks.
Definition: element.hpp:758
-
Transformation(std::vector< TValueType > &&vec)
A constructor.
Definition: element.hpp:714
-
uint32_t nr_right_blocks()
Returns the number of blocks containing a negative integer.
-
void validate() const
Validates the data defining this.
Definition: element.hpp:873
-
PartialTransformation()
A constructor.
Definition: element.hpp:547
-
std::vector< TValueType >::const_iterator cbegin() const
Returns a const iterator.
Definition: element.hpp:403
-
size_t crank() const
Returns the rank of a partial transformation.
Definition: element.hpp:608
-
size_t complexity() const override
Returns the approximate time complexity of multiplying PBRs.
-
virtual T plus(T, T) const =0
Returns the sum, in the semiring, of the parameters.
-
Element * heap_copy() const override
Returns a pointer to a new copy of this.
Definition: element.hpp:437
-
friend std::ostream & operator<<(std::ostream &os, ElementWithVectorData const &elt)
Insertion operator.
Definition: element.hpp:455
-
uint32_t nr_left_blocks()
Returns the number of blocks containing a positive integer.
-
virtual ~Element()=default
A default destructor.
-
Permutation identity() const override
Returns the identity transformation with degrees of this.
Definition: element.hpp:1589
-
PartialPerm(std::vector< TValueType > const &vec)
A constructor.
Definition: element.hpp:798
-
Transformation(Transformation< TValueType > const &copy)
A copy constructor.
Definition: element.hpp:729
-
size_t crank() const
Returns the rank of a partial permutation.
Definition: element.hpp:972
-
void redefine(Element const &x, Element const &y) override
Multiplies x and y and stores the result in this.
Definition: element.hpp:1399
-
MatrixOverSemiringBase(TValueType=0)
Constructs a MatrixOverSemiringBase of degree 0 whose underlying semiring is not defined. The underlying semiring must be set by any class deriving from this one.
Definition: element.hpp:1449
-
void validate() const
Validates the data defining this.
-
void set_rank(size_t)
Set the cached rank.
-
virtual Element * heap_copy() const =0
Returns a new element completely independent of this.
-
uint32_t const_nr_blocks() const
Returns the number of blocks in a bipartition.
-
TSubclass identity() const override
Returns the identity transformation with degrees of this.
Definition: element.hpp:626
-
ProjectiveMaxPlusMatrix(std::vector< int64_t > const &, Semiring< int64_t > const *)
A constructor.
-
virtual T zero() const =0
Returns the additive identity, or zero, of the semiring.
-
Abstract class for partial transformations.
Definition: element.hpp:538
-
Semiring< TValueType > const * semiring() const
Returns a pointer to the Semiring over which the matrix is defined.
Definition: element.hpp:1351
-
virtual bool operator<(Element const &) const =0
Returns true if this is less than that.
-
size_t degree() const override
Returns the dimension of the matrix.
Definition: element.hpp:1367
-
Class for projective max-plus matrices.
Definition: element.hpp:1502
-
uint32_t nr_blocks()
Returns the number of blocks in a bipartition.
-
virtual size_t complexity() const =0
Returns the approximate time complexity of multiplying two Element objects in a given subclass...
-
virtual T one() const =0
Returns the multiplicative identity, or one, of the semiring.
-
TValueType at(size_t pos) const
Returns the pos entry in the vector containing the defining data.
Definition: element.hpp:328
-
PartialPerm(std::initializer_list< TValueType > imgs)
A constructor.
Definition: element.hpp:820
-
ElementWithVectorData(ElementWithVectorData const &copy)
A copy constructor.
Definition: element.hpp:301
-
size_t rank()
Returns the number of transverse blocks.
-
MatrixOverSemiringBase(std::vector< TValueType > &&matrix, Semiring< TValueType > const *semiring)
A constructor.
Definition: element.hpp:1269
-
bool operator==(Element const &that) const override
Returns true if this equals that.
Definition: element.hpp:336
-
ElementWithVectorData(std::vector< TValueType > &&vec)
A constructor.
Definition: element.hpp:291
-
PBR identity() const override
Returns the identity PBR with degree equal to that of this.
-
bool is_transverse_block(size_t)
Returns true if the block with index index is transverse.
-
MatrixOverSemiringBase(MatrixOverSemiringBase const &copy)
A copy constructor.
Definition: element.hpp:1327
-
This file contains function templates for adapting a user-defined type so that it can be used with li...
-
void increase_degree_by(size_t m) override
Increases the degree of this by deg. This does not make sense for all subclasses of Element...
Definition: element.hpp:896
-
- - - - diff --git a/elements_8h_source.html b/elements_8h_source.html deleted file mode 100644 index ca03de0ee..000000000 --- a/elements_8h_source.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - -libsemigroups: src/elements.h Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
elements.h
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2016 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains the declaration of the element class and its subclasses.
20 
21 #ifndef LIBSEMIGROUPS_SRC_ELEMENTS_H_
22 #define LIBSEMIGROUPS_SRC_ELEMENTS_H_
23 
24 #include <math.h>
25 
26 #include <algorithm>
27 #include <functional>
28 #include <iostream>
29 #include <unordered_set>
30 #include <vector>
31 
32 #include "blocks.h"
33 #include "libsemigroups-debug.h"
34 #include "recvec.h"
35 #include "semiring.h"
36 
37 namespace libsemigroups {
38 
44  class Element {
45  public:
52  enum elm_t {
54  RWSE = 0,
57  };
58 
63  explicit Element(elm_t type = Element::elm_t::NOT_RWSE)
64  : _hash_value(UNDEFINED), _type(type) {}
65 
70  virtual ~Element() {}
71 
73  elm_t get_type() const {
74  return _type;
75  }
76 
81  virtual bool operator==(const Element& that) const = 0;
82 
89  virtual bool operator<(const Element& that) const = 0;
90 
104  virtual size_t complexity() const = 0;
105 
116  virtual size_t degree() const = 0;
117 
123  inline size_t hash_value() const {
124  if (_hash_value == UNDEFINED) {
125  this->cache_hash_value();
126  }
127  return this->_hash_value;
128  }
129 
135  virtual Element* identity() const = 0;
136 
151  virtual Element* really_copy(size_t increase_deg_by = 0) const = 0;
152 
156  virtual void copy(Element const* x) = 0;
157 
161  virtual void swap(Element* x) = 0;
162 
173  virtual void really_delete() = 0;
174 
185  virtual void redefine(Element const* x, Element const* y) {
186  redefine(x, y, 0);
187  }
188 
208  virtual void
209  redefine(Element const* x, Element const* y, size_t const& thread_id) {
210  (void) thread_id;
211  redefine(x, y);
212  }
213 
219  struct Equal {
221  bool operator()(Element const* x, Element const* y) const {
222  return *x == *y;
223  }
224  };
225 
232  struct Hash {
235  size_t operator()(Element const* x) const {
236  return x->hash_value();
237  }
238  };
239 
240  protected:
244  virtual void cache_hash_value() const = 0;
245 
252  void reset_hash_value() const {
253  _hash_value = UNDEFINED;
254  }
255 
261  static size_t const UNDEFINED;
262 
268  mutable size_t _hash_value;
269 
270  private:
271  elm_t _type;
272  };
273 
288  template <typename TValueType, class TSubclass>
290  public:
295  : Element(), _vector(new std::vector<TValueType>()) {}
296 
304  explicit ElementWithVectorData(std::vector<TValueType>* vector)
305  : Element(), _vector(vector) {}
306 
313  explicit ElementWithVectorData(std::vector<TValueType> const& vector)
314  : ElementWithVectorData(new std::vector<TValueType>(vector)) {}
315 
321  inline TValueType operator[](size_t pos) const {
322  return (*_vector)[pos];
323  }
324 
329  inline TValueType at(size_t pos) const {
330  return _vector->at(pos);
331  }
332 
337  bool operator==(Element const& that) const override {
338  return *(static_cast<TSubclass const&>(that)._vector) == *(this->_vector);
339  }
340 
346  bool operator<(Element const& that) const override {
347  TSubclass const& ewvd = static_cast<TSubclass const&>(that);
348  if (this->_vector->size() != ewvd._vector->size()) {
349  return this->_vector->size() < ewvd._vector->size();
350  }
351  for (size_t i = 0; i < this->_vector->size(); i++) {
352  if ((*this)[i] != ewvd[i]) {
353  return (*this)[i] < ewvd[i];
354  }
355  }
356  return false;
357  }
358 
366  Element* really_copy(size_t increase_deg_by = 0) const override {
367  LIBSEMIGROUPS_ASSERT(increase_deg_by == 0);
368  (void) increase_deg_by;
369  std::vector<TValueType>* vector(new std::vector<TValueType>(*_vector));
370  TSubclass* copy = new TSubclass(vector);
371  copy->_hash_value = this->_hash_value;
372  return copy;
373  }
374 
382  void copy(Element const* x) override {
383  LIBSEMIGROUPS_ASSERT(x->degree() == this->degree());
384  ElementWithVectorData const* xx
385  = static_cast<ElementWithVectorData const*>(x);
386  _vector->assign(xx->_vector->cbegin(), xx->_vector->cend());
387  this->_hash_value = xx->_hash_value;
388  }
389 
397  void swap(Element* x) override {
398  LIBSEMIGROUPS_ASSERT(x->degree() == this->degree());
399  ElementWithVectorData* xx = static_cast<ElementWithVectorData*>(x);
400  _vector->swap(*(xx->_vector));
401  std::swap(this->_hash_value, xx->_hash_value);
402  }
403 
405  void really_delete() override {
406  delete _vector;
407  }
408 
413  inline typename std::vector<TValueType>::iterator begin() const {
414  return _vector->begin();
415  }
416 
421  inline typename std::vector<TValueType>::iterator end() const {
422  return _vector->end();
423  }
424 
429  inline typename std::vector<TValueType>::iterator cbegin() const {
430  return _vector->cbegin();
431  }
432 
437  inline typename std::vector<TValueType>::iterator cend() const {
438  return _vector->cend();
439  }
440 
441  protected:
442  // Cannot declare cache_hash_value here, since PBR's are vectors of
443  // vectors, and there is not std::hash<vector<whatever>>.
446  template <typename T>
447  static inline size_t vector_hash(std::vector<T> const* vec) {
448  size_t seed = 0;
449  for (auto const& x : *vec) {
450  seed ^= std::hash<T>{}(x) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
451  }
452  return seed;
453  }
454 
458  std::vector<TValueType>* _vector;
459  };
460 
467  template <typename TValueType, class TSubclass>
469  : public ElementWithVectorData<TValueType, TSubclass> {
471 
472  protected:
479  void cache_hash_value() const override {
480  this->_hash_value = this->vector_hash(this->_vector);
481  }
482  };
483 
514  template <typename TValueType, typename TSubclass>
516  : public ElementWithVectorDataDefaultHash<TValueType, TSubclass> {
517  public:
519  ElementWithVectorDataDefaultHash;
520 
526  size_t complexity() const override {
527  return this->_vector->size();
528  }
529 
535  size_t degree() const override {
536  return this->_vector->size();
537  }
538 
544  size_t crank() const {
545  _lookup.clear();
546  _lookup.resize(degree(), false);
547  size_t r = 0;
548  for (auto const& x : *(this->_vector)) {
549  if (x != UNDEFINED && !_lookup[x]) {
550  _lookup[x] = true;
551  r++;
552  }
553  }
554  return r;
555  }
556 
562  Element* identity() const override {
563  std::vector<TValueType>* vector(new std::vector<TValueType>());
564  vector->reserve(this->degree());
565  for (size_t i = 0; i < this->degree(); i++) {
566  vector->push_back(i);
567  }
568  return new TSubclass(vector);
569  }
570 
575  static TValueType const UNDEFINED;
576 
577  private:
578  // Used for determining rank
579  static std::vector<bool> _lookup;
580  };
581 
582  template <typename TValueType, typename TSubclass>
584  = std::vector<bool>();
585 
586  template <typename TValueType, typename TSubclass>
588  = std::numeric_limits<TValueType>::max();
589 
601  template <typename T>
602  class Transformation : public PartialTransformation<T, Transformation<T>> {
603  public:
605 
612  Element* really_copy(size_t increase_deg_by = 0) const override {
614  = new Transformation<T>(new std::vector<T>(*this->_vector));
615  if (increase_deg_by == 0) {
616  copy->_hash_value = this->_hash_value;
617  } else {
618  size_t n = copy->_vector->size();
619  copy->_vector->reserve(n + increase_deg_by);
620  for (size_t i = n; i < n + increase_deg_by; i++) {
621  copy->_vector->push_back(i);
622  }
623  }
624  return copy;
625  }
626 
633  void redefine(Element const* x, Element const* y) override {
634  LIBSEMIGROUPS_ASSERT(x->degree() == y->degree());
635  LIBSEMIGROUPS_ASSERT(x->degree() == this->degree());
636  LIBSEMIGROUPS_ASSERT(x != this && y != this);
637  Transformation<T> const* xx(static_cast<Transformation<T> const*>(x));
638  Transformation<T> const* yy(static_cast<Transformation<T> const*>(y));
639  size_t const n = this->_vector->size();
640  for (T i = 0; i < n; i++) {
641  (*this->_vector)[i] = (*yy)[(*xx)[i]];
642  }
643  this->reset_hash_value();
644  }
645 
646  protected:
649  void cache_hash_value() const override {
650  size_t seed = 0;
651  size_t deg = this->_vector->size();
652  for (auto const& val : *(this->_vector)) {
653  seed *= deg;
654  seed += val;
655  }
656  this->_hash_value = seed;
657  }
658  };
659 
673  template <typename T>
674  class PartialPerm : public PartialTransformation<T, PartialPerm<T>> {
675  public:
678 
686  explicit PartialPerm(std::vector<T> const& dom,
687  std::vector<T> const& ran,
688  size_t deg)
690  LIBSEMIGROUPS_ASSERT(dom.size() == ran.size());
691  LIBSEMIGROUPS_ASSERT(dom.empty()
692  || deg >= *std::max_element(dom.begin(), dom.end()));
693 
694  this->_vector->resize(deg + 1, UNDEFINED);
695  for (size_t i = 0; i < dom.size(); i++) {
696  (*this->_vector)[dom[i]] = ran[i];
697  }
698  }
699 
707  bool operator<(const Element& that) const override {
708  auto pp_this = static_cast<const PartialPerm<T>*>(this);
709  auto pp_that = static_cast<const PartialPerm<T>&>(that);
710 
711  size_t deg_this = pp_this->degree();
712  for (auto it = pp_this->_vector->end() - 1;
713  it >= pp_this->_vector->begin();
714  it--) {
715  if (*it == UNDEFINED) {
716  deg_this--;
717  } else {
718  break;
719  }
720  }
721  size_t deg_that = pp_that.degree();
722  for (auto it = pp_that._vector->end() - 1;
723  it >= pp_that._vector->begin() && deg_that >= deg_this;
724  it--) {
725  if (*it == UNDEFINED) {
726  deg_that--;
727  } else {
728  break;
729  }
730  }
731 
732  if (deg_this != deg_that) {
733  return deg_this < deg_that;
734  }
735 
736  for (size_t i = 0; i < deg_this; i++) {
737  if ((*pp_this)[i] != pp_that[i]) {
738  return (*pp_this)[i] == UNDEFINED
739  || (pp_that[i] != UNDEFINED && (*pp_this)[i] < pp_that[i]);
740  }
741  }
742  return false;
743  }
744 
751  Element* really_copy(size_t increase_deg_by = 0) const override {
753  = new PartialPerm<T>(new std::vector<T>(*this->_vector));
754  if (increase_deg_by == 0) {
755  copy->_hash_value = this->_hash_value;
756  } else {
757  size_t n = copy->_vector->size();
758  copy->_vector->reserve(n + increase_deg_by);
759  for (size_t i = n; i < n + increase_deg_by; i++) {
760  copy->_vector->push_back(UNDEFINED);
761  }
762  }
763  return copy;
764  }
765 
772  void redefine(Element const* x, Element const* y) override {
773  LIBSEMIGROUPS_ASSERT(x->degree() == y->degree());
774  LIBSEMIGROUPS_ASSERT(x->degree() == this->degree());
775  LIBSEMIGROUPS_ASSERT(x != this && y != this);
776  PartialPerm<T> const* xx(static_cast<PartialPerm<T> const*>(x));
777  PartialPerm<T> const* yy(static_cast<PartialPerm<T> const*>(y));
778  size_t const n = this->degree();
779  for (T i = 0; i < n; i++) {
780  (*this->_vector)[i]
781  = ((*xx)[i] == UNDEFINED ? UNDEFINED : (*yy)[(*xx)[i]]);
782  }
783  this->reset_hash_value();
784  }
785 
794  size_t crank() const {
795  return this->_vector->size()
796  - std::count(
797  this->_vector->cbegin(), this->_vector->cend(), UNDEFINED);
798  }
799  };
800 
808 
813 
815  : public ElementWithVectorDataDefaultHash<u_int32_t, Bipartition> {
816  // TODO add more explanation to the doc here
817  public:
821  explicit Bipartition(size_t degree)
823  _nr_blocks(Bipartition::UNDEFINED),
824  _nr_left_blocks(Bipartition::UNDEFINED),
825  _trans_blocks_lookup(),
826  _rank(Bipartition::UNDEFINED) {
827  this->_vector->resize(2 * degree);
828  }
829 
839  explicit Bipartition(std::vector<u_int32_t>* blocks)
840  : ElementWithVectorDataDefaultHash<u_int32_t, Bipartition>(blocks),
841  _nr_blocks(Bipartition::UNDEFINED),
842  _nr_left_blocks(Bipartition::UNDEFINED),
843  _trans_blocks_lookup(),
844  _rank(Bipartition::UNDEFINED) {}
845 
855  explicit Bipartition(std::vector<u_int32_t> const& blocks)
856  : Bipartition(new std::vector<u_int32_t>(blocks)) {}
857 
858  // TODO another constructor that accepts an actual partition
859 
864  size_t complexity() const override;
865 
870  size_t degree() const override;
871 
877  Element* identity() const override;
878 
890  void redefine(Element const* x,
891  Element const* y,
892  size_t const& thread_id) override;
893 
899  size_t rank();
900 
905  u_int32_t const_nr_blocks() const;
906 
910  u_int32_t nr_blocks();
911 
917  u_int32_t nr_left_blocks();
918 
924  u_int32_t nr_right_blocks();
925 
933  bool is_transverse_block(size_t index);
934 
940  Blocks* left_blocks();
941 
947  Blocks* right_blocks();
948 
954  inline void set_nr_blocks(size_t nr_blocks) {
955  LIBSEMIGROUPS_ASSERT(_nr_blocks == Bipartition::UNDEFINED
956  || _nr_blocks == nr_blocks);
957  _nr_blocks = nr_blocks;
958  }
959 
966  inline void set_nr_left_blocks(size_t nr_left_blocks) {
967  LIBSEMIGROUPS_ASSERT(_nr_left_blocks == Bipartition::UNDEFINED
968  || _nr_left_blocks == nr_left_blocks);
969  _nr_left_blocks = nr_left_blocks;
970  }
971 
977  inline void set_rank(size_t rank) {
978  LIBSEMIGROUPS_ASSERT(_rank == Bipartition::UNDEFINED || _rank == rank);
979  _rank = rank;
980  }
981 
982  private:
983  u_int32_t fuseit(std::vector<u_int32_t>& fuse, u_int32_t pos);
984  void init_trans_blocks_lookup();
985 
986  static std::vector<std::vector<u_int32_t>> _fuse;
987  static std::vector<std::vector<u_int32_t>> _lookup;
988 
989  size_t _nr_blocks;
990  size_t _nr_left_blocks;
991  std::vector<bool> _trans_blocks_lookup;
992  size_t _rank;
993 
994  static u_int32_t const UNDEFINED;
995  };
996 
1012  template <typename TValueType, class TSubclass>
1014  : public ElementWithVectorDataDefaultHash<TValueType, TSubclass> {
1015  public:
1031  MatrixOverSemiringBase(std::vector<TValueType>* matrix,
1033  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(matrix),
1034  _degree(sqrt(matrix->size())),
1035  _semiring(semiring) {
1036  LIBSEMIGROUPS_ASSERT(semiring != nullptr);
1037  LIBSEMIGROUPS_ASSERT(!matrix->empty());
1038  LIBSEMIGROUPS_ASSERT(matrix->size() == _degree * _degree);
1039  }
1040 
1062  MatrixOverSemiringBase(std::vector<std::vector<TValueType>> const& matrix,
1064  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(),
1065  _degree(matrix[0].size()),
1066  _semiring(semiring) {
1067  LIBSEMIGROUPS_ASSERT(semiring != nullptr);
1068  LIBSEMIGROUPS_ASSERT(!matrix.empty());
1069  LIBSEMIGROUPS_ASSERT(all_of(
1070  matrix.begin(), matrix.end(), [matrix](std::vector<TValueType> row) {
1071  return row.size() == matrix.size();
1072  }));
1073 
1074  this->_vector->reserve(matrix.size() * matrix.size());
1075  for (auto const& row : matrix) {
1076  this->_vector->insert(this->_vector->end(), row.begin(), row.end());
1077  }
1078  }
1079 
1082  return _semiring;
1083  }
1084 
1089  size_t complexity() const override {
1090  return pow(this->degree(), 3);
1091  }
1092 
1097  size_t degree() const override {
1098  return _degree;
1099  }
1100 
1106  Element* identity() const override {
1107  std::vector<TValueType>* vec(new std::vector<TValueType>());
1108  vec->resize(this->_vector->size(), _semiring->zero());
1109  size_t n = this->degree();
1110  for (auto it = vec->begin(); it < vec->end(); it += n + 1) {
1111  (*it) = _semiring->one();
1112  }
1113  return new TSubclass(vec, _semiring);
1114  }
1115 
1120  Element* really_copy(size_t increase_deg_by = 0) const override {
1121  LIBSEMIGROUPS_ASSERT(increase_deg_by == 0);
1122  (void) increase_deg_by;
1123  MatrixOverSemiringBase* copy = static_cast<MatrixOverSemiringBase*>(
1125  TSubclass>::really_copy());
1126  LIBSEMIGROUPS_ASSERT(copy->_semiring == nullptr
1127  || copy->_semiring == this->_semiring);
1128  copy->_semiring = _semiring;
1129  return copy;
1130  }
1131 
1138  void redefine(Element const* x, Element const* y) override {
1139  auto xx = static_cast<MatrixOverSemiringBase const*>(x);
1140  auto yy = static_cast<MatrixOverSemiringBase const*>(y);
1141  LIBSEMIGROUPS_ASSERT(xx->degree() == yy->degree());
1142  LIBSEMIGROUPS_ASSERT(xx->degree() == this->degree());
1143  LIBSEMIGROUPS_ASSERT(xx != this && yy != this);
1144  // It can be that the elements are defined over semirings that are
1145  // distinct in memory but equal (for example, when one element comes
1146  // from a semigroup and another from an ideal of that semigroup).
1147  // LIBSEMIGROUPS_ASSERT(xx->semiring() == yy->semiring() &&
1148  // xx->semiring() == this->semiring());
1149  // TODO verify that x, y, and this are defined over the same semiring.
1150  size_t deg = this->degree();
1151 
1152  for (size_t i = 0; i < deg; i++) {
1153  for (size_t j = 0; j < deg; j++) {
1154  int64_t v = _semiring->zero();
1155  for (size_t k = 0; k < deg; k++) {
1156  v = _semiring->plus(
1157  v, _semiring->prod((*xx)[i * deg + k], (*yy)[k * deg + j]));
1158  }
1159  (*this->_vector)[i * deg + j] = v;
1160  }
1161  }
1162  after(); // post process this
1163  this->reset_hash_value();
1164  }
1165 
1166  protected:
1167  friend class ElementWithVectorData<TValueType, TSubclass>;
1171  explicit MatrixOverSemiringBase(std::vector<TValueType>* matrix)
1172  : ElementWithVectorDataDefaultHash<TValueType, TSubclass>(matrix),
1173  _degree(sqrt(matrix->size())),
1174  _semiring(nullptr) {}
1175 
1176  private:
1177  // A function applied after redefinition
1178  virtual inline void after() {}
1179  size_t _degree;
1180  Semiring<TValueType> const* _semiring;
1181  };
1182 
1189  template <typename TValueType>
1191  : public MatrixOverSemiringBase<TValueType,
1192  MatrixOverSemiring<TValueType>> {
1193  friend class ElementWithVectorData<TValueType,
1194  MatrixOverSemiring<TValueType>>;
1197  };
1198 
1209  : public MatrixOverSemiringBase<int64_t, ProjectiveMaxPlusMatrix> {
1210  public:
1218  ProjectiveMaxPlusMatrix(std::vector<int64_t>* matrix,
1219  Semiring<int64_t> const* semiring)
1220  : MatrixOverSemiringBase(matrix, semiring) {
1221  after(); // this is to put the matrix in normal form
1222  }
1223 
1231  ProjectiveMaxPlusMatrix(std::vector<std::vector<int64_t>> const& matrix,
1232  Semiring<int64_t> const* semiring)
1233  : MatrixOverSemiringBase(matrix, semiring) {
1234  after(); // this is to put the matrix in normal form
1235  }
1236 
1237  private:
1238  friend class ElementWithVectorData<int64_t, ProjectiveMaxPlusMatrix>;
1239  explicit ProjectiveMaxPlusMatrix(std::vector<int64_t>* matrix)
1240  : MatrixOverSemiringBase(matrix) {}
1241 
1242  // A function applied after redefinition
1243  inline void after() final {
1244  int64_t norm = *std::max_element(_vector->begin(), _vector->end());
1245  for (auto& x : *_vector) {
1246  if (x != LONG_MIN) {
1247  x -= norm;
1248  }
1249  }
1250  }
1251  };
1252 
1265  template <typename T> class Permutation : public Transformation<T> {
1266  public:
1273  size_t const n = this->_vector->size();
1274  Permutation* id = static_cast<Permutation<T>*>(this->identity());
1275  for (T i = 0; i < n; i++) {
1276  (*id->_vector)[(*this->_vector)[i]] = i;
1277  }
1278  return id;
1279  }
1280  };
1281 
1289  class BooleanMat : public MatrixOverSemiringBase<bool, BooleanMat> {
1290  public:
1301  explicit BooleanMat(std::vector<bool>* matrix)
1302  : MatrixOverSemiringBase<bool, BooleanMat>(matrix, _semiring) {}
1303 
1309  explicit BooleanMat(std::vector<std::vector<bool>> const& matrix)
1310  : MatrixOverSemiringBase<bool, BooleanMat>(matrix,
1311  BooleanMat::_semiring) {}
1312 
1317  void redefine(Element const* x, Element const* y) final;
1318 
1319  // There is a specialization of std::hash for std::vector<bool> but for
1320  // some reason it causes a dramatic slow down in some of the benchmarks if
1321  // it is used by cache_hash_value below. So, we leave this commented out as
1322  // a reminder not to use it.
1323 
1324  // protected:
1325  // void cache_hash_value() const override {
1326  // this->_hash_value = std::hash<std::vector<bool>>{}(*this->_vector);
1327  // }
1328 
1329  private:
1330  // The next constructor only exists to allow the identity method for
1331  // MatrixOverSemiringBase to work.
1332  friend class MatrixOverSemiringBase<bool, BooleanMat>;
1333  explicit BooleanMat(std::vector<bool>* matrix,
1334  Semiring<bool> const* semiring)
1335  : MatrixOverSemiringBase<bool, BooleanMat>(matrix, semiring) {}
1336 
1337  static BooleanSemiring const* const _semiring;
1338  };
1339 
1345  class PBR : public ElementWithVectorData<std::vector<u_int32_t>, PBR> {
1346  public:
1357 
1362  size_t complexity() const override;
1363 
1369  size_t degree() const override;
1370 
1377  Element* identity() const override;
1378 
1390  void redefine(Element const* x,
1391  Element const* y,
1392  size_t const& thread_id) override;
1393 
1394  protected:
1395  void cache_hash_value() const override;
1396 
1397  private:
1398  void unite_rows(RecVec<bool>& out,
1399  RecVec<bool>& tmp,
1400  size_t const& vertex1,
1401  size_t const& vertex2);
1402 
1403  void x_dfs(std::vector<bool>& x_seen,
1404  std::vector<bool>& y_seen,
1405  RecVec<bool>& tmp,
1406  u_int32_t const& n,
1407  u_int32_t const& i,
1408  PBR const* const x,
1409  PBR const* const y,
1410  size_t const& adj);
1411 
1412  void y_dfs(std::vector<bool>& x_seen,
1413  std::vector<bool>& y_seen,
1414  RecVec<bool>& tmp,
1415  u_int32_t const& n,
1416  u_int32_t const& i,
1417  PBR const* const x,
1418  PBR const* const y,
1419  size_t const& adj);
1420 
1421  static std::vector<std::vector<bool>> _x_seen;
1422  static std::vector<std::vector<bool>> _y_seen;
1423  static std::vector<RecVec<bool>> _out;
1424  static std::vector<RecVec<bool>> _tmp;
1425  };
1426 
1427  template <typename T> static inline void really_delete_cont(T cont) {
1428  for (Element const* x : cont) {
1429  const_cast<Element*>(x)->really_delete();
1430  delete x;
1431  }
1432  }
1433 
1434  template <typename T> static inline void really_delete_cont(T* cont) {
1435  for (Element const* x : *cont) {
1436  const_cast<Element*>(x)->really_delete();
1437  delete x;
1438  }
1439  delete cont;
1440  }
1441 } // namespace libsemigroups
1442 #endif // LIBSEMIGROUPS_SRC_ELEMENTS_H_
Class for bipartitions.
Definition: elements.h:814
-
virtual T prod(T x, T y) const =0
Returns the product of x and y.
-
Element(elm_t type=Element::elm_t::NOT_RWSE)
A constructor.
Definition: elements.h:63
-
size_t operator()(Element const *x) const
Returns the value of Element::hash_value applied to the Element pointed to by x.
Definition: elements.h:235
-
BooleanMat(std::vector< bool > *matrix)
A constructor.
Definition: elements.h:1301
-
Class for partitioned binary relations (PBR).
Definition: elements.h:1345
-
ElementWithVectorData()
A constructor.
Definition: elements.h:294
-
ProjectiveMaxPlusMatrix(std::vector< int64_t > *matrix, Semiring< int64_t > const *semiring)
A constructor.
Definition: elements.h:1218
-
virtual void redefine(Element const *x, Element const *y, size_t const &thread_id)
Multiplies x and y and stores the result in this.
Definition: elements.h:209
-
Matrices over a semiring.
Definition: elements.h:1190
-
virtual void swap(Element *x)=0
Swap another Element with this.
- -
static TValueType const UNDEFINED
Undefined image value.
Definition: elements.h:575
-
virtual size_t degree() const =0
Returns the degree of an Element.
-
MatrixOverSemiringBase(std::vector< TValueType > *matrix, Semiring< TValueType > const *semiring)
A constructor.
Definition: elements.h:1031
-
size_t degree() const override
Returns the degree of a PBR.
Definition: elements.cc:284
-
bool is_transverse_block(size_t index)
Returns true if the block with index index is transverse.
Definition: elements.cc:203
-
u_int32_t nr_left_blocks()
Returns the number of blocks containing a positive integer.
Definition: elements.cc:179
-
Matrices over the boolean semiring.
Definition: elements.h:1289
-
Class for signed partitions of the set .
Definition: blocks.h:45
-
std::vector< TValueType >::iterator cend() const
Returns a const iterator.
Definition: elements.h:437
-
bool operator<(Element const &that) const override
Returns true if this is less than that.
Definition: elements.h:346
-
size_t complexity() const override
Returns the approximate time complexity of multiplying two partial transformations.
Definition: elements.h:526
-
size_t degree() const override
Returns the degree of the bipartition.
Definition: elements.cc:71
-
MatrixOverSemiringBase(std::vector< TValueType > *matrix)
Constructs a MatrixOverSemiringBase with whose underlying semiring is not defined....
Definition: elements.h:1171
-
Bipartition(std::vector< u_int32_t > const &blocks)
A constructor.
Definition: elements.h:855
-
virtual void cache_hash_value() const =0
Calculate and cache a hash value.
-
MatrixOverSemiringBase(std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)
A constructor.
Definition: elements.h:1062
-
std::vector< TValueType >::iterator cbegin() const
Returns a const iterator.
Definition: elements.h:429
-
void redefine(Element const *x, Element const *y, size_t const &thread_id) override
Multiply x and y and stores the result in this.
Definition: elements.cc:88
-
Abstract base class for elements using a vector to store their defining data.
Definition: elements.h:289
-
Provides a call operator for comparing Elements via pointers.
Definition: elements.h:219
-
virtual void copy(Element const *x)=0
Copy another Element into this.
-
PartialPerm(std::vector< T > const &dom, std::vector< T > const &ran, size_t deg)
A constructor.
Definition: elements.h:686
-
Abstract base class for semigroup elements.
Definition: elements.h:44
-
Blocks * right_blocks()
Return the left blocks of a bipartition.
Definition: elements.cc:242
-
void redefine(Element const *x, Element const *y) override
Multiply x and y and stores the result in this.
Definition: elements.h:772
-
void set_nr_blocks(size_t nr_blocks)
Set the cached number of blocks.
Definition: elements.h:954
-
Template class for permutations.
Definition: elements.h:1265
-
Element * identity() const override
Returns the identity transformation with degrees of this.
Definition: elements.h:562
-
size_t complexity() const override
Returns the approximate time complexity of multiplying two matrices.
Definition: elements.h:1089
-
Element * identity() const override
Returns an identity bipartition.
Definition: elements.cc:76
-
Template class for partial permutations.
Definition: elements.h:674
-
Matrices over a semiring.
Definition: elements.h:1013
-
ElementWithVectorData(std::vector< TValueType > const &vector)
A constructor.
Definition: elements.h:313
-
ElementWithVectorData(std::vector< TValueType > *vector)
A constructor.
Definition: elements.h:304
-
Element * really_copy(size_t increase_deg_by=0) const override
Returns a pointer to a copy of this.
Definition: elements.h:1120
-
void redefine(Element const *x, Element const *y) override
Multiply x and y and stores the result in this.
Definition: elements.h:633
-
void reset_hash_value() const
Reset the cached value used by Element::hash_value.
Definition: elements.h:252
-
Type for Element objects not arising from a rewriting system RWS.
Definition: elements.h:56
-
u_int32_t const_nr_blocks() const
Returns the number of blocks in a bipartition.
Definition: elements.cc:162
-
Bipartition(std::vector< u_int32_t > *blocks)
A constructor.
Definition: elements.h:839
-
virtual T plus(T x, T y) const =0
Returns the sum of x and y.
-
void cache_hash_value() const override
This method is included because it seems to give superior performance in some benchmarks.
Definition: elements.h:649
-
u_int32_t nr_blocks()
Returns the number of blocks in a bipartition.
Definition: elements.cc:172
-
TValueType operator[](size_t pos) const
Returns the pos entry in the vector containing the defining data.
Definition: elements.h:321
-
void swap(Element *x) override
Swap another Element with this.
Definition: elements.h:397
-
ProjectiveMaxPlusMatrix(std::vector< std::vector< int64_t >> const &matrix, Semiring< int64_t > const *semiring)
A constructor.
Definition: elements.h:1231
-
void cache_hash_value() const override
Calculate and cache a hash value.
Definition: elements.cc:288
-
void cache_hash_value() const override
This method implements the default hash function for an ElementWithVectorData, which uses ElementWith...
Definition: elements.h:479
-
elm_t get_type() const
Returns the type libsemigroups::Element::elm_t of an Element object.
Definition: elements.h:73
-
Template class for transformations.
Definition: elements.h:602
-
Element * really_copy(size_t increase_deg_by=0) const override
Returns a pointer to a copy of this.
Definition: elements.h:751
-
bool operator()(Element const *x, Element const *y) const
Returns true if x and y point to equal Element's.
Definition: elements.h:221
-
Namespace for everything in the libsemigroups library.
Definition: blocks.cc:32
-
size_t hash_value() const
Return the hash value of an Element.
Definition: elements.h:123
-
bool operator<(const Element &that) const override
Returns true if this is less than that.
Definition: elements.h:707
-
size_t complexity() const override
Returns the approximate time complexity of multiplication.
Definition: elements.cc:67
-
void set_rank(size_t rank)
Set the cached rank.
Definition: elements.h:977
-
Permutation * inverse()
Returns the inverse of a permutation.
Definition: elements.h:1272
-
void copy(Element const *x) override
Copy another Element into this.
Definition: elements.h:382
-
elm_t
This enum contains some different types of Element.
Definition: elements.h:52
-
static size_t vector_hash(std::vector< T > const *vec)
Returns a hash value for a vector provided there is a specialization of std::hash for the template ty...
Definition: elements.h:447
-
Abstract base class for elements using a vector to store their defining data and the default hash fun...
Definition: elements.h:468
-
Element * identity() const override
Returns the identity PBR with degree equal to that of this.
Definition: elements.cc:295
-
virtual bool operator==(const Element &that) const =0
Returns true if this equals that.
-
size_t degree() const override
Returns the degree of a partial transformation.
Definition: elements.h:535
-
virtual void really_delete()=0
Deletes the defining data of an Element.
-
void set_nr_left_blocks(size_t nr_left_blocks)
Set the cached number of left blocks.
Definition: elements.h:966
-
Element * really_copy(size_t increase_deg_by=0) const override
Returns a pointer to a copy of this.
Definition: elements.h:612
-
void redefine(Element const *x, Element const *y) final
Multiplies x and y and stores the result in this.
Definition: elements.cc:36
-
static size_t const UNDEFINED
UNDEFINED value.
Definition: elements.h:261
-
void redefine(Element const *x, Element const *y, size_t const &thread_id) override
Multiply x and y and stores the result in this.
Definition: elements.cc:311
-
size_t crank() const
Returns the rank of a partial transformation.
Definition: elements.h:544
-
std::vector< TValueType >::iterator begin() const
Returns an iterator.
Definition: elements.h:413
-
size_t complexity() const override
Returns the approximate time complexity of multiplying PBRs.
Definition: elements.cc:280
-
std::vector< TValueType > * _vector
The vector containing the defining data of this.
Definition: elements.h:458
-
u_int32_t nr_right_blocks()
Returns the number of blocks containing a negative integer.
Definition: elements.cc:193
-
virtual ~Element()
A default destructor.
Definition: elements.h:70
-
virtual void redefine(Element const *x, Element const *y)
Multiplies x and y and stores the result in this.
Definition: elements.h:185
-
Element * identity() const override
Returns the identity matrix with dimension of this.
Definition: elements.h:1106
-
virtual Element * really_copy(size_t increase_deg_by=0) const =0
Returns a new element completely independent of this.
-
virtual bool operator<(const Element &that) const =0
Returns true if this is less than that.
-
Subclass of Element that wraps an libsemigroups::rws_word_t.
Definition: rwse.h:37
-
size_t crank() const
Returns the rank of a partial permutation.
Definition: elements.h:794
-
Blocks * left_blocks()
Return the left blocks of a bipartition.
Definition: elements.cc:231
-
BooleanMat(std::vector< std::vector< bool >> const &matrix)
A constructor.
Definition: elements.h:1309
-
virtual T zero() const =0
Returns the additive identity, or zero, of the semiring.
-
std::vector< TValueType >::iterator end() const
Returns an iterator.
Definition: elements.h:421
-
Element * really_copy(size_t increase_deg_by=0) const override
Returns a pointer to a copy of this.
Definition: elements.h:366
-
Abstract class for partial transformations.
Definition: elements.h:515
-
Semiring< TValueType > const * semiring() const
Returns a pointer to the Semiring over which the matrix is defined.
Definition: elements.h:1081
-
Provides a call operator returning a hash value for an Element via a pointer.
Definition: elements.h:232
-
size_t degree() const override
Returns the dimension of the matrix.
Definition: elements.h:1097
-
virtual Element * identity() const =0
Returns a new copy of the identity element.
-
Class for projective max-plus matrices.
Definition: elements.h:1208
-
virtual size_t complexity() const =0
Returns the approximate time complexity of multiplying two Element objects in a given subclass.
-
virtual T one() const =0
Returns the multiplicative identity, or one, of the semiring.
-
TValueType at(size_t pos) const
Returns the pos entry in the vector containing the defining data.
Definition: elements.h:329
-
Bipartition(size_t degree)
A constructor.
Definition: elements.h:821
-
size_t rank()
Returns the number of transverse blocks.
Definition: elements.cc:222
-
void really_delete() override
Deletes the defining data of an ElementWithVectorData.
Definition: elements.h:405
-
bool operator==(Element const &that) const override
Returns true if this equals that.
Definition: elements.h:337
-
void redefine(Element const *x, Element const *y) override
Multiply x and y and stores the result in this.
Definition: elements.h:1138
-
- - - - diff --git a/files.html b/files.html deleted file mode 100644 index e76e6cb15..000000000 --- a/files.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -libsemigroups: File List - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
-
[detail level 12]
- - - - - - - - - - - -
  src
 blocks.h
 cong.h
 elements.h
 libsemigroups-config.h
 libsemigroups-debug.h
 partition.h
 rws.h
 rwse.h
 semigroups.h
 semiring.h
-
-
- - - - diff --git a/folderclosed.png b/folderclosed.png deleted file mode 100644 index bb8ab35ed..000000000 Binary files a/folderclosed.png and /dev/null differ diff --git a/folderopen.png b/folderopen.png deleted file mode 100644 index d6c7f676a..000000000 Binary files a/folderopen.png and /dev/null differ diff --git a/forest_8hpp_source.html b/forest_8hpp_source.html deleted file mode 100644 index 709ceff76..000000000 --- a/forest_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/forest.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
forest.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 Finn Smith
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // TODO(FLS):
20 // 1. Doc
21 // 2. Code coverage
22 // 3. Assertions and exceptions
23 
24 #ifndef LIBSEMIGROUPS_INCLUDE_FOREST_HPP_
25 #define LIBSEMIGROUPS_INCLUDE_FOREST_HPP_
26 
27 #include <stddef.h> // for size_t
28 #include <vector> // for vector
29 
30 #include "constants.hpp"
31 
32 namespace libsemigroups {
33  class Forest {
34  public:
35  explicit Forest(size_t n = 0)
36  : _edge_label(n, static_cast<size_t>(UNDEFINED)),
37  _parent(n, static_cast<size_t>(UNDEFINED)) {}
38 
39  void add_nodes(size_t n) {
40  _edge_label.insert(_edge_label.cend(), n, static_cast<size_t>(UNDEFINED));
41  _parent.insert(_parent.cend(), n, static_cast<size_t>(UNDEFINED));
42  }
43 
44  void set(size_t node, size_t parent, size_t gen) noexcept {
45  // TODO(FLS): add assertions or exceptions
46  _parent[node] = parent;
47  _edge_label[node] = gen;
48  }
49 
50  size_t size() const noexcept {
51  return _parent.size();
52  }
53 
54  size_t parent(size_t i) const noexcept {
55  // TODO(FLS): add assertions or exceptions
56  return _parent[i];
57  }
58 
59  std::vector<size_t>::const_iterator cbegin_parent() const {
60  return _parent.cbegin();
61  }
62 
63  std::vector<size_t>::const_iterator cend_parent() const {
64  return _parent.cend();
65  }
66 
67  size_t label(size_t i) const noexcept {
68  // TODO(FLS): add assertions or exceptions
69  return _edge_label[i];
70  }
71 
72  void clear() {
73  _edge_label.clear();
74  _parent.clear();
75  }
76 
77  private:
78  std::vector<size_t> _edge_label;
79  std::vector<size_t> _parent;
80  };
81 } // namespace libsemigroups
82 
83 #endif // LIBSEMIGROUPS_INCLUDE_FOREST_HPP_
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/fpsemi-base_8hpp_source.html b/fpsemi-base_8hpp_source.html deleted file mode 100644 index d04dd7581..000000000 --- a/fpsemi-base_8hpp_source.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: include/fpsemi-base.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
fpsemi-base.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains a base class for f.p. semigroup like classes.
20 
21 // TODO(now)
22 // 1. FpSemiBase::make_confluent
23 // * if a knuth_bendix wins, then just replace _rules by the active rules
24 // of the knuth_bendix
25 // * if a ToddCoxeter wins, then use FroidurePin to produce a confluent
26 // set of rules.
27 
28 #ifndef LIBSEMIGROUPS_INCLUDE_FPSEMI_BASE_HPP_
29 #define LIBSEMIGROUPS_INCLUDE_FPSEMI_BASE_HPP_
30 
31 #include <stddef.h> // for size_t
32 #include <string> // for string
33 #include <unordered_map> // for unordered_map
34 #include <utility> // for pair
35 #include <vector> // for vector
36 
37 #include "owned_ptr.hpp" // for owned_ptr
38 #include "runner.hpp" // for Runner
39 #include "types.hpp" // for word_type, letter_type, relation_type
40 
41 namespace libsemigroups {
42  class FpSemigroup; // Forward declaration
43  class FroidurePinBase; // Forward declaration
44 
45  class FpSemiBase : public internal::Runner {
46  friend class FpSemigroup;
47 
48  public:
50  // FpSemiBase - constructor + destructor - public
52 
53  // FpSemiBase is non-copyable, and non-movable.
54  FpSemiBase(FpSemiBase const&) = delete;
55  FpSemiBase& operator=(FpSemiBase const&) = delete;
56  FpSemiBase(FpSemiBase&&) = delete;
57  FpSemiBase& operator=(FpSemiBase&&) = delete;
58 
59  FpSemiBase();
60  virtual ~FpSemiBase();
61 
63  // FpSemiBase - pure virtual methods - public
65 
66  // Pure methods (attributes of an f.p. semigroup)
67  virtual size_t size() = 0;
68 
69  // Pure methods (for elements of fp semigroups)
70  virtual bool equal_to(std::string const&, std::string const&) = 0;
71  virtual std::string normal_form(std::string const&) = 0;
72 
74  // FpSemiBase - non-pure virtual methods - public
76 
77  virtual bool equal_to(word_type const&, word_type const&);
78  virtual word_type normal_form(word_type const&);
79 
81  // FpSemiBase - non-virtual methods - public
83 
84  void set_alphabet(std::string const&);
85  void set_alphabet(size_t);
86  std::string const& alphabet() const noexcept;
87 
88  void add_rule(std::string const&, std::string const&);
89  void add_rule(word_type const&, word_type const&);
90  void add_rule(std::initializer_list<size_t>, std::initializer_list<size_t>);
91  void add_rule(relation_type rel);
92  void add_rule(std::pair<std::string, std::string>);
93 
94  void add_rules(FroidurePinBase&);
95  void add_rules(std::vector<std::pair<std::string, std::string>> const&);
96 
97  size_t nr_rules() const noexcept;
98 
99  bool has_froidure_pin() const noexcept;
100  FroidurePinBase& froidure_pin();
101 
102  word_type normal_form(std::initializer_list<letter_type>);
103 
104  bool equal_to(std::initializer_list<letter_type>,
105  std::initializer_list<letter_type>);
106 
107  // Set a char in alphabet() to be the identity.
108  void set_identity(std::string const&);
109  void set_identity(letter_type);
110 
113  std::string const& identity() const;
114 
115  void set_inverses(std::string const&);
116  std::string const& inverses() const;
117 
118  word_type string_to_word(std::string const&) const;
119  std::string word_to_string(word_type const&) const;
120 
121  using const_iterator
122  = std::vector<std::pair<std::string, std::string>>::const_iterator;
123  const_iterator cbegin_rules() const;
124  const_iterator cend_rules() const;
125 
126  bool is_obviously_finite();
127  bool is_obviously_infinite();
128 
129  std::string to_gap_string();
130 
131  protected:
133  // FpSemiBase - non-virtual methods - protected
135 
136  size_t char_to_uint(char) const;
137  char uint_to_char(size_t) const noexcept;
138 
139  bool validate_letter(char) const;
140  bool validate_letter(letter_type) const;
141 
142  void validate_word(std::string const&) const;
143  void validate_word(word_type const&) const;
144 
145  void validate_relation(std::string const&, std::string const&) const;
146  void validate_relation(std::pair<std::string, std::string> const&) const;
147  void validate_relation(relation_type const&) const;
148  void validate_relation(word_type const&, word_type const&) const;
149 
150  private:
152  // FpSemiBase - pure virtual methods - private
154 
155  virtual void add_rule_impl(std::string const&, std::string const&) = 0;
156  virtual internal::owned_ptr<FroidurePinBase> froidure_pin_impl() = 0;
157 
159  // FpSemiBase - non-pure virtual methods - private
161 
162  virtual void set_alphabet_impl(std::string const&);
163  virtual void set_alphabet_impl(size_t);
164  virtual void add_rule_impl(word_type const&, word_type const&);
165  virtual void add_rules_impl(FroidurePinBase&);
166  virtual bool is_obviously_infinite_impl();
167  virtual bool is_obviously_finite_impl();
168  // Use validate_word_impl to impose or lift any further restrictions on
169  // valid words, for example, ToddCoxeter does not allow empty words (and so
170  // neither does FpSemiBase), but KnuthBendix does.
171  virtual void validate_word_impl(std::string const&) const;
172  virtual void validate_word_impl(word_type const&) const;
173  // Returns true if we should add rules for the identity and false if not.
174  virtual bool validate_identity_impl(std::string const&) const;
175 
177  // FpSemiBase - non-virtual methods - private
179 
180  void reset() noexcept;
181  void set_is_obviously_infinite(bool) const;
182  void set_is_obviously_finite(bool) const;
183 
185  // FpSemiBase - non-mutable data - private
187 
188  std::string _alphabet;
189  std::unordered_map<char, letter_type> _alphabet_map;
190  bool _identity_defined;
191  std::string _identity;
192  std::string _inverses;
193  std::vector<std::pair<std::string, std::string>> _rules;
194 
196  // FpSemiBase - mutable data - private
198 
199  mutable internal::owned_ptr<FroidurePinBase> _froidure_pin;
200  mutable bool _is_obviously_finite;
201  mutable bool _is_obviously_infinite;
202  };
203 } // namespace libsemigroups
204 #endif // LIBSEMIGROUPS_INCLUDE_FPSEMI_BASE_HPP_
std::pair< word_type, word_type > relation_type
Type for a pair of word_type (a relation) of a semigroup.
Definition: types.hpp:56
-
Definition: kbe.hpp:198
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
size_t letter_type
Type for the index of a generator of a semigroup.
Definition: types.hpp:50
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/fpsemi_8hpp_source.html b/fpsemi_8hpp_source.html deleted file mode 100644 index 843b2962f..000000000 --- a/fpsemi_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/fpsemi.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
fpsemi.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains the declaration of a class for finitely presented
20 // semigroups.
21 
22 // TODO(now)
23 // 1. add FpSemigroup::add_method
24 // 2. FpSemigroup::policy -> enum class
25 
26 #ifndef LIBSEMIGROUPS_INCLUDE_FPSEMI_HPP_
27 #define LIBSEMIGROUPS_INCLUDE_FPSEMI_HPP_
28 
29 #include <stddef.h> // for size_t
30 
31 #include <string> // for string
32 
33 #include "fpsemi-base.hpp" // for FpSemiBase
34 #include "race.hpp" // for Race
35 #include "todd-coxeter.hpp" // for ToddCoxeter
36 
37 namespace libsemigroups {
38  class FroidurePinBase; // Forward declaration
39  namespace fpsemigroup {
40  class KnuthBendix; // Forward declaration
41  }
42 
43  // This is a class for defining fp semigroups.
44  class FpSemigroup : public FpSemiBase {
45  public:
46  // Execution policy:
47  // - standard: means run 1 variant of everything
48  // - none: means no methods are added, and at least one must be added
49  // manually via add_method
50  enum policy { standard = 0, none = 1 };
51 
53  // FpSemigroup - constructors - public
55 
56  explicit FpSemigroup(FpSemigroup::policy = standard);
57  explicit FpSemigroup(FroidurePinBase&);
58 
60  // Runner - pure virtual methods - public
62 
63  void run() override;
64 
66  // FpSemiBase - pure virtual methods - public
68 
69  using FpSemiBase::add_rule;
70 
71  bool equal_to(std::string const&, std::string const&) override;
72  bool is_obviously_finite();
73  bool is_obviously_infinite();
74  std::string normal_form(std::string const&) override;
75  size_t size() override;
76 
77  using FpSemiBase::equal_to;
78  using FpSemiBase::normal_form;
79 
81  // FpSemigroup - non-virtual methods - public
83 
84  bool has_knuth_bendix() const;
85  bool has_todd_coxeter() const;
86  fpsemigroup::KnuthBendix& knuth_bendix() const;
87  fpsemigroup::ToddCoxeter& todd_coxeter() const;
88 
89  private:
91  // FpSemiBase - pure virtual methods - private
93 
94  void add_rule_impl(std::string const&, std::string const&) override;
95  internal::owned_ptr<FroidurePinBase> froidure_pin_impl() override;
96 
98  // FpSemiBase - non-pure virtual methods - private
100 
101  void set_alphabet_impl(std::string const&) override;
102  void set_alphabet_impl(size_t) override;
103 
105  // FpSemigroup - methods - private
107 
108  template <class TFpSemigroupInterfaceSubclass>
109  TFpSemigroupInterfaceSubclass* find_method() const;
110 
112  // FpSemigroup - data - private
114 
115  internal::Race _race;
116  };
117 } // namespace libsemigroups
118 #endif // LIBSEMIGROUPS_INCLUDE_FPSEMI_HPP_
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/froidure-pin-base_8hpp_source.html b/froidure-pin-base_8hpp_source.html deleted file mode 100644 index e6b1beb96..000000000 --- a/froidure-pin-base_8hpp_source.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: include/froidure-pin-base.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
froidure-pin-base.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_BASE_HPP_
20 #define LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_BASE_HPP_
21 
22 #include <functional> // for function
23 #include <stddef.h> // for size_t
24 
25 #include "constants.hpp" // for LIMIT_MAX
26 #include "runner.hpp" // for Runner
27 #include "types.hpp" // for word_type, letter_type
28 
29 namespace libsemigroups {
30  class FroidurePinBase : public internal::Runner {
31  public:
36  using size_type = size_t;
37 
41  using element_index_type = size_type;
42 
43  virtual ~FroidurePinBase() {}
44 
45  virtual size_t batch_size() const = 0;
46  virtual size_t concurrency_threshold() const = 0;
47  virtual size_t max_threads() const = 0;
48 
49  virtual void set_batch_size(size_t) = 0;
50  virtual void set_concurrency_threshold(size_t) = 0;
51  virtual void set_max_threads(size_t) = 0;
52 
53  virtual element_index_type word_to_pos(word_type const&) const = 0;
54  virtual bool equal_to(word_type const&, word_type const&) const = 0;
55  virtual size_t current_max_word_length() const = 0;
56  virtual size_t degree() const = 0;
57  virtual size_t nr_generators() const = 0;
58  virtual size_t current_size() const = 0;
59  virtual size_t current_nr_rules() const = 0;
60  virtual element_index_type prefix(element_index_type) const = 0;
61  virtual element_index_type suffix(element_index_type) const = 0;
62  virtual letter_type first_letter(element_index_type) const = 0;
63  virtual letter_type final_letter(element_index_type) const = 0;
64  virtual size_t length_const(element_index_type) const = 0;
65  virtual size_t length_non_const(element_index_type) = 0;
66 
67  virtual element_index_type product_by_reduction(element_index_type,
68  element_index_type) const =
69  0;
70  virtual element_index_type fast_product(element_index_type,
71  element_index_type) const = 0;
72  virtual element_index_type letter_to_pos(letter_type) const = 0;
73  virtual size_t size() = 0;
74  virtual size_t nr_idempotents() = 0;
75  virtual bool is_idempotent(element_index_type) = 0;
76  virtual bool is_monoid() = 0;
77  virtual size_t nr_rules() = 0;
78  virtual void reserve(size_t) = 0;
79  virtual element_index_type position_to_sorted_position(element_index_type)
80  = 0;
81  virtual element_index_type right(element_index_type, letter_type) = 0;
82  virtual element_index_type left(element_index_type, letter_type) = 0;
83  virtual void minimal_factorisation(word_type&, element_index_type) = 0;
84  virtual word_type minimal_factorisation(element_index_type) = 0;
85  virtual void factorisation(word_type&, element_index_type) = 0;
86  virtual word_type factorisation(element_index_type) = 0;
87  virtual void reset_next_relation() = 0;
88  virtual void next_relation(word_type&) = 0;
89  virtual void enumerate(size_t = LIMIT_MAX) = 0;
90  };
91  void relations(FroidurePinBase&, std::function<void(word_type, word_type)>&&);
92 } // namespace libsemigroups
93 #endif // LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_BASE_HPP_
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
size_t letter_type
Type for the index of a generator of a semigroup.
Definition: types.hpp:50
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/froidure-pin-impl_8hpp_source.html b/froidure-pin-impl_8hpp_source.html deleted file mode 100644 index bc7d88afe..000000000 --- a/froidure-pin-impl_8hpp_source.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: include/froidure-pin-impl.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
froidure-pin-impl.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains implementations of the methods for the FroidurePin class.
20 
21 // TODO(now): double check "noexcept" usage!
22 // TODO(later): make const member functions thread-safe
23 
24 #ifndef LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_IMPL_HPP_
25 #define LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_IMPL_HPP_
26 
27 #define TEMPLATE \
28  template <typename TElementType, \
29  typename TElementHash, \
30  typename TElementEqual, \
31  class TTraits>
32 #define FROIDURE_PIN \
33  FroidurePin<TElementType, TElementHash, TElementEqual, TTraits>
34 
35 #define VOID TEMPLATE void
36 #define INLINE_VOID TEMPLATE inline void
37 #define SIZE_T TEMPLATE size_t
38 #define BOOL TEMPLATE bool
39 #define ELEMENT_INDEX_TYPE TEMPLATE element_index_type
40 #define LETTER_TYPE TEMPLATE letter_type
41 #define CONST_REFERENCE TEMPLATE typename FROIDURE_PIN::const_reference
42 #define ELEMENT_TYPE TEMPLATE typename FROIDURE_PIN::element_type
43 #define WORD_TYPE TEMPLATE word_type
44 
45 namespace libsemigroups {
47  // FroidurePin - settings - public
49 
50  TEMPLATE FROIDURE_PIN::Settings::Settings()
51  : _batch_size(8192),
52  _concurrency_threshold(823543),
53  _max_threads(std::thread::hardware_concurrency()) {}
54 
55  VOID FROIDURE_PIN::set_max_threads(size_t nr_threads) noexcept {
56  // TODO check noexcept is ok
57  unsigned int n
58  = static_cast<unsigned int>(nr_threads == 0 ? 1 : nr_threads);
59  _settings._max_threads = std::min(n, std::thread::hardware_concurrency());
60  }
61 
62  SIZE_T FROIDURE_PIN::max_threads() const noexcept {
63  return _settings._max_threads;
64  }
65 
66  VOID FROIDURE_PIN::set_batch_size(size_t batch_size) noexcept {
67  _settings._batch_size = batch_size;
68  }
69 
70  SIZE_T FROIDURE_PIN::batch_size() const noexcept {
71  return _settings._batch_size;
72  }
73 
74  VOID FROIDURE_PIN::set_concurrency_threshold(size_t thrshld) noexcept {
75  _settings._concurrency_threshold = thrshld;
76  }
77 
78  SIZE_T FROIDURE_PIN::concurrency_threshold() const noexcept {
79  return _settings._concurrency_threshold;
80  }
81 
82  // using enumerate_index_type = FroidurePinBase::size_type;
83  using element_index_type = FroidurePinBase::element_index_type;
84 
86  // FroidurePin - constructors + destructor - public
88 
89  TEMPLATE
90  FROIDURE_PIN::FroidurePin(std::vector<element_type> const* gens)
91  : _degree(UNDEFINED),
92  _duplicate_gens(),
93  _elements(),
94  _enumerate_order(),
95  _final(),
96  _first(),
97  _found_one(false),
98  _gens(),
99  _id(),
100  _idempotents(),
101  _idempotents_found(false),
102  _is_idempotent(),
103  _left(gens->size()),
104  _length(),
105  _lenindex(),
106  _letter_to_pos(),
107  _map(),
108  _nr(0),
109  _nrgens(gens->size()),
110  _nr_rules(0),
111  _pos(0),
112  _pos_one(0),
113  _prefix(),
114  _reduced(gens->size()),
115  _relation_gen(0),
116  _relation_pos(UNDEFINED),
117  _right(gens->size()),
118  _sorted(),
119  _suffix(),
120  _tmp_product(),
121  _wordlen(0) { // (length of the current word) - 1
122  if (_nrgens == 0) {
123  LIBSEMIGROUPS_EXCEPTION("no generators given");
124  }
125 #ifdef LIBSEMIGROUPS_STATS
126  _nr_products = 0;
127 #endif
128  _right.set_default_value(UNDEFINED);
129  // FIXME inclusion of the next line makes test FroidurePin of BMats 01
130  // extremely slow (~50ms to ~10s!!!!)
131  // reserve(_nrgens);
132  _degree = internal_degree()(this->to_internal_const((*gens)[0]));
133 
134  for (size_t i = 0; i < _nrgens; ++i) {
135  size_t degree = internal_degree()(this->to_internal_const((*gens)[i]));
136  if (degree != _degree) {
137  LIBSEMIGROUPS_EXCEPTION("generator " + internal::to_string(i)
138  + " has degree " + internal::to_string(degree)
139  + " but should have degree "
140  + internal::to_string(_degree));
141  }
142  }
143  for (const_reference x : *gens) {
144  _gens.push_back(this->internal_copy(this->to_internal_const(x)));
145  }
146 
147  _tmp_product = one()(_gens[0]);
148  _id = one()(_gens[0]);
149  _lenindex.push_back(0);
150 
151 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
152  _map.set_empty_key(this->empty_key(_id));
153 #endif
154 
155  // add the generators
156  for (letter_type i = 0; i < _nrgens; i++) {
157  auto it = _map.find(_gens[i]);
158  if (it != _map.end()) { // duplicate generator
159  _letter_to_pos.push_back(it->second);
160  _nr_rules++;
161  _duplicate_gens.emplace_back(i, _first[it->second]);
162  // i.e. _gens[i] = _gens[_first[it->second]]
163  // _first maps from element_index_type -> letter_type :)
164  } else {
165  is_one(_gens[i], _nr);
166  _elements.push_back(_gens[i]);
167  // Note that every non-duplicate generator is *really* stored in
168  // _elements, and so must be deleted from _elements but not _gens.
169  _first.push_back(i);
170  _final.push_back(i);
171  _enumerate_order.push_back(_nr);
172  _letter_to_pos.push_back(_nr);
173  _length.push_back(1);
174  _map.emplace(_elements.back(), _nr);
175  _prefix.push_back(UNDEFINED);
176  // TODO _prefix.push_back(_nr) and get rid of _letter_to_pos, and
177  // the extra clause in the enumerate method!
178  _suffix.push_back(UNDEFINED);
179  _nr++;
180  }
181  }
182  expand(_nr);
183  _lenindex.push_back(_enumerate_order.size());
184  }
185 
186  TEMPLATE
187  FROIDURE_PIN::FroidurePin(std::vector<element_type> const& gens)
188  : FroidurePin(&gens) {}
189 
190  TEMPLATE
191  FROIDURE_PIN::FroidurePin(std::initializer_list<element_type> gens)
192  : FroidurePin(std::vector<element_type>(gens)) {}
193 
194  TEMPLATE
195  FROIDURE_PIN::FroidurePin(FroidurePin const& S)
196  : _settings(S._settings),
197  _degree(S._degree),
198  _duplicate_gens(S._duplicate_gens),
199  _elements(),
200  _enumerate_order(S._enumerate_order),
201  _final(S._final),
202  _first(S._first),
203  _found_one(S._found_one),
204  _gens(),
205  _id(this->internal_copy(S._id)),
206  _idempotents(S._idempotents),
207  _idempotents_found(S._idempotents_found),
208  _is_idempotent(S._is_idempotent),
209  _left(S._left),
210  _length(S._length),
211  _lenindex(S._lenindex),
212  _letter_to_pos(S._letter_to_pos),
213  _nr(S._nr),
214  _nrgens(S._nrgens),
215  _nr_rules(S._nr_rules),
216  _pos(S._pos),
217  _pos_one(S._pos_one),
218  _prefix(S._prefix),
219  _reduced(S._reduced),
220  _relation_gen(S._relation_gen),
221  _relation_pos(S._relation_pos),
222  _right(S._right),
223  _sorted(), // TODO S this if set
224  _suffix(S._suffix),
225  _wordlen(S._wordlen) {
226 #ifdef LIBSEMIGROUPS_STATS
227  _nr_products = 0;
228 #endif
229  _elements.reserve(_nr);
230 
231 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
232  _map.set_empty_key(this->empty_key(_id));
233  _map.resize(_nr);
234 #else
235  _map.reserve(_nr);
236 #endif
237  _tmp_product = this->internal_copy(S._id);
238 
239  element_index_type i = 0;
240  for (internal_const_reference x : S._elements) {
241  auto y = this->internal_copy(x);
242  _elements.push_back(y);
243  _map.emplace(y, i++);
244  }
245  copy_gens();
246  }
247 
248  TEMPLATE
249  FROIDURE_PIN::~FroidurePin() {
250  this->internal_free(_tmp_product);
251  this->internal_free(_id);
252 
253  // delete those generators not in _elements, i.e. the duplicate ones
254  for (auto& x : _duplicate_gens) {
255  this->internal_free(_gens[x.first]);
256  }
257  for (auto& x : _elements) {
258  this->internal_free(x);
259  }
260  }
261 
263  // FroidurePin - constructor - private
265 
266  // Partial copy.
267  // \p copy a semigroup
268  // \p coll a collection of additional generators
269  //
270  // This is a constructor for a semigroup generated by the generators of the
271  // FroidurePin copy and the (possibly) additional generators coll.
272  //
273  // The relevant parts of the data structure of copy are copied and
274  // \c this will be corrupt unless add_generators or closure is called
275  // subsequently. This is why this method is private.
276  //
277  // The same effect can be obtained by copying copy using the copy
278  // constructor and then calling add_generators or closure. However,
279  // this constructor avoids copying those parts of the data structure of
280  // copy that add_generators invalidates anyway. If copy has not been
281  // enumerated at all, then these two routes for adding more generators are
282  // equivalent.
283  //
284  // <add_generators> or <closure> should usually be called after this.
285  TEMPLATE
286  FROIDURE_PIN::FroidurePin(FroidurePin const& S,
287  std::vector<element_type> const* coll)
288  : _settings(S._settings),
289  _degree(S._degree), // copy for comparison in add_generators
290  _duplicate_gens(S._duplicate_gens),
291  _elements(),
292  _found_one(S._found_one), // copy in case degree doesn't change in
293  // add_generators
294  _gens(),
295  _idempotents(S._idempotents),
296  _idempotents_found(S._idempotents_found),
297  _is_idempotent(S._is_idempotent),
298  _left(S._left),
299  _letter_to_pos(S._letter_to_pos),
300  _nr(S._nr),
301  _nrgens(S._nrgens),
302  _nr_rules(0),
303  _pos(S._pos),
304  _pos_one(S._pos_one), // copy in case degree doesn't change in
305  // add_generators
306  _reduced(S._reduced),
307  _relation_gen(0),
308  _relation_pos(UNDEFINED),
309  _right(S._right),
310  _sorted(),
311  _wordlen(0) {
312  LIBSEMIGROUPS_ASSERT(!coll->empty());
313  LIBSEMIGROUPS_ASSERT(internal_degree()(coll->at(0)) >= S.degree());
314 
315 #ifdef LIBSEMIGROUPS_DEBUG
316  for (const_reference x : *coll) {
317  LIBSEMIGROUPS_ASSERT(internal_degree()(x)
318  == internal_degree()((*coll)[0]));
319  }
320 #endif
321 #ifdef LIBSEMIGROUPS_STATS
322  _nr_products = 0;
323 #endif
324  _elements.reserve(S._nr);
325 
326  // the following are required for assignment to specific positions in
327  // add_generators
328  _final.resize(S._nr, 0);
329  _first.resize(S._nr, 0);
330  _length.resize(S._nr, 0);
331  _prefix.resize(S._nr, 0);
332  _suffix.resize(S._nr, 0);
333 
334  size_t deg_plus = internal_degree()(coll->at(0)) - S.degree();
335 
336  if (deg_plus != 0) {
337  _degree += deg_plus;
338  _found_one = false;
339  _pos_one = 0;
340  }
341 
342  _lenindex.push_back(0);
343  _lenindex.push_back(S._lenindex[1]);
344  _enumerate_order.reserve(S._nr);
345 
346  // add the distinct old generators to new _enumerate_order
347  for (enumerate_index_type i = 0; i < S._lenindex[1]; i++) {
348  _enumerate_order.push_back(S._enumerate_order[i]);
349  _final[_enumerate_order[i]] = S._final[S._enumerate_order[i]];
350  _first[_enumerate_order[i]] = S._first[S._enumerate_order[i]];
351  _prefix[_enumerate_order[i]] = UNDEFINED;
352  _suffix[_enumerate_order[i]] = UNDEFINED;
353  _length[_enumerate_order[i]] = 1;
354  }
355 
356  _id = one()(this->to_internal(coll->at(0)));
357  _tmp_product = this->internal_copy(_id);
358 
359 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
360  _map.set_empty_key(this->empty_key(_id));
361  _map.resize(S._nr);
362 #else
363  _map.reserve(S._nr);
364 #endif
365 
366  element_index_type i = 0;
367  for (internal_const_reference x : S._elements) {
368  auto y = this->internal_copy(x);
369  increase_degree_by()(y, deg_plus);
370  _elements.push_back(y);
371  _map.emplace(y, i);
372  is_one(y, i++);
373  }
374  copy_gens(); // copy the old generators
375  // Now this is ready to have add_generators or closure called on it
376  }
377 
379  // FroidurePin - methods - public
381 
382  ELEMENT_INDEX_TYPE FROIDURE_PIN::word_to_pos(word_type const& w) const {
383  // w is a word in the generators (i.e. a vector of letter_type's)
384  if (w.size() == 0) {
385  LIBSEMIGROUPS_EXCEPTION("the given word has length 0");
386  }
387  for (auto x : w) {
388  validate_letter_index(x);
389  }
390  element_index_type out = _letter_to_pos[w[0]];
391  for (auto it = w.cbegin() + 1; it < w.cend() && out != UNDEFINED; ++it) {
392  out = _right.get(out, _letter_to_pos[*it]);
393  }
394  return out;
395  }
396 
397  ELEMENT_TYPE FROIDURE_PIN::word_to_element(word_type const& w) const {
398  element_index_type pos = word_to_pos(w);
399  if (pos != UNDEFINED) {
400  // Return a copy
401  return this->external_copy(_elements[pos]);
402  }
403  // word_to_pos is always known for generators (i.e. when w.size() == 1),
404  // and word_to_pos verifies that w is valid.
405  LIBSEMIGROUPS_ASSERT(w.size() > 1);
406  LIBSEMIGROUPS_ASSERT(w[0] < nr_generators() && w[1] < nr_generators());
407  element_type prod = this->external_copy(_tmp_product);
408  product()(this->to_internal(prod), _gens[w[0]], _gens[w[1]]);
409  for (auto it = w.begin() + 2; it < w.end(); ++it) {
410  LIBSEMIGROUPS_ASSERT(*it < nr_generators());
411  swap()(_tmp_product, this->to_internal(prod));
412  product()(this->to_internal(prod), _tmp_product, _gens[*it]);
413  }
414  return prod;
415  }
416 
417  BOOL FROIDURE_PIN::equal_to(word_type const& u, word_type const& v) const {
418  element_index_type u_pos = word_to_pos(u); // validates u
419  element_index_type v_pos = word_to_pos(v); // validates v
420  if (finished() || (u_pos != UNDEFINED && v_pos != UNDEFINED)) {
421  LIBSEMIGROUPS_ASSERT(u_pos != UNDEFINED);
422  LIBSEMIGROUPS_ASSERT(v_pos != UNDEFINED);
423  return u_pos == v_pos;
424  } else {
425  element_type uu = word_to_element(u);
426  element_type vv = word_to_element(v);
427  auto res = (uu == vv);
428  this->external_free(uu);
429  this->external_free(vv);
430  return res;
431  }
432  }
433 
434  SIZE_T FROIDURE_PIN::current_max_word_length() const noexcept {
435  if (finished()) {
436  return _lenindex.size() - 2;
437  } else if (_nr > _lenindex.back()) {
438  return _lenindex.size();
439  } else {
440  return _lenindex.size() - 1;
441  }
442  }
443 
444  SIZE_T FROIDURE_PIN::degree() const noexcept {
445  return _degree;
446  }
447 
448  SIZE_T FROIDURE_PIN::nr_generators() const noexcept {
449  return _gens.size();
450  }
451 
452  CONST_REFERENCE FROIDURE_PIN::generator(letter_type pos) const {
453  validate_letter_index(pos);
454  return this->to_external_const(_gens[pos]);
455  }
456 
457  BOOL FROIDURE_PIN::finished_impl() const {
458  return (_pos >= _nr);
459  }
460 
461  BOOL FROIDURE_PIN::started_impl() const noexcept {
462  LIBSEMIGROUPS_ASSERT(_lenindex.size() > 1);
463  return (_pos >= _lenindex[1]);
464  }
465 
466  ELEMENT_INDEX_TYPE FROIDURE_PIN::current_position(const_reference x) const {
467  if (internal_degree()(this->to_internal_const(x)) != _degree) {
468  return UNDEFINED;
469  }
470 
471  auto it = _map.find(this->to_internal_const(x));
472  return (it == _map.end() ? UNDEFINED : it->second);
473  }
474 
475  SIZE_T FROIDURE_PIN::current_size() const noexcept {
476  return _elements.size();
477  }
478 
479  SIZE_T FROIDURE_PIN::current_nr_rules() const noexcept {
480  return _nr_rules;
481  }
482 
483  ELEMENT_INDEX_TYPE
484  FROIDURE_PIN::prefix(element_index_type pos) const {
485  validate_element_index(pos);
486  return _prefix[pos];
487  }
488 
489  ELEMENT_INDEX_TYPE
490  FROIDURE_PIN::suffix(element_index_type pos) const {
491  validate_element_index(pos);
492  return _suffix[pos];
493  }
494 
495  LETTER_TYPE
496  FROIDURE_PIN::first_letter(element_index_type pos) const {
497  validate_element_index(pos);
498  return _first[pos];
499  }
500 
501  LETTER_TYPE
502  FROIDURE_PIN::final_letter(element_index_type pos) const {
503  validate_element_index(pos);
504  return _final[pos];
505  }
506 
507  SIZE_T FROIDURE_PIN::length_const(element_index_type pos) const {
508  validate_element_index(pos);
509  return _length[pos];
510  }
511 
512  SIZE_T FROIDURE_PIN::length_non_const(element_index_type pos) {
513  if (pos >= _nr) {
514  enumerate();
515  }
516  return length_const(pos);
517  }
518 
519  ELEMENT_INDEX_TYPE
520  FROIDURE_PIN::product_by_reduction(element_index_type i,
521  element_index_type j) const {
522  validate_element_index(i);
523  validate_element_index(j);
524 
525  if (length_const(i) <= length_const(j)) {
526  while (i != UNDEFINED) {
527  j = _left.get(j, _final[i]);
528  i = _prefix[i];
529  }
530  return j;
531  } else {
532  while (j != UNDEFINED) {
533  i = _right.get(i, _first[j]);
534  j = _suffix[j];
535  }
536  return i;
537  }
538  }
539 
540  ELEMENT_INDEX_TYPE
541  FROIDURE_PIN::fast_product(element_index_type i, element_index_type j) const {
542  validate_element_index(i);
543  validate_element_index(j);
544  if (length_const(i) < 2 * complexity()(_tmp_product)
545  || length_const(j) < 2 * complexity()(_tmp_product)) {
546  return product_by_reduction(i, j);
547  } else {
548  product()(_tmp_product, _elements[i], _elements[j]);
549  return _map.find(_tmp_product)->second;
550  }
551  }
552 
553  ELEMENT_INDEX_TYPE FROIDURE_PIN::letter_to_pos(letter_type i) const {
554  validate_letter_index(i);
555  return _letter_to_pos[i];
556  }
557 
558  SIZE_T FROIDURE_PIN::nr_idempotents() {
559  init_idempotents();
560  return _idempotents.size();
561  }
562 
563  BOOL FROIDURE_PIN::is_idempotent(element_index_type pos) {
564  validate_element_index(pos);
565  init_idempotents();
566  return _is_idempotent[pos];
567  }
568 
569  SIZE_T FROIDURE_PIN::nr_rules() {
570  enumerate();
571  return _nr_rules;
572  }
573 
574  VOID FROIDURE_PIN::reserve(size_t n) {
575  // Since the FroidurePin we are enumerating is bounded in size by the
576  // maximum value of an element_index_t, we cast the argument here to this
577  // integer type.
578  element_index_type nn = static_cast<element_index_type>(n);
579  _elements.reserve(nn);
580  _final.reserve(nn);
581  _first.reserve(nn);
582  _enumerate_order.reserve(nn);
583  _left.reserve(nn);
584  _length.reserve(nn);
585 
586 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
587  _map.resize(nn);
588 #else
589  _map.reserve(nn);
590 #endif
591 
592  _prefix.reserve(nn);
593  _reduced.reserve(nn);
594  _right.reserve(nn);
595  _suffix.reserve(nn);
596  }
597 
598  SIZE_T FROIDURE_PIN::size() {
599  enumerate();
600  return _elements.size();
601  }
602 
603  BOOL FROIDURE_PIN::contains(const_reference x) {
604  return (position(x) != UNDEFINED);
605  }
606 
607  ELEMENT_INDEX_TYPE FROIDURE_PIN::position(const_reference x) {
608  if (internal_degree()(this->to_internal_const(x)) != _degree) {
609  return UNDEFINED;
610  }
611 
612  while (true) {
613  auto it = _map.find(this->to_internal_const(x));
614  if (it != _map.end()) {
615  return it->second;
616  }
617  if (finished()) {
618  return UNDEFINED;
619  }
620  enumerate(_nr + 1);
621  // _nr + 1 means we enumerate batch_size() more elements
622  }
623  }
624 
625  ELEMENT_INDEX_TYPE FROIDURE_PIN::sorted_position(const_reference x) {
626  return position_to_sorted_position(position(x));
627  }
628 
629  ELEMENT_INDEX_TYPE
630  FROIDURE_PIN::position_to_sorted_position(element_index_type pos) {
631  enumerate(LIMIT_MAX);
632  if (pos >= _nr) {
633  return UNDEFINED;
634  }
635  init_sorted();
636  return _sorted[pos].second;
637  }
638 
639  CONST_REFERENCE FROIDURE_PIN::at(element_index_type pos) {
640  enumerate(pos + 1);
641  return this->to_external_const(_elements.at(pos));
642  }
643 
644  CONST_REFERENCE FROIDURE_PIN::operator[](element_index_type pos) const {
645  LIBSEMIGROUPS_ASSERT(pos < _elements.size());
646  return this->to_external_const(_elements[pos]);
647  }
648 
649  CONST_REFERENCE FROIDURE_PIN::sorted_at(element_index_type pos) {
650  init_sorted();
651  return this->to_external_const(_sorted.at(pos).first);
652  }
653 
654  ELEMENT_INDEX_TYPE FROIDURE_PIN::right(element_index_type i, letter_type j) {
655  enumerate();
656  return _right.get(i, j);
657  }
658 
659  ELEMENT_INDEX_TYPE FROIDURE_PIN::left(element_index_type i, letter_type j) {
660  enumerate();
661  return _left.get(i, j);
662  }
663 
664  VOID FROIDURE_PIN::minimal_factorisation(word_type& word,
665  element_index_type pos) {
666  if (pos >= _nr && !finished()) {
667  enumerate(pos + 1);
668  }
669  validate_element_index(pos);
670  word.clear();
671  while (pos != UNDEFINED) {
672  word.push_back(_first[pos]);
673  pos = _suffix[pos];
674  }
675  }
676 
677  WORD_TYPE
678  FROIDURE_PIN::minimal_factorisation(element_index_type pos) {
679  word_type word;
680  minimal_factorisation(word, pos);
681  return word;
682  }
683 
684  WORD_TYPE FROIDURE_PIN::minimal_factorisation(const_reference x) {
685  element_index_type pos = this->position(x);
686  if (pos == UNDEFINED) {
687  LIBSEMIGROUPS_EXCEPTION(
688  "the argument is not an element of the semigroup");
689  }
690  return minimal_factorisation(pos);
691  }
692 
693  VOID FROIDURE_PIN::factorisation(word_type& word, element_index_type pos) {
694  minimal_factorisation(word, pos);
695  }
696 
697  WORD_TYPE FROIDURE_PIN::factorisation(element_index_type pos) {
698  return minimal_factorisation(pos);
699  }
700 
701  WORD_TYPE FROIDURE_PIN::factorisation(const_reference x) {
702  return minimal_factorisation(x);
703  }
704 
705  VOID FROIDURE_PIN::reset_next_relation() noexcept {
706  _relation_pos = UNDEFINED;
707  _relation_gen = 0;
708  }
709 
710  VOID FROIDURE_PIN::next_relation(word_type& relation) {
711  if (!finished()) {
712  enumerate();
713  }
714 
715  relation.clear();
716 
717  if (_relation_pos == _nr) { // no more relations
718  return;
719  }
720 
721  if (_relation_pos != UNDEFINED) {
722  while (_relation_pos < _nr) {
723  while (_relation_gen < _nrgens) {
724  if (!_reduced.get(_enumerate_order[_relation_pos], _relation_gen)
725  && (_relation_pos < _lenindex[1]
726  || _reduced.get(_suffix[_enumerate_order[_relation_pos]],
727  _relation_gen))) {
728  relation.push_back(_enumerate_order[_relation_pos]);
729  relation.push_back(_relation_gen);
730  relation.push_back(
731  _right.get(_enumerate_order[_relation_pos], _relation_gen));
732  break;
733  }
734  _relation_gen++;
735  }
736  if (_relation_gen == _nrgens) { // then relation is empty
737  _relation_gen = 0;
738  _relation_pos++;
739  } else {
740  break;
741  }
742  }
743  _relation_gen++;
744  } else {
745  // duplicate generators
746  if (_relation_gen < _duplicate_gens.size()) {
747  relation.push_back(_duplicate_gens[_relation_gen].first);
748  relation.push_back(_duplicate_gens[_relation_gen].second);
749  _relation_gen++;
750  } else {
751  _relation_gen = 0;
752  _relation_pos++;
753  next_relation(relation);
754  }
755  }
756  }
757 
758  VOID FROIDURE_PIN::enumerate(size_t limit64) {
759  run(limit64);
760  }
761 
762  VOID FROIDURE_PIN::run() {
763  run(LIMIT_MAX);
764  }
765 
766  VOID FROIDURE_PIN::run(size_t limit64) {
767  std::lock_guard<std::mutex> lg(_mtx);
768  if (_pos >= _nr || limit64 <= _nr || stopped()) {
769  return;
770  }
771  // Ensure that limit isn't too big
772  size_type limit = static_cast<size_type>(limit64);
773 
774  if (LIMIT_MAX - batch_size() > _nr) {
775  limit = std::max(limit, _nr + batch_size());
776  } else { // batch_size() is very big for some reason
777  limit = batch_size();
778  }
779 
780  REPORT("limit = ", limit);
781  internal::Timer timer;
782  size_t tid = REPORTER.thread_id(std::this_thread::get_id());
783 
784  // product the generators by every generator
785  if (_pos < _lenindex[1]) {
786  size_type nr_shorter_elements = _nr;
787  while (_pos < _lenindex[1]) {
788  element_index_type i = _enumerate_order[_pos];
789  for (letter_type j = 0; j != _nrgens; ++j) {
790  product()(_tmp_product, _elements[i], _gens[j], tid);
791 #ifdef LIBSEMIGROUPS_STATS
792  _nr_products++;
793 #endif
794  auto it = _map.find(_tmp_product);
795 
796  if (it != _map.end()) {
797  _right.set(i, j, it->second);
798  _nr_rules++;
799  } else {
800  is_one(_tmp_product, _nr);
801  _elements.push_back(this->internal_copy(_tmp_product));
802  _first.push_back(_first[i]);
803  _final.push_back(j);
804  _enumerate_order.push_back(_nr);
805  _length.push_back(2);
806  _map.emplace(_elements.back(), _nr);
807  _prefix.push_back(i);
808  _reduced.set(i, j, true);
809  _right.set(i, j, _nr);
810  _suffix.push_back(_letter_to_pos[j]);
811  _nr++;
812  }
813  }
814  _pos++;
815  }
816  for (enumerate_index_type i = 0; i != _pos; ++i) {
817  letter_type b = _final[_enumerate_order[i]];
818  for (letter_type j = 0; j != _nrgens; ++j) {
819  _left.set(_enumerate_order[i], j, _right.get(_letter_to_pos[j], b));
820  }
821  }
822  _wordlen++;
823  expand(_nr - nr_shorter_elements);
824  _lenindex.push_back(_enumerate_order.size());
825  }
826 
827  // product the words of length > 1 by every generator
828  bool stop = (_nr >= limit || stopped());
829 
830  while (_pos != _nr && !stop) {
831  size_type nr_shorter_elements = _nr;
832  while (_pos != _lenindex[_wordlen + 1] && !stop) {
833  element_index_type i = _enumerate_order[_pos];
834  letter_type b = _first[i];
835  element_index_type s = _suffix[i];
836  for (letter_type j = 0; j != _nrgens; ++j) {
837  if (!_reduced.get(s, j)) {
838  element_index_type r = _right.get(s, j);
839  if (_found_one && r == _pos_one) {
840  _right.set(i, j, _letter_to_pos[b]);
841  } else if (_prefix[r] != UNDEFINED) { // r is not a generator
842  _right.set(i, j, _right.get(_left.get(_prefix[r], b), _final[r]));
843  } else {
844  _right.set(i, j, _right.get(_letter_to_pos[b], _final[r]));
845  }
846  } else {
847  product()(_tmp_product, _elements[i], _gens[j], tid);
848 #ifdef LIBSEMIGROUPS_STATS
849  _nr_products++;
850 #endif
851  auto it = _map.find(_tmp_product);
852 
853  if (it != _map.end()) {
854  _right.set(i, j, it->second);
855  _nr_rules++;
856  } else {
857  is_one(_tmp_product, _nr);
858  _elements.push_back(this->internal_copy(_tmp_product));
859  _first.push_back(b);
860  _final.push_back(j);
861  _length.push_back(_wordlen + 2);
862  _map.emplace(_elements.back(), _nr);
863  _prefix.push_back(i);
864  _reduced.set(i, j, true);
865  _right.set(i, j, _nr);
866  _suffix.push_back(_right.get(s, j));
867  _enumerate_order.push_back(_nr);
868  _nr++;
869  stop = (_nr >= limit || stopped());
870  }
871  }
872  } // finished applying gens to <_elements.at(_pos)>
873  _pos++;
874  } // finished words of length <wordlen> + 1
875  expand(_nr - nr_shorter_elements);
876 
877  if (_pos > _nr || _pos == _lenindex[_wordlen + 1]) {
878  for (enumerate_index_type i = _lenindex[_wordlen]; i != _pos; ++i) {
879  element_index_type p = _prefix[_enumerate_order[i]];
880  letter_type b = _final[_enumerate_order[i]];
881  for (letter_type j = 0; j != _nrgens; ++j) {
882  _left.set(_enumerate_order[i], j, _right.get(_left.get(p, j), b));
883  }
884  }
885  _wordlen++;
886  _lenindex.push_back(_enumerate_order.size());
887  }
888  REPORT("found ",
889  _nr,
890  " elements, ",
891  _nr_rules,
892  " rules, max word length ",
893  current_max_word_length());
894  }
895  REPORT("elapsed time = ", timer);
896  report_why_we_stopped();
897 #ifdef LIBSEMIGROUPS_STATS
898  REPORT("number of products = ", _nr_products);
899 #endif
900  }
901 
902  VOID FROIDURE_PIN::add_generator(element_type const& x) {
903  add_generators({x});
904  }
905 
906  TEMPLATE
907  template <class TCollection>
908  void FROIDURE_PIN::add_generators(TCollection const& coll) {
909  static_assert(!std::is_pointer<TCollection>::value,
910  "TCollection should not be a pointer");
911  if (coll.size() == 0) {
912  return;
913  }
914  for (auto it = coll.begin(); it < coll.end(); ++it) {
915  element_index_type degree
916  = internal_degree()(this->to_internal_const(*it));
917  if (degree != _degree) {
918  LIBSEMIGROUPS_EXCEPTION(
919  "new generator " + internal::to_string(it - coll.begin())
920  + " has degree " + internal::to_string(degree)
921  + " but should have degree " + internal::to_string(_degree));
922  }
923  }
924  internal::Timer timer;
925  size_t tid = REPORTER.thread_id(std::this_thread::get_id());
926 
927  // get some parameters from the old semigroup
928  letter_type old_nrgens = _nrgens;
929  size_type old_nr = _nr;
930  size_type nr_old_left = _pos;
931 
932  // erase the old index
933  _enumerate_order.erase(_enumerate_order.begin() + _lenindex[1],
934  _enumerate_order.end());
935 
936  // old_new[i] indicates if we have seen _elements.at(i) yet in new.
937  std::vector<bool> old_new;
938  old_new.clear();
939  old_new.resize(old_nr, false);
940  for (letter_type i = 0; i < _letter_to_pos.size(); i++) {
941  old_new[_letter_to_pos[i]] = true;
942  }
943 
944  // add the new generators to new _gens, _elements, and _enumerate_order
945  for (const_reference x : coll) {
946  auto it = _map.find(this->to_internal_const(x));
947  if (it == _map.end()) { // new generator
948  _gens.push_back(this->internal_copy(this->to_internal_const(x)));
949  _elements.push_back(_gens.back());
950  _map.emplace(_gens.back(), _nr);
951 
952  _first.push_back(_gens.size() - 1);
953  _final.push_back(_gens.size() - 1);
954 
955  _letter_to_pos.push_back(_nr);
956  _enumerate_order.push_back(_nr);
957 
958  is_one(this->to_internal_const(x), _nr);
959  _prefix.push_back(UNDEFINED);
960  _suffix.push_back(UNDEFINED);
961  _length.push_back(1);
962  _nr++;
963  } else if (_letter_to_pos[_first[it->second]] == it->second) {
964  _gens.push_back(this->internal_copy(this->to_internal_const(x)));
965  // x is one of the existing generators
966  _duplicate_gens.push_back(
967  std::make_pair(_gens.size() - 1, _first[it->second]));
968  // _gens[_gens.size() - 1] = _gens[_first[it->second])]
969  // since _first maps element_index_type -> letter_type
970  _letter_to_pos.push_back(it->second);
971  } else {
972  // x is an old element that will now be a generator
973  _gens.push_back(_elements[it->second]);
974  _letter_to_pos.push_back(it->second);
975  _enumerate_order.push_back(it->second);
976 
977  _first[it->second] = _gens.size() - 1;
978  _final[it->second] = _gens.size() - 1;
979  _prefix[it->second] = UNDEFINED;
980  _suffix[it->second] = UNDEFINED;
981  _length[it->second] = UNDEFINED;
982 
983  old_new[it->second] = true;
984  }
985  }
986 
987  // reset the data structure
988  _idempotents_found = false;
989  _nr_rules = _duplicate_gens.size();
990  _pos = 0;
991  _wordlen = 0;
992  _nrgens = _gens.size();
993  _lenindex.clear();
994  _lenindex.push_back(0);
995  _lenindex.push_back(_nrgens - _duplicate_gens.size());
996 
997  // Add columns for new generators
998  // FIXME isn't this a bit wasteful, we could recycle the old _reduced, to
999  // avoid reallocation
1000  _reduced = internal::RecVec<bool>(
1001  _nrgens, _reduced.nr_rows() + _nrgens - old_nrgens);
1002  _left.add_cols(_nrgens - _left.nr_cols());
1003  _right.add_cols(_nrgens - _right.nr_cols());
1004 
1005  // Add rows in for newly added generators
1006  _left.add_rows(_nrgens - old_nrgens);
1007  _right.add_rows(_nrgens - old_nrgens);
1008 
1009  size_type nr_shorter_elements;
1010 
1011  // Repeat until we have multiplied all of the elements of <old> up to the
1012  // old value of _pos by all of the (new and old) generators
1013 
1014  while (nr_old_left > 0) {
1015  nr_shorter_elements = _nr;
1016  while (_pos < _lenindex[_wordlen + 1] && nr_old_left > 0) {
1017  element_index_type i = _enumerate_order[_pos]; // position in _elements
1018  letter_type b = _first[i];
1019  element_index_type s = _suffix[i];
1020  if (_right.get(i, 0) != UNDEFINED) {
1021  nr_old_left--;
1022  // _elements[i] is in old semigroup, and its descendants are
1023  // known
1024  for (letter_type j = 0; j < old_nrgens; j++) {
1025  element_index_type k = _right.get(i, j);
1026  if (!old_new[k]) { // it's new!
1027  is_one(_elements[k], k);
1028  _first[k] = _first[i];
1029  _final[k] = j;
1030  _length[k] = _wordlen + 2;
1031  _prefix[k] = i;
1032  _reduced.set(i, j, true);
1033  if (_wordlen == 0) {
1034  _suffix[k] = _letter_to_pos[j];
1035  } else {
1036  _suffix[k] = _right.get(s, j);
1037  }
1038  _enumerate_order.push_back(k);
1039  old_new[k] = true;
1040  } else if (s == UNDEFINED || _reduced.get(s, j)) {
1041  // this clause could be removed if _nr_rules wasn't necessary
1042  _nr_rules++;
1043  }
1044  }
1045  for (letter_type j = old_nrgens; j < _nrgens; j++) {
1046  closure_update(i, j, b, s, old_nr, tid, old_new);
1047  }
1048  } else {
1049  // _elements[i] is either not in old, or it is in old but its
1050  // descendants are not known
1051  for (letter_type j = 0; j < _nrgens; j++) {
1052  closure_update(i, j, b, s, old_nr, tid, old_new);
1053  }
1054  }
1055  _pos++;
1056  } // finished words of length <wordlen> + 1
1057 
1058  expand(_nr - nr_shorter_elements);
1059  if (_pos > _nr || _pos == _lenindex[_wordlen + 1]) {
1060  if (_wordlen == 0) {
1061  for (enumerate_index_type i = 0; i < _pos; i++) {
1062  size_t b = _final[_enumerate_order[i]];
1063  for (letter_type j = 0; j < _nrgens; j++) {
1064  // TODO(JDM) reuse old info here!
1065  _left.set(
1066  _enumerate_order[i], j, _right.get(_letter_to_pos[j], b));
1067  }
1068  }
1069  } else {
1070  for (enumerate_index_type i = _lenindex[_wordlen]; i < _pos; i++) {
1071  element_index_type p = _prefix[_enumerate_order[i]];
1072  letter_type b = _final[_enumerate_order[i]];
1073  for (letter_type j = 0; j < _nrgens; j++) {
1074  // TODO(JDM) reuse old info here!
1075  _left.set(_enumerate_order[i], j, _right.get(_left.get(p, j), b));
1076  }
1077  }
1078  }
1079  _lenindex.push_back(_enumerate_order.size());
1080  _wordlen++;
1081  }
1082  REPORT("found ",
1083  _nr,
1084  " elements, ",
1085  _nr_rules,
1086  " rules, max word length ",
1087  current_max_word_length());
1088  }
1089  if (started()) {
1090  REPORT("elapsed time = ", timer);
1091  }
1092  report_why_we_stopped();
1093  }
1094 
1095  VOID
1096  FROIDURE_PIN::add_generators(std::initializer_list<const_element_type> coll) {
1097  add_generators<std::initializer_list<const_element_type>>(coll);
1098  }
1099 
1100  TEMPLATE
1101  template <class TCollection>
1102  FROIDURE_PIN*
1103  FROIDURE_PIN::copy_add_generators(TCollection const& coll) const {
1104  static_assert(!std::is_pointer<TCollection>::value,
1105  "TCollection should not be a pointer");
1106  if (coll.size() == 0) {
1107  return new FroidurePin(*this);
1108  } else {
1109  // Partially copy
1110  FroidurePin* out = new FroidurePin(*this, &coll);
1111  out->add_generators(coll);
1112  return out;
1113  }
1114  }
1115 
1116  TEMPLATE
1117  template <class TCollection>
1118  void FROIDURE_PIN::closure(TCollection const& coll) {
1119  static_assert(!std::is_pointer<TCollection>::value,
1120  "TCollection should not be a pointer");
1121  if (coll.size() == 0) {
1122  return;
1123  } else {
1124  for (const_reference x : coll) {
1125  if (!contains(x)) {
1126  add_generators({x});
1127  }
1128  }
1129  }
1130  }
1131 
1132  VOID FROIDURE_PIN::closure(std::initializer_list<const_element_type> coll) {
1133  closure<std::initializer_list<const_element_type>>(coll);
1134  }
1135 
1136  TEMPLATE
1137  template <class TCollection>
1138  FROIDURE_PIN* FROIDURE_PIN::copy_closure(TCollection const& coll) {
1139  static_assert(!std::is_pointer<TCollection>::value,
1140  "TCollection should not be a pointer");
1141  if (coll.size() == 0) {
1142  return new FroidurePin(*this);
1143  } else {
1144  // The next line is required so that when we call the closure method on
1145  // out, the partial copy contains enough information to all membership
1146  // testing without a call to enumerate (which will fail because the
1147  // partial copy does not contain enough data to run enumerate).
1148  this->enumerate(LIMIT_MAX);
1149  // Partially copy
1150  FroidurePin* out = new FroidurePin(*this, &coll);
1151  out->closure(coll);
1152  return out;
1153  }
1154  }
1155 
1156  BOOL FROIDURE_PIN::is_monoid() {
1157  run();
1158  return _found_one;
1159  }
1160 
1162  // FroidurePin - validation methods - private
1164 
1165  VOID FROIDURE_PIN::validate_element_index(element_index_type i) const {
1166  if (i >= _nr) {
1167  LIBSEMIGROUPS_EXCEPTION(
1168  "there are only " + internal::to_string(_nr) + " elements"
1169  + (finished() ? "" : " enumerated so far") + ", but index "
1170  + internal::to_string(i) + " was given");
1171  }
1172  }
1173 
1174  VOID FROIDURE_PIN::validate_letter_index(letter_type i) const {
1175  if (i >= nr_generators()) {
1176  LIBSEMIGROUPS_EXCEPTION("there are only "
1177  + internal::to_string(nr_generators())
1178  + " generators, not " + internal::to_string(i));
1179  }
1180  }
1181 
1183  // FroidurePin - enumeration methods - private
1185 
1186  // Expand the data structures in the semigroup with space for nr elements
1187  INLINE_VOID FROIDURE_PIN::expand(size_type nr) {
1188  _left.add_rows(nr);
1189  _reduced.add_rows(nr);
1190  _right.add_rows(nr);
1191  }
1192 
1193  // Check if an element is the identity, x should be in the position pos
1194  // of _elements.
1195  // FIXME noexcept should depend on whether or not internal_equal_to throws.
1196  INLINE_VOID FROIDURE_PIN::is_one(internal_const_element_type x,
1197  element_index_type pos) noexcept {
1198  if (!_found_one && internal_equal_to()(x, _id)) {
1199  _pos_one = pos;
1200  _found_one = true;
1201  }
1202  }
1203 
1204  // _nrgens, _duplicates_gens, _letter_to_pos, and _elements must all be
1205  // initialised for this to work, and _gens must point to an empty vector.
1206  VOID FROIDURE_PIN::copy_gens() {
1207  LIBSEMIGROUPS_ASSERT(_gens.empty());
1208  _gens.resize(_nrgens);
1209  std::vector<bool> seen(_nrgens, false);
1210  // really copy duplicate gens from _elements
1211  for (std::pair<letter_type, letter_type> const& x : _duplicate_gens) {
1212  // The degree of everything in _elements has already been increased (if
1213  // it needs to be at all), and so we do not need to increase the degree
1214  // in the copy below.
1215  _gens[x.first] = this->internal_copy(_elements[_letter_to_pos[x.second]]);
1216  seen[x.first] = true;
1217  }
1218  // the non-duplicate gens are already in _elements, so don't really copy
1219  for (letter_type i = 0; i < _nrgens; i++) {
1220  if (!seen[i]) {
1221  _gens[i] = _elements[_letter_to_pos[i]];
1222  }
1223  }
1224  }
1225 
1226  VOID FROIDURE_PIN::closure_update(element_index_type i,
1227  letter_type j,
1228  letter_type b,
1229  element_index_type s,
1230  size_type old_nr,
1231  size_t const& tid,
1232  std::vector<bool>& old_new) {
1233  if (_wordlen != 0 && !_reduced.get(s, j)) {
1234  element_index_type r = _right.get(s, j);
1235  if (_found_one && r == _pos_one) {
1236  _right.set(i, j, _letter_to_pos[b]);
1237  } else if (_prefix[r] != UNDEFINED) {
1238  _right.set(i, j, _right.get(_left.get(_prefix[r], b), _final[r]));
1239  } else {
1240  _right.set(i, j, _right.get(_letter_to_pos[b], _final[r]));
1241  }
1242  } else {
1243  product()(_tmp_product, _elements[i], _gens[j], tid);
1244  auto it = _map.find(_tmp_product);
1245  if (it == _map.end()) { // it's new!
1246  is_one(_tmp_product, _nr);
1247  _elements.push_back(this->internal_copy(_tmp_product));
1248  _first.push_back(b);
1249  _final.push_back(j);
1250  _length.push_back(_wordlen + 2);
1251  _map.emplace(_elements.back(), _nr);
1252  _prefix.push_back(i);
1253  _reduced.set(i, j, true);
1254  _right.set(i, j, _nr);
1255  if (_wordlen == 0) {
1256  _suffix.push_back(_letter_to_pos[j]);
1257  } else {
1258  _suffix.push_back(_right.get(s, j));
1259  }
1260  _enumerate_order.push_back(_nr);
1261  _nr++;
1262  } else if (it->second < old_nr && !old_new[it->second]) {
1263  // we didn't process it yet!
1264  is_one(_tmp_product, it->second);
1265  _first[it->second] = b;
1266  _final[it->second] = j;
1267  _length[it->second] = _wordlen + 2;
1268  _prefix[it->second] = i;
1269  _reduced.set(i, j, true);
1270  _right.set(i, j, it->second);
1271  if (_wordlen == 0) {
1272  _suffix[it->second] = _letter_to_pos[j];
1273  } else {
1274  _suffix[it->second] = _right.get(s, j);
1275  }
1276  _enumerate_order.push_back(it->second);
1277  old_new[it->second] = true;
1278  } else { // it->second >= old->_nr || old_new[it->second]
1279  // it's old
1280  _right.set(i, j, it->second);
1281  _nr_rules++;
1282  }
1283  }
1284  }
1285 
1287  // FroidurePin - initialisation methods - private
1289 
1290  // Initialise the data member _sorted. We store a list of pairs consisting
1291  // of an internal_element_type and element_index_type which is sorted on the
1292  // first entry using the operator< of the Element class. The second
1293  // component is then inverted (as a permutation) so that we can then find
1294  // the position of an element in the sorted list of elements.
1295  VOID FROIDURE_PIN::init_sorted() {
1296  if (_sorted.size() == size()) {
1297  return;
1298  }
1299  size_t n = size();
1300  _sorted.reserve(n);
1301  for (element_index_type i = 0; i < n; i++) {
1302  _sorted.emplace_back(_elements[i], i);
1303  }
1304  std::sort(_sorted.begin(),
1305  _sorted.end(),
1306  [](std::pair<internal_element_type, element_index_type> const& x,
1307  std::pair<internal_element_type, element_index_type> const& y)
1308  -> bool { return less()(x.first, y.first); });
1309 
1310  // Invert the permutation in _sorted[*].second
1311  std::vector<element_index_type> tmp_inverter;
1312  tmp_inverter.resize(n);
1313  for (element_index_type i = 0; i < n; i++) {
1314  tmp_inverter[_sorted[i].second] = i;
1315  }
1316  for (element_index_type i = 0; i < n; i++) {
1317  _sorted[i].second = tmp_inverter[i];
1318  }
1319  }
1320 
1321  // Find the idempotents and store their pointers and positions in a
1322  // std::pair of type internal_idempotent_pair.
1323  VOID FROIDURE_PIN::init_idempotents() {
1324  if (_idempotents_found) {
1325  return;
1326  }
1327  _idempotents_found = true;
1328  enumerate();
1329  _is_idempotent.resize(_nr, false);
1330 
1331  internal::Timer timer;
1332 
1333  // Find the threshold beyond which it is quicker to simply product
1334  // elements rather than follow a path in the Cayley graph. This is the
1335  // enumerate_index_t i for which length(i) >= complexity.
1336  size_t cmplxty
1337  = std::max(size_t{complexity()(_tmp_product) / 2}, size_t{1});
1338  LIBSEMIGROUPS_ASSERT(_lenindex.size() > 1);
1339  // threshold_length = the min. length of a word which is >= complexity.
1340  // if a word has length strictly greater than threshold_length, then we
1341  // multiply, otherwise we trace in the Cayley graph.
1342  size_t threshold_length = std::min(cmplxty, current_max_word_length());
1343  LIBSEMIGROUPS_ASSERT(threshold_length < _lenindex.size());
1344 
1345  enumerate_index_type threshold_index = _lenindex.at(threshold_length);
1346 
1347  size_t total_load = 0;
1348  for (size_t i = 1; i <= threshold_length; ++i) {
1349  // _lenindex[i - 1] is the element_index_t where words of length i begin
1350  // so _lenindex[i] - _lenindex[i - 1]) is the number of words of length
1351  // i.
1352  total_load += i * (_lenindex[i] - _lenindex[i - 1]);
1353  }
1354 
1355 #ifdef LIBSEMIGROUPS_STATS
1356  REPORT("complexity of multiplication = ", comp);
1357  REPORT("multiple words longer than ", threshold_length);
1358  REPORT("number of paths traced in Cayley graph = ", threshold_index);
1359  REPORT("mean path length = ", total_load / threshold_index);
1360  REPORT("number of products = ", _nr - threshold_index);
1361 #endif
1362 
1363  // _lenindex.at(threshold_length) is the element_index_type where words of
1364  // length (threshold_length + 1) begin
1365  LIBSEMIGROUPS_ASSERT(_nr >= _lenindex.at(threshold_length));
1366  total_load += cmplxty * (_nr - _lenindex.at(threshold_length));
1367 
1368  if (max_threads() == 1 || size() < concurrency_threshold()) {
1369  // Use only 1 thread
1370  idempotents(0, _nr, threshold_index, _idempotents);
1371  } else {
1372  // Use > 1 threads
1373  size_t mean_load = total_load / max_threads();
1374  size_t len = 1;
1375  std::vector<enumerate_index_type> first(max_threads(), 0);
1376  std::vector<enumerate_index_type> last(max_threads(), _nr);
1377  std::vector<std::vector<internal_idempotent_pair>> tmp(
1378  max_threads(), std::vector<internal_idempotent_pair>());
1379  std::vector<std::thread> threads;
1380  REPORTER.reset_thread_ids();
1381 
1382  for (size_t i = 0; i < max_threads() - 1; i++) {
1383  size_t thread_load = 0;
1384  last[i] = first[i];
1385  while (thread_load < mean_load && last[i] < threshold_index) {
1386  if (last[i] >= _lenindex[len]) {
1387  ++len;
1388  }
1389  thread_load += len;
1390  ++last[i];
1391  }
1392  while (thread_load < mean_load) {
1393  thread_load += cmplxty;
1394  ++last[i];
1395  }
1396  total_load -= thread_load;
1397  REPORT("thread ", i + 1, " has load ", thread_load);
1398  first[i + 1] = last[i];
1399 
1400  threads.emplace_back(&FroidurePin::idempotents,
1401  this,
1402  first[i],
1403  last[i],
1404  threshold_index,
1405  std::ref(tmp[i]));
1406  }
1407  // TODO use less threads if the av_load is too low
1408 
1409  REPORT("thread ", max_threads(), " has load ", total_load);
1410  threads.emplace_back(&FroidurePin::idempotents,
1411  this,
1412  first[max_threads() - 1],
1413  last[max_threads() - 1],
1414  threshold_index,
1415  std::ref(tmp[max_threads() - 1]));
1416 
1417  size_t nr_idempotents = 0;
1418  for (size_t i = 0; i < max_threads(); i++) {
1419  threads[i].join();
1420  nr_idempotents += tmp[i].size();
1421  }
1422  _idempotents.reserve(nr_idempotents);
1423  for (size_t i = 0; i < max_threads(); i++) {
1424  std::copy(
1425  tmp[i].begin(), tmp[i].end(), std::back_inserter(_idempotents));
1426  }
1427  }
1428  REPORT("elapsed time = ", timer);
1429  }
1430 
1431  // Find the idempotents in the range [first, last) and store
1432  // the corresponding std::pair of type internal_idempotent_pair in the 4th
1433  // parameter. The parameter threshold is the point, calculated in
1434  // init_idempotents, at which it is better to simply product elements
1435  // rather than trace in the left/right Cayley graph.
1436  VOID FROIDURE_PIN::idempotents(
1437  enumerate_index_type const first,
1438  enumerate_index_type const last,
1439  enumerate_index_type const threshold,
1440  std::vector<internal_idempotent_pair>& idempotents) {
1441  REPORT("first = ", first, ", last = ", last, ", diff = ", last - first);
1442  internal::Timer timer;
1443 
1444  enumerate_index_type pos = first;
1445 
1446  for (; pos < std::min(threshold, last); pos++) {
1447  element_index_type k = _enumerate_order[pos];
1448  if (!_is_idempotent[k]) {
1449  // The following is product_by_reduction, don't have to consider
1450  // lengths because they are equal!!
1451  element_index_type i = k, j = k;
1452  while (j != UNDEFINED) {
1453  i = _right.get(i, _first[j]);
1454  // TODO improve this if R/L-classes are known to stop performing the
1455  // product if we fall out of the R/L-class of the initial element.
1456  j = _suffix[j];
1457  }
1458  if (i == k) {
1459  idempotents.emplace_back(_elements[k], k);
1460  _is_idempotent[k] = true;
1461  }
1462  }
1463  }
1464 
1465  if (pos >= last) {
1466  REPORT("elapsed time = ", timer);
1467  return;
1468  }
1469 
1470  // Cannot use _tmp_product itself since there are multiple threads here!
1471  internal_element_type tmp_product = this->internal_copy(_tmp_product);
1472  size_t tid = REPORTER.thread_id(std::this_thread::get_id());
1473 
1474  for (; pos < last; pos++) {
1475  element_index_type k = _enumerate_order[pos];
1476  if (!_is_idempotent[k]) {
1477  product()(tmp_product, _elements[k], _elements[k], tid);
1478  if (internal_equal_to()(tmp_product, _elements[k])) {
1479  idempotents.emplace_back(_elements[k], k);
1480  _is_idempotent[k] = true;
1481  }
1482  }
1483  }
1484  this->internal_free(tmp_product);
1485  REPORT("elapsed time = ", timer);
1486  }
1487 
1489  // FroidurePin - iterators - public
1491 
1492  TEMPLATE
1493  typename FROIDURE_PIN::const_iterator FROIDURE_PIN::cbegin() const {
1494  return const_iterator(_elements.cbegin());
1495  }
1496 
1497  TEMPLATE
1498  typename FROIDURE_PIN::const_iterator FROIDURE_PIN::begin() const {
1499  return cbegin();
1500  }
1501 
1502  TEMPLATE
1503  typename FROIDURE_PIN::const_iterator FROIDURE_PIN::cend() const {
1504  return const_iterator(_elements.cend());
1505  }
1506 
1507  TEMPLATE
1508  typename FROIDURE_PIN::const_iterator FROIDURE_PIN::end() const {
1509  return cend();
1510  }
1511 
1512  TEMPLATE
1513  typename FROIDURE_PIN::const_reverse_iterator FROIDURE_PIN::crbegin() const {
1514  return const_reverse_iterator(cend());
1515  }
1516 
1517  TEMPLATE
1518  typename FROIDURE_PIN::const_reverse_iterator FROIDURE_PIN::crend() const {
1519  return const_reverse_iterator(cbegin());
1520  }
1521 
1522  TEMPLATE
1523  typename FROIDURE_PIN::const_iterator_sorted FROIDURE_PIN::cbegin_sorted() {
1524  init_sorted();
1525  return const_iterator_pair_first(_sorted.cbegin());
1526  }
1527 
1528  TEMPLATE
1529  typename FROIDURE_PIN::const_iterator_sorted FROIDURE_PIN::cend_sorted() {
1530  init_sorted();
1531  return const_iterator_pair_first(_sorted.cend());
1532  }
1533 
1534  TEMPLATE
1535  typename FROIDURE_PIN::const_reverse_iterator_sorted
1536  FROIDURE_PIN::crbegin_sorted() {
1537  init_sorted();
1538  return const_reverse_iterator_pair_first(cend_sorted());
1539  }
1540 
1541  TEMPLATE
1542  typename FROIDURE_PIN::const_reverse_iterator_sorted
1543  FROIDURE_PIN::crend_sorted() {
1544  init_sorted();
1545  return const_reverse_iterator_pair_first(cbegin_sorted());
1546  }
1547 
1548  TEMPLATE
1549  typename FROIDURE_PIN::const_iterator_idempotents
1550  FROIDURE_PIN::cbegin_idempotents() {
1551  init_idempotents();
1552  return const_iterator_pair_first(_idempotents.cbegin());
1553  }
1554 
1555  TEMPLATE
1556  typename FROIDURE_PIN::const_iterator_idempotents
1557  FROIDURE_PIN::cend_idempotents() {
1558  init_idempotents();
1559  return const_iterator_pair_first(_idempotents.cend());
1560  }
1561 
1563  // FroidurePin - iterators - private
1565 
1566  TEMPLATE
1567  struct FROIDURE_PIN::iterator_methods : private TTraits {
1568  using wrapped_iterator =
1569  typename std::vector<internal_element_type>::const_iterator;
1570 
1571  const_reference indirection(wrapped_iterator it) const {
1572  return this->to_external_const(*it);
1573  }
1574 
1575  const_pointer addressof(wrapped_iterator it) const {
1576  return &(this->to_external_const(*it));
1577  }
1578  };
1579 
1580  TEMPLATE
1581  struct FROIDURE_PIN::iterator_methods_pair_first : private TTraits {
1582  using wrapped_iterator = typename std::vector<
1583  std::pair<internal_element_type, element_index_type>>::const_iterator;
1584 
1585  const_reference indirection(wrapped_iterator it) const {
1586  return this->to_external_const((*it).first);
1587  }
1588 
1589  const_pointer addressof(wrapped_iterator it) const {
1590  return &(this->to_external_const((*it).first));
1591  }
1592  };
1593 
1594 } // namespace libsemigroups
1595 #endif // LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_IMPL_HPP_
size_t degree() const override
Returns the degree of a PBR.
-
Definition: kbe.hpp:198
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
virtual void increase_degree_by(size_t)
Increases the degree of this by deg. This does not make sense for all subclasses of Element...
-
size_t letter_type
Type for the index of a generator of a semigroup.
Definition: types.hpp:50
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/froidure-pin_8hpp.html b/froidure-pin_8hpp.html deleted file mode 100644 index 1f68d5866..000000000 --- a/froidure-pin_8hpp.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - -libsemigroups: include/froidure-pin.hpp File Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
froidure-pin.hpp File Reference
-
-
- -

This file contains a declaration of the class template FroidurePin which implements the Froidure-Pin algorithm as described in Algorithms for computing finite semigroups -More...

-
#include <stddef.h>
-#include <iterator>
-#include <mutex>
-#include <thread>
-#include <type_traits>
-#include <unordered_map>
-#include <utility>
-#include <vector>
-#include "adapters.hpp"
-#include "constants.hpp"
-#include "containers.hpp"
-#include "froidure-pin-base.hpp"
-#include "iterator.hpp"
-#include "libsemigroups-config.hpp"
-#include "libsemigroups-debug.hpp"
-#include "libsemigroups-exception.hpp"
-#include "report.hpp"
-#include "stl.hpp"
-#include "timer.hpp"
-#include "traits.hpp"
-#include "types.hpp"
-#include "froidure-pin-impl.hpp"
-
-Include dependency graph for froidure-pin.hpp:
-
-
- - - - - - - - - - - - - - - - - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - - - - -
-
-

Go to the source code of this file.

- - - - - -

-Classes

class  libsemigroups::FroidurePin< TElementType, TElementHash, TElementEqual, TTraits >
 Class for semigroups generated by instances of Element. More...
 
- - - - -

-Namespaces

 libsemigroups
 Namespace for everything in the libsemigroups library.
 
-

Detailed Description

-

This file contains a declaration of the class template FroidurePin which implements the Froidure-Pin algorithm as described in Algorithms for computing finite semigroups

-

For technical reasons the implementation of the methods of the FroidurePin class template is contained in include/froidure-pin-impl.hpp.

-
- - - - diff --git a/froidure-pin_8hpp__dep__incl.map b/froidure-pin_8hpp__dep__incl.map deleted file mode 100644 index 4371602c2..000000000 --- a/froidure-pin_8hpp__dep__incl.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/froidure-pin_8hpp__dep__incl.md5 b/froidure-pin_8hpp__dep__incl.md5 deleted file mode 100644 index 50b26020c..000000000 --- a/froidure-pin_8hpp__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -6811a5d3e1a0be3bb3d02faf0529b185 \ No newline at end of file diff --git a/froidure-pin_8hpp__dep__incl.png b/froidure-pin_8hpp__dep__incl.png deleted file mode 100644 index 1559e56f3..000000000 Binary files a/froidure-pin_8hpp__dep__incl.png and /dev/null differ diff --git a/froidure-pin_8hpp__incl.map b/froidure-pin_8hpp__incl.map deleted file mode 100644 index 4aaa251b4..000000000 --- a/froidure-pin_8hpp__incl.map +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/froidure-pin_8hpp__incl.md5 b/froidure-pin_8hpp__incl.md5 deleted file mode 100644 index 69f8b35d5..000000000 --- a/froidure-pin_8hpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -e151b930833ec6254cffa1a7b627d087 \ No newline at end of file diff --git a/froidure-pin_8hpp__incl.png b/froidure-pin_8hpp__incl.png deleted file mode 100644 index 75a9b07d4..000000000 Binary files a/froidure-pin_8hpp__incl.png and /dev/null differ diff --git a/froidure-pin_8hpp_source.html b/froidure-pin_8hpp_source.html deleted file mode 100644 index f4a48f805..000000000 --- a/froidure-pin_8hpp_source.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - -libsemigroups: include/froidure-pin.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
froidure-pin.hpp
-
-
-Go to the documentation of this file.
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2016-18 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
27 
28 // TODO(now)
29 // 1. Update the doc
30 
31 #ifndef LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_HPP_
32 #define LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_HPP_
33 
34 #include <stddef.h> // for size_t
35 
36 #include <iterator> // for reverse_iterator
37 #include <mutex> // for mutex
38 #include <thread> // for get_id
39 #include <type_traits> // for is_const, remove_pointer
40 #include <unordered_map> // for unordered_map
41 #include <utility> // for pair
42 #include <vector> // for vector
43 
44 #include "adapters.hpp" // for complexity, degree, increase_degree_by
45 #include "constants.hpp" // for UNDEFINED, LIMIT_MAX
46 #include "containers.hpp" // for RecVec
47 #include "froidure-pin-base.hpp" // for FroidurePinBase, FroidurePinBase::s...
48 #include "iterator.hpp" // for iterator_base
49 #include "libsemigroups-config.hpp" // for LIBSEMIGROUPS_DENSEHASHMAP
50 #include "libsemigroups-debug.hpp" // for LIBSEMIGROUPS_ASSERT
51 #include "libsemigroups-exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
52 #include "report.hpp" // for REPORT
53 #include "stl.hpp" // for equal_to, hash
54 #include "timer.hpp" // for internal::Timer
55 #include "traits.hpp" // for TraitsHashEqual
56 #include "types.hpp" // for letter_type, word_type
57 
58 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
59 #include "extern/sparsehash-c11/sparsehash/dense_hash_map"
60 #endif
61 
63 namespace libsemigroups {
64  // Forward declaration
65  class Element;
66 
75  template <typename TElementType = Element const*,
76  typename TElementHash = internal::hash<TElementType>,
77  typename TElementEqual = internal::equal_to<TElementType>,
78  class TTraits
79  = TraitsHashEqual<TElementType, TElementHash, TElementEqual>>
80  class FroidurePin : private TTraits, public FroidurePinBase {
81  private:
83  // FroidurePin - typedefs - private
85 
86  using internal_element_type = typename TTraits::internal_element_type;
87  using internal_const_element_type =
88  typename TTraits::internal_const_element_type;
89  using internal_const_reference = typename TTraits::internal_const_reference;
90 
91  using internal_equal_to = typename TTraits::internal_equal_to;
92  using internal_hash = typename TTraits::internal_hash;
93 
94  using complexity = ::libsemigroups::complexity<internal_element_type>;
95  using internal_degree = ::libsemigroups::degree<internal_element_type>;
96  using increase_degree_by
97  = ::libsemigroups::increase_degree_by<internal_element_type>;
98  using less = ::libsemigroups::less<internal_element_type>;
99  using one = ::libsemigroups::one<internal_element_type>;
100  using product = ::libsemigroups::product<internal_element_type>;
101  using swap = ::libsemigroups::swap<internal_element_type>;
102 
103  static_assert(
104  std::is_const<internal_const_element_type>::value
105  || std::is_const<typename std::remove_pointer<
106  internal_const_element_type>::type>::value,
107  "internal_const_element_type must be const or pointer to const");
108 
109  // The elements of a semigroup are stored in _elements, but because of the
110  // way add_generators/closure work, it might not be the case that all the
111  // words of a given length are contiguous in _elements. Hence we require a
112  // means of finding the next element of a given length. In
113  // _enumerate_order, the first K_1 values are element_index_type's
114  // equal to the positions in _elements of the words of length 1,
115  // the next K_2 values are the element_index_type's equal to the positions
116  // in _elements of the words of length 2, and so on.
117  //
118  // This alias is used to distinguish variables that refer to positions in
119  // _elements (element_index_type) from those that refer to positions in
120  // _enumerate_order (enumerate_index_type).
121  using enumerate_index_type = FroidurePinBase::size_type;
122 
123  public:
125  // FroidurePin - typedefs - public
127 
128  using element_type = typename TTraits::element_type;
129  using const_element_type = typename TTraits::const_element_type;
130  using const_reference = typename TTraits::const_reference;
131  using const_pointer = typename TTraits::const_pointer;
132  using size_type = FroidurePinBase::size_type;
133  using element_index_type = FroidurePinBase::element_index_type;
134 
136  // FroidurePin - constructors + destructor - public
138 
145  FroidurePin& operator=(FroidurePin const& semigroup) = delete;
146 
165  explicit FroidurePin(std::vector<element_type> const*);
166 
171  explicit FroidurePin(std::vector<element_type> const&);
172 
177  explicit FroidurePin(std::initializer_list<element_type>);
178 
184  FroidurePin(FroidurePin const&);
185 
187  ~FroidurePin();
188 
189  private:
191  // FroidurePin - constructor - private
193 
194  FroidurePin(FroidurePin const&, std::vector<element_type> const*);
195 
196  public:
198  // FroidurePin - settings - public
200 
212  void set_batch_size(size_t) noexcept override;
213 
216  size_t batch_size() const noexcept override;
217 
225  void set_max_threads(size_t) noexcept override;
226 
228  size_t max_threads() const noexcept override;
229 
231  void set_concurrency_threshold(size_t) noexcept override;
232 
234  size_t concurrency_threshold() const noexcept override;
235 
237  // FroidurePin - methods - public
239 
255  element_index_type word_to_pos(word_type const&) const override;
256 
270  element_type word_to_element(word_type const&) const;
271 
274  bool equal_to(word_type const&, word_type const&) const override;
275 
283  size_t current_max_word_length() const noexcept override;
284 
286  size_t degree() const noexcept override;
287 
289  size_t nr_generators() const noexcept override;
290 
297  const_reference generator(letter_type) const;
298 
310  element_index_type current_position(const_reference x) const;
311 
317  size_t current_size() const noexcept override;
318 
324  size_t current_nr_rules() const noexcept override;
325 
331  element_index_type prefix(element_index_type pos) const override;
332 
338  element_index_type suffix(element_index_type pos) const override;
339 
352  letter_type first_letter(element_index_type pos) const override;
353 
366  letter_type final_letter(element_index_type pos) const override;
367 
373  size_t length_const(element_index_type) const override;
374 
379  size_t length_non_const(element_index_type) override;
380 
392  element_index_type product_by_reduction(element_index_type,
393  element_index_type) const override;
394 
415  element_index_type fast_product(element_index_type,
416  element_index_type) const override;
417 
428  element_index_type letter_to_pos(letter_type) const override;
429 
435  size_t nr_idempotents() override;
436 
444  bool is_idempotent(element_index_type) override;
445 
450  size_t nr_rules() override;
451 
460  void reserve(size_t) override;
461 
463  size_t size() override;
464 
472  bool contains(const_reference);
473 
482  element_index_type position(const_reference);
483 
487  element_index_type sorted_position(const_reference);
488 
492  element_index_type position_to_sorted_position(element_index_type) override;
493 
500  const_reference at(element_index_type);
501 
506  const_reference operator[](element_index_type) const;
507 
512  const_reference sorted_at(element_index_type);
513 
518  element_index_type right(element_index_type, letter_type) override;
519 
524  element_index_type left(element_index_type, letter_type) override;
525 
537  void minimal_factorisation(word_type&, element_index_type) override;
538 
547  word_type minimal_factorisation(element_index_type) override;
548 
555  word_type minimal_factorisation(const_reference);
556 
565  void factorisation(word_type&, element_index_type) override;
566 
575  word_type factorisation(element_index_type pos) override;
576 
584  word_type factorisation(const_reference);
585 
592  void reset_next_relation() noexcept override;
593 
625  void next_relation(word_type& relation) override;
626 
648  void enumerate(size_t = LIMIT_MAX) override;
649  void run() override;
650  void run(size_t);
651 
683 
684  void add_generator(element_type const&);
685 
686  template <class TCollection>
687  void add_generators(TCollection const&);
688 
692  void add_generators(std::initializer_list<const_element_type>);
693 
706  template <class TCollection>
707  FroidurePin* copy_add_generators(TCollection const&) const;
708 
731  template <class TCollection>
732  void closure(TCollection const& coll);
733 
738  void closure(std::initializer_list<const_element_type>);
739 
752  template <class TCollection>
753  FroidurePin* copy_closure(TCollection const&);
754 
755  bool is_monoid() override;
756 
757  private:
759  // Runner - non-pure virtual member functions - private
761  bool started_impl() const noexcept override;
762  bool finished_impl() const override;
763 
765  // FroidurePin - validation methods - private
767 
768  void validate_element_index(element_index_type) const;
769  void validate_letter_index(letter_type) const;
771  // FroidurePin - enumeration methods - private
773 
774  inline void expand(size_type);
775  inline void is_one(internal_const_element_type,
776  element_index_type) noexcept;
777  void copy_gens();
778  void closure_update(element_index_type,
779  letter_type,
780  letter_type,
781  element_index_type,
782  size_type,
783  size_t const&,
784  std::vector<bool>&);
785 
787  // FroidurePin - initialisation methods - private
789 
790  using internal_idempotent_pair
791  = std::pair<internal_element_type, element_index_type>;
792 
793  void init_sorted();
794  void init_idempotents();
795  void idempotents(enumerate_index_type const,
796  enumerate_index_type const,
797  enumerate_index_type const,
798  std::vector<internal_idempotent_pair>&);
799 
801  // FroidurePin - iterators - private
803 
804  // Forward declarations - implemented in froidure-pin-impl.hpp
805  struct iterator_methods;
806  struct iterator_methods_pair_first;
807 
808  // A type for const iterators through (element, index) pairs of \c this.
809  using const_iterator_pair_first = internal::iterator_base<
810  std::pair<internal_element_type, element_index_type>,
811  const_pointer,
812  const_reference,
813  element_type,
814  iterator_methods_pair_first>;
815 
816  // A type for const reverse iterators through (element_type,
817  // element_index_type) pairs of this.
818  using const_reverse_iterator_pair_first
819  = std::reverse_iterator<const_iterator_pair_first>;
820 
821  public:
823  // FroidurePin - iterators - public
830  using const_iterator = internal::iterator_base<internal_element_type,
831  const_pointer,
832  const_reference,
833  element_type,
834  iterator_methods>;
835 
840  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
841 
846  using const_iterator_sorted = const_iterator_pair_first;
847 
852  using const_reverse_iterator_sorted = const_reverse_iterator_pair_first;
853 
858  using const_iterator_idempotents = const_iterator_pair_first;
859 
865  = const_reverse_iterator_pair_first;
866 
873  const_iterator cbegin() const;
874 
881  const_iterator begin() const;
882 
889  const_iterator cend() const;
890 
897  const_iterator end() const;
898 
906 
914 
922 
930 
938 
946 
957 
964 
966  // FroidurePin - data - private
968 
969  // Type for a left or right Cayley graph of a semigroup.
970  using cayley_graph_type = internal::RecVec<element_index_type>;
971 
972  struct Settings {
973  Settings();
974  Settings(Settings const&) = default;
975  size_t _batch_size;
976  size_t _concurrency_threshold;
977  size_t _max_threads;
978  } _settings;
979 
980  size_t _degree;
981  std::vector<std::pair<letter_type, letter_type>> _duplicate_gens;
982  std::vector<internal_element_type> _elements;
983  std::vector<element_index_type> _enumerate_order;
984  std::vector<letter_type> _final;
985  std::vector<letter_type> _first;
986  bool _found_one;
987  std::vector<internal_element_type> _gens;
988  internal_element_type _id;
989  std::vector<internal_idempotent_pair> _idempotents;
990  bool _idempotents_found;
991  std::vector<bool> _is_idempotent;
992  cayley_graph_type _left;
993  std::vector<size_type> _length;
994  std::vector<enumerate_index_type> _lenindex;
995  std::vector<element_index_type> _letter_to_pos;
996 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
997  google::dense_hash_map<internal_const_element_type,
998  element_index_type,
999  internal_hash,
1000  internal_equal_to>
1001  _map;
1002 #else
1003  std::unordered_map<internal_const_element_type,
1004  element_index_type,
1005  internal_hash,
1006  internal_equal_to>
1007  _map;
1008 #endif
1009  mutable std::mutex _mtx;
1010  size_type _nr;
1011  letter_type _nrgens;
1012  size_t _nr_rules;
1013  enumerate_index_type _pos;
1014  element_index_type _pos_one;
1015  std::vector<element_index_type> _prefix;
1016  internal::RecVec<bool> _reduced;
1017  letter_type _relation_gen;
1018  enumerate_index_type _relation_pos;
1019  cayley_graph_type _right;
1020  std::vector<std::pair<internal_element_type, element_index_type>> _sorted;
1021  std::vector<element_index_type> _suffix;
1022  mutable internal_element_type _tmp_product;
1023  size_t _wordlen;
1024 
1025 #ifdef LIBSEMIGROUPS_STATS
1026  size_t _nr_products;
1027 #endif
1028  };
1029 } // namespace libsemigroups
1030 
1031 // Include the implementation of the member functions for FroidurePin
1032 #include "froidure-pin-impl.hpp"
1033 #endif // LIBSEMIGROUPS_INCLUDE_FROIDURE_PIN_HPP_
element_index_type sorted_position(const_reference)
Returns the position of x in the sorted array of elements of the semigroup, or FroidurePin::UNDEFINED...
-
const_iterator begin() const
Returns a const iterator pointing to the first element of the semigroup.
-
const_iterator cbegin() const
Returns a const iterator pointing to the first element of the semigroup.
-
element_index_type letter_to_pos(letter_type) const override
Returns the position in this of the generator with index i.
-
bool contains(const_reference)
Returns true if x is an element of this and false if it is not.
-
size_t nr_rules() override
Returns the total number of relations in the presentation defining the semigroup. ...
-
void minimal_factorisation(word_type &, element_index_type) override
Changes word in-place to contain a minimal word with respect to the short-lex ordering in the generat...
-
element_index_type prefix(element_index_type pos) const override
Returns the position of the prefix of the element x in position pos (of the semigroup) of length one ...
-
const_iterator_sorted cbegin_sorted()
Returns a const iterator pointing to the first element of the semigroup when the elements are sorted ...
-
element_index_type product_by_reduction(element_index_type, element_index_type) const override
Returns the position in this of the product of this->at(i) and this->at(j) by following a path in the...
-
bool is_idempotent(element_index_type) override
Returns true if the element in position pos is an idempotent and false if it is not.
-
void set_batch_size(size_t) noexcept override
Set a new value for the batch size.
-
element_index_type position(const_reference)
Returns the position of x in this, or FroidurePin::UNDEFINED if x is not an element of this...
-
const_reverse_iterator crend() const
Returns a const reverse iterator pointing to one before the first element of the semigroup.
-
element_index_type current_position(const_reference x) const
Returns the position of the element x in the semigroup if it is already known to belong to the semigr...
-
const_reference sorted_at(element_index_type)
Returns the element of the semigroup in position pos of the sorted array of elements, or nullptr in pos is not valid (i.e. too big).
-
letter_type final_letter(element_index_type pos) const override
Returns the last letter of the element in position pos.
-
void closure(TCollection const &coll)
Add copies of the non-redundant generators in coll to the generators of this.
-
element_type word_to_element(word_type const &) const
Returns a copy of the element of this represented by the word w.
-
void set_concurrency_threshold(size_t) noexcept override
Returns the current value of.
-
std::reverse_iterator< const_iterator > const_reverse_iterator
A type for const reverse iterators through the elements of this, in the reverse order of enumeration...
Definition: froidure-pin.hpp:840
-
element_index_type right(element_index_type, letter_type) override
Returns the index of the product of the element in position i with the generator with index j...
-
size_t concurrency_threshold() const noexcept override
Returns the current value of.
-
FroidurePin & operator=(FroidurePin const &semigroup)=delete
Deleted.
-
bool equal_to(word_type const &, word_type const &) const override
Returns true if the parameters represent the same element of the semigroup and false otherwise...
-
internal::iterator_base< internal_element_type, const_pointer, const_reference, element_type, iterator_methods > const_iterator
A type for const iterators through the elements of this, in the order they were enumerated (i...
Definition: froidure-pin.hpp:834
-
const_iterator_pair_first const_iterator_idempotents
A type for const iterators through the idempotents of this, in short-lex order.
Definition: froidure-pin.hpp:858
-
size_t length_const(element_index_type) const override
Returns the length of the element in position pos of the semigroup.
-
~FroidurePin()
A default destructor.
-
FroidurePin * copy_closure(TCollection const &)
Returns a new semigroup generated by this and copies of the non-redundant elements of coll...
-
void enumerate(size_t=LIMIT_MAX) override
Enumerate the semigroup until limit elements are found or killed is true.
-
element_index_type fast_product(element_index_type, element_index_type) const override
Returns the position in this of the product of this->at(i) and this->at(j).
-
size_t current_max_word_length() const noexcept override
Returns the maximum length of a word in the generators so far computed.
-
size_t current_size() const noexcept override
Returns the number of elements in the semigroup that have been enumerated so far. ...
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
const_reverse_iterator_sorted crbegin_sorted()
Returns a const iterator pointing to the last element of the semigroup when the elements are sorted b...
-
void next_relation(word_type &relation) override
This method changes relation in-place to contain the next relation of the presentation defining this...
-
const_iterator_sorted cend_sorted()
Returns a const iterator pointing to one past the last element of the semigroup when the elements are...
-
const_reverse_iterator_sorted crend_sorted()
Returns a const iterator pointing to one before the first element of the semigroup when the elements ...
-
const_reference operator[](element_index_type) const
Returns the element of the semigroup in position pos.
-
element_index_type position_to_sorted_position(element_index_type) override
Returns the position of this->at(pos) in the sorted array of elements of the semigroup, or FroidurePin::UNDEFINED if pos is greater than the size of the semigroup.
-
void reset_next_relation() noexcept override
This method resets FroidurePin::next_relation so that when it is next called the resulting relation i...
-
size_t letter_type
Type for the index of a generator of a semigroup.
Definition: types.hpp:50
-
void add_generator(element_type const &)
Add copies of the generators coll to the generators of this.
-
size_t nr_idempotents() override
Returns the total number of idempotents in the semigroup.
-
Class for semigroups generated by instances of Element.
Definition: froidure-pin.hpp:80
-
const_reference at(element_index_type)
Returns the element of the semigroup in position pos, or a nullptr if there is no such element...
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
void factorisation(word_type &, element_index_type) override
Changes word in-place to contain a word in the generators equal to the pos element of the semigroup...
-
FroidurePin(std::vector< element_type > const *)
Construct from generators.
-
const_reverse_iterator crbegin() const
Returns a const reverse iterator pointing to the last currently known element of the semigroup...
-
size_t degree() const noexcept override
Returns the degree of any (and all) Element&#39;s in the semigroup.
-
size_t current_nr_rules() const noexcept override
Returns the number of relations in the presentation for the semigroup that have been found so far...
-
size_t size() override
Returns the size of the semigroup.
-
FroidurePin * copy_add_generators(TCollection const &) const
Returns a new semigroup generated by this and coll.
-
const_iterator end() const
Returns a const iterator pointing to one past the last currently known element of the semigroup...
-
element_index_type suffix(element_index_type pos) const override
Returns the position of the suffix of the element x in position pos (of the semigroup) of length one ...
-
size_t max_threads() const noexcept override
Returns the current value of.
-
element_index_type word_to_pos(word_type const &) const override
Returns the position in the semigroup corresponding to the element represented by the word w...
-
const_iterator cend() const
Returns a const iterator pointing to one past the last currently known element of the semigroup...
-
element_index_type left(element_index_type, letter_type) override
Returns the index of the product of the generator with index j and the element in position i...
-
const_reference generator(letter_type) const
Returns a const reference to the generator with index pos.
-
const_iterator_pair_first const_iterator_sorted
A type for const iterators through the elements of this, sorted according to TTraits::less.
Definition: froidure-pin.hpp:846
-
size_t length_non_const(element_index_type) override
Returns the length of the element in position pos of the semigroup.
-
const_iterator_idempotents cend_idempotents()
Returns a const iterator referring to past the end of the last idempotent in the semigroup.
-
const_reverse_iterator_pair_first const_reverse_iterator_sorted
A type for const reverse iterators through the elements of this, sorted according to TTraits::less...
Definition: froidure-pin.hpp:852
-
const_reverse_iterator_pair_first const_reverse_iterator_idempotents
A type for reverse const iterators through the idempotents of this, in short-lex order.
Definition: froidure-pin.hpp:865
-
const_iterator_idempotents cbegin_idempotents()
Returns a const iterator pointing at the first idempotent in the semigroup.
-
letter_type first_letter(element_index_type pos) const override
Returns the first letter of the element in position pos.
-
void reserve(size_t) override
Requests that the capacity (i.e. number of elements) of the semigroup be at least enough to contain n...
-
size_t batch_size() const noexcept override
Returns the current value of the batch size. This is the minimum number of elements enumerated in any...
-
void set_max_threads(size_t) noexcept override
Set the maximum number of threads that any method of an instance of FroidurePin can use...
-
This file contains function templates for adapting a user-defined type so that it can be used with li...
-
size_t nr_generators() const noexcept override
Returns the number of generators of the semigroup.
-
- - - - diff --git a/functions.html b/functions.html deleted file mode 100644 index 1a52f2952..000000000 --- a/functions.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- _ -

-
- - - - diff --git a/functions_0x7e.html b/functions_0x7e.html deleted file mode 100644 index ec636d288..000000000 --- a/functions_0x7e.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- ~ -

-
- - - - diff --git a/functions_a.html b/functions_a.html deleted file mode 100644 index bba00ae33..000000000 --- a/functions_a.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- a -

-
- - - - diff --git a/functions_b.html b/functions_b.html deleted file mode 100644 index 6ea020db3..000000000 --- a/functions_b.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- b -

-
- - - - diff --git a/functions_c.html b/functions_c.html deleted file mode 100644 index 5db4503e4..000000000 --- a/functions_c.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- c -

-
- - - - diff --git a/functions_d.html b/functions_d.html deleted file mode 100644 index 0a2924134..000000000 --- a/functions_d.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- d -

-
- - - - diff --git a/functions_e.html b/functions_e.html deleted file mode 100644 index fac355ab9..000000000 --- a/functions_e.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- e -

-
- - - - diff --git a/functions_enum.html b/functions_enum.html deleted file mode 100644 index b20df04c7..000000000 --- a/functions_enum.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Enumerations - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
- - - - diff --git a/functions_eval.html b/functions_eval.html deleted file mode 100644 index bae4247fa..000000000 --- a/functions_eval.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Enumerator - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
- - - - diff --git a/functions_f.html b/functions_f.html deleted file mode 100644 index 4b03f51b1..000000000 --- a/functions_f.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- f -

-
- - - - diff --git a/functions_func.html b/functions_func.html deleted file mode 100644 index 8442063ad..000000000 --- a/functions_func.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- a -

-
- - - - diff --git a/functions_func_0x7e.html b/functions_func_0x7e.html deleted file mode 100644 index acbf9e6c2..000000000 --- a/functions_func_0x7e.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- ~ -

-
- - - - diff --git a/functions_func_b.html b/functions_func_b.html deleted file mode 100644 index 6d7f96a58..000000000 --- a/functions_func_b.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- b -

-
- - - - diff --git a/functions_func_c.html b/functions_func_c.html deleted file mode 100644 index e8d36c749..000000000 --- a/functions_func_c.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- c -

-
- - - - diff --git a/functions_func_d.html b/functions_func_d.html deleted file mode 100644 index 1c02c6a65..000000000 --- a/functions_func_d.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- d -

-
- - - - diff --git a/functions_func_e.html b/functions_func_e.html deleted file mode 100644 index 8e7e817bf..000000000 --- a/functions_func_e.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- e -

-
- - - - diff --git a/functions_func_f.html b/functions_func_f.html deleted file mode 100644 index 68b81b29b..000000000 --- a/functions_func_f.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- f -

-
- - - - diff --git a/functions_func_g.html b/functions_func_g.html deleted file mode 100644 index 223a57a9c..000000000 --- a/functions_func_g.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- g -

-
- - - - diff --git a/functions_func_h.html b/functions_func_h.html deleted file mode 100644 index ce899231c..000000000 --- a/functions_func_h.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- h -

-
- - - - diff --git a/functions_func_i.html b/functions_func_i.html deleted file mode 100644 index ca6c386ad..000000000 --- a/functions_func_i.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- i -

-
- - - - diff --git a/functions_func_k.html b/functions_func_k.html deleted file mode 100644 index d0ab777a9..000000000 --- a/functions_func_k.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- k -

-
- - - - diff --git a/functions_func_l.html b/functions_func_l.html deleted file mode 100644 index 44db7d5b6..000000000 --- a/functions_func_l.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- l -

-
- - - - diff --git a/functions_func_m.html b/functions_func_m.html deleted file mode 100644 index 12a2e3aad..000000000 --- a/functions_func_m.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- m -

-
- - - - diff --git a/functions_func_n.html b/functions_func_n.html deleted file mode 100644 index 2f91f5c13..000000000 --- a/functions_func_n.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- n -

-
- - - - diff --git a/functions_func_o.html b/functions_func_o.html deleted file mode 100644 index 7ad7153d9..000000000 --- a/functions_func_o.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- o -

-
- - - - diff --git a/functions_func_p.html b/functions_func_p.html deleted file mode 100644 index e58cd6729..000000000 --- a/functions_func_p.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- p -

-
- - - - diff --git a/functions_func_r.html b/functions_func_r.html deleted file mode 100644 index 6fa81deb7..000000000 --- a/functions_func_r.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- r -

-
- - - - diff --git a/functions_func_s.html b/functions_func_s.html deleted file mode 100644 index 11d6b0623..000000000 --- a/functions_func_s.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- s -

-
- - - - diff --git a/functions_func_t.html b/functions_func_t.html deleted file mode 100644 index 171874a63..000000000 --- a/functions_func_t.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- t -

-
- - - - diff --git a/functions_func_u.html b/functions_func_u.html deleted file mode 100644 index 790d647c1..000000000 --- a/functions_func_u.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- u -

-
- - - - diff --git a/functions_func_v.html b/functions_func_v.html deleted file mode 100644 index aaeb6dc4b..000000000 --- a/functions_func_v.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- v -

-
- - - - diff --git a/functions_func_w.html b/functions_func_w.html deleted file mode 100644 index 64475071f..000000000 --- a/functions_func_w.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- w -

-
- - - - diff --git a/functions_func_z.html b/functions_func_z.html deleted file mode 100644 index 5485f4c4a..000000000 --- a/functions_func_z.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- z -

-
- - - - diff --git a/functions_func_~.html b/functions_func_~.html deleted file mode 100644 index f358065c6..000000000 --- a/functions_func_~.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-  - -

- ~ -

-
- - - - diff --git a/functions_g.html b/functions_g.html deleted file mode 100644 index afe365784..000000000 --- a/functions_g.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- g -

-
- - - - diff --git a/functions_h.html b/functions_h.html deleted file mode 100644 index be3c449d2..000000000 --- a/functions_h.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- h -

-
- - - - diff --git a/functions_i.html b/functions_i.html deleted file mode 100644 index 4a9a900ff..000000000 --- a/functions_i.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- i -

-
- - - - diff --git a/functions_k.html b/functions_k.html deleted file mode 100644 index 62a5df4d6..000000000 --- a/functions_k.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- k -

-
- - - - diff --git a/functions_l.html b/functions_l.html deleted file mode 100644 index d1ce6b846..000000000 --- a/functions_l.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- l -

-
- - - - diff --git a/functions_m.html b/functions_m.html deleted file mode 100644 index 73a4742c4..000000000 --- a/functions_m.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- m -

-
- - - - diff --git a/functions_n.html b/functions_n.html deleted file mode 100644 index 29993c216..000000000 --- a/functions_n.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- n -

-
- - - - diff --git a/functions_o.html b/functions_o.html deleted file mode 100644 index d010020e1..000000000 --- a/functions_o.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- o -

-
- - - - diff --git a/functions_p.html b/functions_p.html deleted file mode 100644 index 1c3449dae..000000000 --- a/functions_p.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- p -

-
- - - - diff --git a/functions_r.html b/functions_r.html deleted file mode 100644 index dff8a2f47..000000000 --- a/functions_r.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- r -

-
- - - - diff --git a/functions_rela.html b/functions_rela.html deleted file mode 100644 index 361994b19..000000000 --- a/functions_rela.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Related Functions - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
- - - - diff --git a/functions_s.html b/functions_s.html deleted file mode 100644 index 4abe22dbb..000000000 --- a/functions_s.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- s -

-
- - - - diff --git a/functions_t.html b/functions_t.html deleted file mode 100644 index d3e87eb63..000000000 --- a/functions_t.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- t -

-
- - - - diff --git a/functions_type.html b/functions_type.html deleted file mode 100644 index 137f9e9be..000000000 --- a/functions_type.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Typedefs - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
- - - - diff --git a/functions_u.html b/functions_u.html deleted file mode 100644 index 3c007c304..000000000 --- a/functions_u.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- u -

-
- - - - diff --git a/functions_v.html b/functions_v.html deleted file mode 100644 index cb49380fa..000000000 --- a/functions_v.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- v -

-
- - - - diff --git a/functions_vars.html b/functions_vars.html deleted file mode 100644 index 2d4fb5bd0..000000000 --- a/functions_vars.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -libsemigroups: Class Members - Variables - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
- - - - diff --git a/functions_w.html b/functions_w.html deleted file mode 100644 index 836c809a1..000000000 --- a/functions_w.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- w -

-
- - - - diff --git a/functions_z.html b/functions_z.html deleted file mode 100644 index 3349c82be..000000000 --- a/functions_z.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- z -

-
- - - - diff --git a/functions_~.html b/functions_~.html deleted file mode 100644 index 49d3af079..000000000 --- a/functions_~.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -libsemigroups: Class Members - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- ~ -

-
- - - - diff --git a/graph_legend.html b/graph_legend.html deleted file mode 100644 index ae473acd4..000000000 --- a/graph_legend.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -libsemigroups: Graph Legend - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Graph Legend
-
-
-

This page explains how to interpret the graphs that are generated by doxygen.

-

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };
/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };
/* Class not documented with doxygen comments */
class Undocumented { };
/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };
/*! A template class */
template<class T> class Templ { };
/*! Class that is inherited using protected inheritance */
class ProtectedBase { };
/*! Class that is inherited using private inheritance */
class PrivateBase { };
/*! Class that is used by the Inherited class */
class Used { };
/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
protected ProtectedBase,
private PrivateBase,
public Undocumented,
public Templ<int>
{
private:
Used *m_usedClass;
};

This will result in the following graph:

-
- -
-

The boxes in the above graph have the following meaning:

- -

The arrows have the following meaning:

- -
- - - - diff --git a/graph_legend.md5 b/graph_legend.md5 deleted file mode 100644 index b6f44f51a..000000000 --- a/graph_legend.md5 +++ /dev/null @@ -1 +0,0 @@ -bc590f7814d4a5928660b951f90bd59b \ No newline at end of file diff --git a/graph_legend.png b/graph_legend.png deleted file mode 100644 index 881e40f9c..000000000 Binary files a/graph_legend.png and /dev/null differ diff --git a/hierarchy.html b/hierarchy.html deleted file mode 100644 index 21f3d3b9d..000000000 --- a/hierarchy.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - -libsemigroups: Class Hierarchy - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class Hierarchy
-
-
-
-

Go to the graphical class hierarchy

-This inheritance list is sorted roughly, but not completely, alphabetically:
-
[detail level 123456]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Clibsemigroups::BlocksClass for signed partitions of the set \(\{0, \ldots, n - 1\}\)
 Clibsemigroups::CongruenceClass for congruence on a semigroup or fintely presented semigroup
 Clibsemigroups::ElementAbstract base class for semigroup elements
 Clibsemigroups::ElementWithVectorData< bool, BooleanMat >
 Clibsemigroups::ElementWithVectorDataDefaultHash< bool, BooleanMat >
 Clibsemigroups::MatrixOverSemiringBase< bool, BooleanMat >
 Clibsemigroups::BooleanMatMatrices over the boolean semiring
 Clibsemigroups::ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >
 Clibsemigroups::ElementWithVectorDataDefaultHash< int64_t, ProjectiveMaxPlusMatrix >
 Clibsemigroups::MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >
 Clibsemigroups::ProjectiveMaxPlusMatrixClass for projective max-plus matrices
 Clibsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR >
 Clibsemigroups::PBRClass for partitioned binary relations (PBR)
 Clibsemigroups::ElementWithVectorData< T, PartialPerm< T > >
 Clibsemigroups::ElementWithVectorDataDefaultHash< T, PartialPerm< T > >
 Clibsemigroups::PartialTransformation< T, PartialPerm< T > >
 Clibsemigroups::PartialPerm< T >Template class for partial permutations
 Clibsemigroups::ElementWithVectorData< T, Transformation< T > >
 Clibsemigroups::ElementWithVectorDataDefaultHash< T, Transformation< T > >
 Clibsemigroups::PartialTransformation< T, Transformation< T > >
 Clibsemigroups::Transformation< T >Template class for transformations
 Clibsemigroups::Permutation< T >Template class for permutations
 Clibsemigroups::ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >
 Clibsemigroups::ElementWithVectorDataDefaultHash< TValueType, MatrixOverSemiring< TValueType > >
 Clibsemigroups::MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >
 Clibsemigroups::MatrixOverSemiring< TValueType >Matrices over a semiring
 Clibsemigroups::ElementWithVectorData< u_int32_t, Bipartition >
 Clibsemigroups::ElementWithVectorDataDefaultHash< u_int32_t, Bipartition >
 Clibsemigroups::BipartitionClass for bipartitions
 Clibsemigroups::ElementWithVectorData< TValueType, TSubclass >Abstract base class for elements using a vector to store their defining data
 Clibsemigroups::ElementWithVectorDataDefaultHash< TValueType, TSubclass >Abstract base class for elements using a vector to store their defining data and the default hash function for that underlying vector
 Clibsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >Matrices over a semiring
 Clibsemigroups::PartialTransformation< TValueType, TSubclass >Abstract class for partial transformations
 Clibsemigroups::RWSESubclass of Element that wraps an libsemigroups::rws_word_t
 Clibsemigroups::Element::EqualProvides a call operator for comparing Elements via pointers
 Clibsemigroups::Element::HashProvides a call operator returning a hash value for an Element via a pointer
 Clibsemigroups::Partition< T >Class for partitions of a set used by Congruence::nontrivial_classes
 Clibsemigroups::ReductionOrderingThis class provides a call operator which can be used to compare libsemigroups::rws_word_t
 Clibsemigroups::SHORTLEXThis class implements the shortlex reduction ordering derived from an ordering on libsemigroups::rws_letter_t's
 Clibsemigroups::RWSThis class is used to represent a string rewriting system defining a finitely presented monoid or semigroup
 Clibsemigroups::SemigroupClass for semigroups generated by instances of Element
 Clibsemigroups::Semiring< T >This class its subclasses provide very basic functionality for creating semirings
 Clibsemigroups::Semiring< bool >
 Clibsemigroups::BooleanSemiringThe usual Boolean semiring
 Clibsemigroups::Semiring< int64_t >
 Clibsemigroups::IntegersThe usual ring of integers
 Clibsemigroups::MaxPlusSemiringThe max-plus semiring consists of the integers together with negative infinity with operations max and plus. Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY
 Clibsemigroups::MinPlusSemiringThe min-plus semiring consists of the integers together with infinity with operations min and plus. Infinity is represented by Semiring<int64_t>::INFTY
 Clibsemigroups::SemiringWithThresholdThis abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring
 Clibsemigroups::NaturalSemiringThis class implements the semiring consisting of \(\{0, 1, ..., t, t + 1, ..., t + p - 1\}\) for some threshold \(t\) and period \(p\) with operations addition and multiplication modulo the congruence \(t = t + p\)
 Clibsemigroups::TropicalMaxPlusSemiringThe tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\infty\). Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY
 Clibsemigroups::TropicalMinPlusSemiringThe tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\infty\). Infinity is represented by Semiring<int64_t>::INFTY
 Clibsemigroups::Semiring< TValueType >
-
-
- - - - diff --git a/hpcombi_8hpp_source.html b/hpcombi_8hpp_source.html deleted file mode 100644 index dfe937d4d..000000000 --- a/hpcombi_8hpp_source.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: include/hpcombi.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
hpcombi.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains specializations of the class adapters in adapters.hpp
20 // for the element types in HPCombi.
21 
22 #ifndef LIBSEMIGROUPS_INCLUDE_HPCOMBI_HPP_
23 #define LIBSEMIGROUPS_INCLUDE_HPCOMBI_HPP_
24 
25 // Must include libsemigroups-config.hpp so that LIBSEMIGROUPS_HPCOMBI is
26 // defined, if so specified at during configure.
27 #include "libsemigroups-config.hpp"
28 
29 #ifdef LIBSEMIGROUPS_HPCOMBI
30 
31 #include "extern/HPCombi/include/hpcombi.hpp"
32 
33 #include "adapters.hpp"
34 
35 namespace libsemigroups {
36  using PTransf16 = HPCombi::PTransf16;
37 
38  template <class TPTransf16Subclass>
39  struct complexity<
40  TPTransf16Subclass,
41  typename std::enable_if<
42  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
43  constexpr size_t operator()(TPTransf16Subclass const&) const noexcept {
44  return 0;
45  }
46  };
47 
48  template <class TPTransf16Subclass>
49  struct degree<
50  TPTransf16Subclass,
51  typename std::enable_if<
52  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
53  constexpr size_t operator()(TPTransf16Subclass const&) const noexcept {
54  return 16;
55  }
56  };
57 
58  template <class TPTransf16Subclass>
59  struct less<
60  TPTransf16Subclass,
61  typename std::enable_if<
62  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
63  bool operator()(TPTransf16Subclass const& x,
64  TPTransf16Subclass const& y) const noexcept {
65  return x < y;
66  }
67  };
68 
69  template <class TPTransf16Subclass>
70  struct one<TPTransf16Subclass,
71  typename std::enable_if<
72  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
73  TPTransf16Subclass operator()(size_t = 0) const noexcept {
74  return TPTransf16Subclass::one();
75  }
76 
77  TPTransf16Subclass operator()(TPTransf16Subclass const&) const noexcept {
78  return TPTransf16Subclass::one();
79  }
80  };
81 
82  // Note that HPCombi implements composition of functions from left to right,
83  // whereas libsemigroups assumes composition is right to left.
84  template <class TPTransf16Subclass>
85  struct product<
86  TPTransf16Subclass,
87  typename std::enable_if<
88  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
89  void operator()(TPTransf16Subclass& xy,
90  TPTransf16Subclass const& x,
91  TPTransf16Subclass const& y,
92  size_t = 0) const noexcept {
93  xy = y * x;
94  }
95  };
96 
97  template <class TPTransf16Subclass>
98  struct swap<
99  TPTransf16Subclass,
100  typename std::enable_if<
101  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
102  void operator()(TPTransf16Subclass& x, TPTransf16Subclass& y) const
103  noexcept {
104  std::swap(x, y);
105  }
106  };
107 
108 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
109  template <class TPTransf16Subclass>
110  struct empty_key<
111  TPTransf16Subclass,
112  typename std::enable_if<
113  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
114  TPTransf16Subclass operator()(TPTransf16Subclass const&) const noexcept {
115  return {FE, FE, FE, FE, FE, FE, FE, FE, FE, FE, FE, FE, FE, FE, FE, FE};
116  }
117  };
118 #endif
119 
120  // FIXME should only be for Perm16's
121  template <class TPTransf16Subclass, typename TValueType>
122  struct action<
123  TPTransf16Subclass,
124  TValueType,
125  typename std::enable_if<
126  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
127  TValueType operator()(TPTransf16Subclass x, TValueType i) const noexcept {
128  return x[i];
129  }
130  };
131 
132  // FIXME should only be for Perm16's
133  template <class TPTransf16Subclass>
134  struct inverse<
135  TPTransf16Subclass,
136  typename std::enable_if<
137  std::is_base_of<PTransf16, TPTransf16Subclass>::value>::type> {
138  TPTransf16Subclass operator()(TPTransf16Subclass const& x) const noexcept {
139  return x.inverse();
140  }
141  };
142 
143  template <typename TIntType>
144  struct on_points<HPCombi::Perm16, TIntType> {
145  void operator()(TIntType& res,
146  TIntType const& pt,
147  HPCombi::Perm16 const& p) const noexcept {
148  LIBSEMIGROUPS_ASSERT(pt < 16);
149  res = static_cast<TIntType>(p[pt]);
150  }
151  };
152 
153  template <>
154  struct right_action<HPCombi::PPerm16, HPCombi::PPerm16> {
155  void operator()(HPCombi::PPerm16& res,
156  HPCombi::PPerm16 const& pt,
157  HPCombi::PPerm16 const& x) const noexcept {
158  res = (x * pt).left_one();
159  }
160  };
161 
162  template <>
163  struct left_action<HPCombi::PPerm16, HPCombi::PPerm16> {
164  void operator()(HPCombi::PPerm16& res,
165  HPCombi::PPerm16 const& pt,
166  HPCombi::PPerm16 const& x) const noexcept {
167  res = (pt * x).right_one();
168  }
169  };
170 } // namespace libsemigroups
171 
172 #endif // LIBSEMIGROUPS_HPCOMBI
173 #endif // LIBSEMIGROUPS_INCLUDE_HPCOMBI_HPP_
Definition: kbe.hpp:198
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
This file contains function templates for adapting a user-defined type so that it can be used with li...
-
- - - - diff --git a/index.html b/index.html index 7f33da822..90c7f2abf 100644 --- a/index.html +++ b/index.html @@ -1,135 +1,19 @@ - - - - - - - -libsemigroups: libsemigroups - C++ library for semigroups and monoids - Version 0.6.7 - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
libsemigroups - C++ library for semigroups and monoids - Version 0.6.7
-
-
-

by J. D. Mitchell and M. Torpey with contributions by J. Jonusas, D. V. Pasechnik, and N. Thiery

-

The current version of libsemigroups is 0.6.7.

-

libsemigroups is a C++ library for semigroups and monoids using C++11; it is partly based on Algorithms for computing finite semigroups, Expository Slides, and Semigroupe 2.01 by Jean-Eric Pin. libsemigroups uses catch for its unit tests.

-

The libsemigroups library is used in the Semigroups package for GAP. The development version is available on Github, and there are python bindings (for Python 2 and 3).

-

Some of the features of Semigroupe 2.01 are not yet implemented in libsemigroups, this is a work in progress. Missing features include those for:

-
    -
  • Green's relations, or classes
  • -
  • finding a zero
  • -
  • minimal ideal, principal left/right ideals, or indeed any ideals
  • -
  • inverses
  • -
  • local submonoids
  • -
  • the kernel
  • -
  • variety tests.
  • -
-

These will be included in a future version.

-

libsemigroups performs roughly the same as Semigroupe 2.01 when there is a known upper bound on the size of the semigroup being enumerated, and this is used to initialise the data structures for the semigroup; see libsemigroups::Semigroup::reserve for more details. Note that in Semigroupe 2.01 it is always necessary to provide such an upper bound, but in libsemigroups it is not.

-

libsemigroups also has some advantages over Semigroupe 2.01:

-
    -
  • there is a (hopefully) convenient C++ API, which makes it relatively easy to create and manipulate semigroups and monoids
  • -
  • there are some multithreaded methods for semigroups and their congruences
  • -
  • you do not have to know/guess the size of a semigroup or monoid before you begin
  • -
  • libsemigroups supports more types of elements than Semigroupe 2.01
  • -
  • it is relatively straightforward to add support for further types of elements and semigroups
  • -
  • it is possible to enumerate a certain number of elements of a semigroup or monoid (say if you are looking for an element with a particular property), to stop, and then to start the enumeration again at a later point
  • -
  • you can instantiate as many semigroups and monoids as you can fit in memory
  • -
  • it is possible to add more generators after a semigroup or monoid has been constructed, without losing or having to recompute any information that was previously known
  • -
  • libsemigroups contains rudimentary implementations of the Todd-Coxeter and Knuth-Bendix algorithms for finitely presented semigroups, which can also be used to compute congruences of a (not necessarily finitely presented) semigroup or monoid.
  • -
-

Installation

-

Installing with conda

-

This installation method assumes that you have anaconda or miniconda installed. See the getting started and miniconda download page on the conda website.

-

Activate the conda-forge package repository:

conda config --add channels conda-forge
-

Install libsemigroups

conda install libsemigroups
-

From the sources

-

libsemigroups requires a C++ compiler supporting the C++11 standard. To install libsemigroups from the sources (this also requires autoconf and automake):

git clone https://github.com/james-d-mitchell/libsemigroups
-cd libsemigroups
-./autogen.sh && ./configure && make && sudo make install
-

To enable assertions and other debugging checks enabled do:

./autogen.sh && ./configure --enable-debug && make && sudo make install
-

By default, make install installs the library and its pkg-config configuration into /usr/local. One can also specify another install location, say, /foo/bar, by calling ./configure with parameter --prefix, e.g. ./configure --prefix=/foo/bar. This might be useful if sudo is not available.

-

If you have pkg-config installed, it may be called to get libsemigroups's version, location, etc (see its docs for details; this facility is used in GAP package Semigroups, which may be configured to use the external libsemigroups). E.g.

pkg-config --modversion libsemigroups
-

will print the version of the installed libsemigroups, provided it is scanning configurations in the install location. For installation location unknown to pkg-config, one needs to add it to PKG_CONFIG_PATH (an environment variable). E.g. if it is /foo/bar as above then

PKG_CONFIG_PATH=/foo/bar/lib/pkgconfig pkg-config --modversion libsemigroups
-

will print the version of the installed libsemigroups. (As usual, PKG_CONFIG_PATH may be exported, added to shell configuration, etc.)

-

Documentation

-

The documentation is generated using doxygen and is available here. This documentation can be compiled by running ./autogen.sh && ./configure && make doc in the libsemigroups directory, and the tests can be run by doing make check in the libsemigroups directory.

-

Python bindings

-

There are python bindings (for Python 2 and 3) for most of the functionality of libsemigroups.

-

Issues

-

If you find any problems with libsemigroups, or have any suggestions for features that you'd like to see, please use the issue tracker.

-

Acknowledgements

-

We acknowledge financial support from the OpenDreamKit Horizon 2020 European Research Infrastructures project (#676541) (primarily for the python bindings).

-

We thank the Carnegie Trust for the Universities of Scotland for funding the PhD scholarship of J. JonusÌŒas when he worked on this project.

-

We thank the Engineering and Physical Sciences Research Council (EPSRC) for funding the PhD scholarship of M. Torpey when he worked on this project (EP/M506631/1).

-
-
- - - + + + + + + + Redirecting... + + + This page has moved to + + https://libsemigroups.readthedocs.io/en/latest/. + + diff --git a/inherit_graph_0.map b/inherit_graph_0.map deleted file mode 100644 index 6ce14d955..000000000 --- a/inherit_graph_0.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_0.md5 b/inherit_graph_0.md5 deleted file mode 100644 index 560ba9229..000000000 --- a/inherit_graph_0.md5 +++ /dev/null @@ -1 +0,0 @@ -a04415819b0d217810f1e6646dd207c6 \ No newline at end of file diff --git a/inherit_graph_0.png b/inherit_graph_0.png deleted file mode 100644 index 57f246f5c..000000000 Binary files a/inherit_graph_0.png and /dev/null differ diff --git a/inherit_graph_1.map b/inherit_graph_1.map deleted file mode 100644 index 36db2758b..000000000 --- a/inherit_graph_1.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_1.md5 b/inherit_graph_1.md5 deleted file mode 100644 index cd8208ed0..000000000 --- a/inherit_graph_1.md5 +++ /dev/null @@ -1 +0,0 @@ -0340dd4db907725ac9477d09608f2208 \ No newline at end of file diff --git a/inherit_graph_1.png b/inherit_graph_1.png deleted file mode 100644 index 85361b021..000000000 Binary files a/inherit_graph_1.png and /dev/null differ diff --git a/inherit_graph_10.map b/inherit_graph_10.map deleted file mode 100644 index 664f137c4..000000000 --- a/inherit_graph_10.map +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/inherit_graph_10.md5 b/inherit_graph_10.md5 deleted file mode 100644 index fb5a350f2..000000000 --- a/inherit_graph_10.md5 +++ /dev/null @@ -1 +0,0 @@ -3b44d49d95747de96ba0178342ac202b \ No newline at end of file diff --git a/inherit_graph_10.png b/inherit_graph_10.png deleted file mode 100644 index 7b6ef0f1d..000000000 Binary files a/inherit_graph_10.png and /dev/null differ diff --git a/inherit_graph_11.map b/inherit_graph_11.map deleted file mode 100644 index eca7839a0..000000000 --- a/inherit_graph_11.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_11.md5 b/inherit_graph_11.md5 deleted file mode 100644 index 135710514..000000000 --- a/inherit_graph_11.md5 +++ /dev/null @@ -1 +0,0 @@ -030c0fc84dfd88f803b5370dce1a6c9a \ No newline at end of file diff --git a/inherit_graph_11.png b/inherit_graph_11.png deleted file mode 100644 index ebdd4b0c4..000000000 Binary files a/inherit_graph_11.png and /dev/null differ diff --git a/inherit_graph_12.map b/inherit_graph_12.map deleted file mode 100644 index 14c57cda5..000000000 --- a/inherit_graph_12.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_12.md5 b/inherit_graph_12.md5 deleted file mode 100644 index fd593a7a7..000000000 --- a/inherit_graph_12.md5 +++ /dev/null @@ -1 +0,0 @@ -5248d0950fab560dd2ea66909d670920 \ No newline at end of file diff --git a/inherit_graph_12.png b/inherit_graph_12.png deleted file mode 100644 index 71787a7d7..000000000 Binary files a/inherit_graph_12.png and /dev/null differ diff --git a/inherit_graph_13.map b/inherit_graph_13.map deleted file mode 100644 index e237c77be..000000000 --- a/inherit_graph_13.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/inherit_graph_13.md5 b/inherit_graph_13.md5 deleted file mode 100644 index 12fe8c4b5..000000000 --- a/inherit_graph_13.md5 +++ /dev/null @@ -1 +0,0 @@ -d712bd46aa1f752961bde8427ad8db62 \ No newline at end of file diff --git a/inherit_graph_13.png b/inherit_graph_13.png deleted file mode 100644 index eba9dfc2b..000000000 Binary files a/inherit_graph_13.png and /dev/null differ diff --git a/inherit_graph_14.map b/inherit_graph_14.map deleted file mode 100644 index 9b517d851..000000000 --- a/inherit_graph_14.map +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/inherit_graph_14.md5 b/inherit_graph_14.md5 deleted file mode 100644 index 781fe9d50..000000000 --- a/inherit_graph_14.md5 +++ /dev/null @@ -1 +0,0 @@ -b6516a5e34b33a82c60f798b50d0302c \ No newline at end of file diff --git a/inherit_graph_14.png b/inherit_graph_14.png deleted file mode 100644 index 7b6ef0f1d..000000000 Binary files a/inherit_graph_14.png and /dev/null differ diff --git a/inherit_graph_15.map b/inherit_graph_15.map deleted file mode 100644 index 013b51388..000000000 --- a/inherit_graph_15.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_15.md5 b/inherit_graph_15.md5 deleted file mode 100644 index 8bd4f0162..000000000 --- a/inherit_graph_15.md5 +++ /dev/null @@ -1 +0,0 @@ -21cadb8f8bfbc6892e471ff7dbaf11de \ No newline at end of file diff --git a/inherit_graph_15.png b/inherit_graph_15.png deleted file mode 100644 index ebdd4b0c4..000000000 Binary files a/inherit_graph_15.png and /dev/null differ diff --git a/inherit_graph_16.map b/inherit_graph_16.map deleted file mode 100644 index 951b3a11b..000000000 --- a/inherit_graph_16.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_16.md5 b/inherit_graph_16.md5 deleted file mode 100644 index 6a9ad3add..000000000 --- a/inherit_graph_16.md5 +++ /dev/null @@ -1 +0,0 @@ -3a0fe23a7b29cda8206ff5a4b0e8c52b \ No newline at end of file diff --git a/inherit_graph_16.png b/inherit_graph_16.png deleted file mode 100644 index 71787a7d7..000000000 Binary files a/inherit_graph_16.png and /dev/null differ diff --git a/inherit_graph_17.map b/inherit_graph_17.map deleted file mode 100644 index faa503fa9..000000000 --- a/inherit_graph_17.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_17.md5 b/inherit_graph_17.md5 deleted file mode 100644 index 55d75a4de..000000000 --- a/inherit_graph_17.md5 +++ /dev/null @@ -1 +0,0 @@ -511816c646feffa0a05f13bed334466d \ No newline at end of file diff --git a/inherit_graph_17.png b/inherit_graph_17.png deleted file mode 100644 index 5e5625355..000000000 Binary files a/inherit_graph_17.png and /dev/null differ diff --git a/inherit_graph_18.map b/inherit_graph_18.map deleted file mode 100644 index 7397fa764..000000000 --- a/inherit_graph_18.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_18.md5 b/inherit_graph_18.md5 deleted file mode 100644 index e1803de85..000000000 --- a/inherit_graph_18.md5 +++ /dev/null @@ -1 +0,0 @@ -e8c84f6ff9b10b639739b05fc5f517bb \ No newline at end of file diff --git a/inherit_graph_18.png b/inherit_graph_18.png deleted file mode 100644 index 397d30b29..000000000 Binary files a/inherit_graph_18.png and /dev/null differ diff --git a/inherit_graph_19.map b/inherit_graph_19.map deleted file mode 100644 index 0a50691fe..000000000 --- a/inherit_graph_19.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_19.md5 b/inherit_graph_19.md5 deleted file mode 100644 index 6bd308052..000000000 --- a/inherit_graph_19.md5 +++ /dev/null @@ -1 +0,0 @@ -f160b298e7a069103b9bbcf6614de0f3 \ No newline at end of file diff --git a/inherit_graph_19.png b/inherit_graph_19.png deleted file mode 100644 index ba2faced0..000000000 Binary files a/inherit_graph_19.png and /dev/null differ diff --git a/inherit_graph_2.map b/inherit_graph_2.map deleted file mode 100644 index 93173dd42..000000000 --- a/inherit_graph_2.map +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/inherit_graph_2.md5 b/inherit_graph_2.md5 deleted file mode 100644 index dc4963485..000000000 --- a/inherit_graph_2.md5 +++ /dev/null @@ -1 +0,0 @@ -9ca77611430d7bf3084545fd4faf4b9c \ No newline at end of file diff --git a/inherit_graph_2.png b/inherit_graph_2.png deleted file mode 100644 index d647a06f1..000000000 Binary files a/inherit_graph_2.png and /dev/null differ diff --git a/inherit_graph_20.map b/inherit_graph_20.map deleted file mode 100644 index 582bd945c..000000000 --- a/inherit_graph_20.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/inherit_graph_20.md5 b/inherit_graph_20.md5 deleted file mode 100644 index b2b8bfb07..000000000 --- a/inherit_graph_20.md5 +++ /dev/null @@ -1 +0,0 @@ -372e590a5d5f01d9fc865eb99cc89533 \ No newline at end of file diff --git a/inherit_graph_20.png b/inherit_graph_20.png deleted file mode 100644 index 6e7a6f9e5..000000000 Binary files a/inherit_graph_20.png and /dev/null differ diff --git a/inherit_graph_21.map b/inherit_graph_21.map deleted file mode 100644 index db4d45485..000000000 --- a/inherit_graph_21.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_21.md5 b/inherit_graph_21.md5 deleted file mode 100644 index 8f19fbbb9..000000000 --- a/inherit_graph_21.md5 +++ /dev/null @@ -1 +0,0 @@ -0be83d95758e9dd8027bb422ae4d113b \ No newline at end of file diff --git a/inherit_graph_21.png b/inherit_graph_21.png deleted file mode 100644 index 7e63008e4..000000000 Binary files a/inherit_graph_21.png and /dev/null differ diff --git a/inherit_graph_22.map b/inherit_graph_22.map deleted file mode 100644 index 919faa3cf..000000000 --- a/inherit_graph_22.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_22.md5 b/inherit_graph_22.md5 deleted file mode 100644 index 5ad038ef5..000000000 --- a/inherit_graph_22.md5 +++ /dev/null @@ -1 +0,0 @@ -a2fbe97361a9df5414145c14f850291a \ No newline at end of file diff --git a/inherit_graph_22.png b/inherit_graph_22.png deleted file mode 100644 index bcf359211..000000000 Binary files a/inherit_graph_22.png and /dev/null differ diff --git a/inherit_graph_23.map b/inherit_graph_23.map deleted file mode 100644 index f77e099fc..000000000 --- a/inherit_graph_23.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_23.md5 b/inherit_graph_23.md5 deleted file mode 100644 index 536ffd7b3..000000000 --- a/inherit_graph_23.md5 +++ /dev/null @@ -1 +0,0 @@ -75f463d7f8203a073774358386d2180f \ No newline at end of file diff --git a/inherit_graph_23.png b/inherit_graph_23.png deleted file mode 100644 index f45d446bc..000000000 Binary files a/inherit_graph_23.png and /dev/null differ diff --git a/inherit_graph_24.map b/inherit_graph_24.map deleted file mode 100644 index a4b4e39b0..000000000 --- a/inherit_graph_24.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_24.md5 b/inherit_graph_24.md5 deleted file mode 100644 index 20eb23742..000000000 --- a/inherit_graph_24.md5 +++ /dev/null @@ -1 +0,0 @@ -ba2cf3313f2a3d19ddd2b569a79dcfe2 \ No newline at end of file diff --git a/inherit_graph_24.png b/inherit_graph_24.png deleted file mode 100644 index ab9f1d961..000000000 Binary files a/inherit_graph_24.png and /dev/null differ diff --git a/inherit_graph_25.map b/inherit_graph_25.map deleted file mode 100644 index 50f9e08e4..000000000 --- a/inherit_graph_25.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_25.md5 b/inherit_graph_25.md5 deleted file mode 100644 index ade4a1f68..000000000 --- a/inherit_graph_25.md5 +++ /dev/null @@ -1 +0,0 @@ -b994fc9bbbf4514d8c19c9dd3e551615 \ No newline at end of file diff --git a/inherit_graph_25.png b/inherit_graph_25.png deleted file mode 100644 index 6d8dfb5a5..000000000 Binary files a/inherit_graph_25.png and /dev/null differ diff --git a/inherit_graph_3.map b/inherit_graph_3.map deleted file mode 100644 index bbd95e7c5..000000000 --- a/inherit_graph_3.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_3.md5 b/inherit_graph_3.md5 deleted file mode 100644 index 6d72f55f5..000000000 --- a/inherit_graph_3.md5 +++ /dev/null @@ -1 +0,0 @@ -0aeeb1151cee269bfc41faa585d9a77a \ No newline at end of file diff --git a/inherit_graph_3.png b/inherit_graph_3.png deleted file mode 100644 index 49ec549ea..000000000 Binary files a/inherit_graph_3.png and /dev/null differ diff --git a/inherit_graph_4.map b/inherit_graph_4.map deleted file mode 100644 index fd976b364..000000000 --- a/inherit_graph_4.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_4.md5 b/inherit_graph_4.md5 deleted file mode 100644 index 168e967f9..000000000 --- a/inherit_graph_4.md5 +++ /dev/null @@ -1 +0,0 @@ -31b9ed44ea58003fdd883067aadfce76 \ No newline at end of file diff --git a/inherit_graph_4.png b/inherit_graph_4.png deleted file mode 100644 index c507480c0..000000000 Binary files a/inherit_graph_4.png and /dev/null differ diff --git a/inherit_graph_5.map b/inherit_graph_5.map deleted file mode 100644 index 99008c8a7..000000000 --- a/inherit_graph_5.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_5.md5 b/inherit_graph_5.md5 deleted file mode 100644 index 843f13b45..000000000 --- a/inherit_graph_5.md5 +++ /dev/null @@ -1 +0,0 @@ -2766bdbca67c11f3357a7ed5e9149db4 \ No newline at end of file diff --git a/inherit_graph_5.png b/inherit_graph_5.png deleted file mode 100644 index af33b1ff9..000000000 Binary files a/inherit_graph_5.png and /dev/null differ diff --git a/inherit_graph_6.map b/inherit_graph_6.map deleted file mode 100644 index ce0d49d58..000000000 --- a/inherit_graph_6.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/inherit_graph_6.md5 b/inherit_graph_6.md5 deleted file mode 100644 index 294e2ae1b..000000000 --- a/inherit_graph_6.md5 +++ /dev/null @@ -1 +0,0 @@ -0fd50c9ab5eccfca80df650bd5c66a62 \ No newline at end of file diff --git a/inherit_graph_6.png b/inherit_graph_6.png deleted file mode 100644 index f3bc4cd3b..000000000 Binary files a/inherit_graph_6.png and /dev/null differ diff --git a/inherit_graph_7.map b/inherit_graph_7.map deleted file mode 100644 index e1194f44d..000000000 --- a/inherit_graph_7.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_7.md5 b/inherit_graph_7.md5 deleted file mode 100644 index 519c9fbac..000000000 --- a/inherit_graph_7.md5 +++ /dev/null @@ -1 +0,0 @@ -1ecc7486445077877fa2389fd65b3000 \ No newline at end of file diff --git a/inherit_graph_7.png b/inherit_graph_7.png deleted file mode 100644 index d59d11de3..000000000 Binary files a/inherit_graph_7.png and /dev/null differ diff --git a/inherit_graph_8.map b/inherit_graph_8.map deleted file mode 100644 index 9be648ef3..000000000 --- a/inherit_graph_8.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/inherit_graph_8.md5 b/inherit_graph_8.md5 deleted file mode 100644 index a28012f51..000000000 --- a/inherit_graph_8.md5 +++ /dev/null @@ -1 +0,0 @@ -4f394d881071e5bdec14c7dd1697a27d \ No newline at end of file diff --git a/inherit_graph_8.png b/inherit_graph_8.png deleted file mode 100644 index c41d1b74e..000000000 Binary files a/inherit_graph_8.png and /dev/null differ diff --git a/inherit_graph_9.map b/inherit_graph_9.map deleted file mode 100644 index ec74a153e..000000000 --- a/inherit_graph_9.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/inherit_graph_9.md5 b/inherit_graph_9.md5 deleted file mode 100644 index 644ce2632..000000000 --- a/inherit_graph_9.md5 +++ /dev/null @@ -1 +0,0 @@ -5b593758470161b6ab1be92e79c49f05 \ No newline at end of file diff --git a/inherit_graph_9.png b/inherit_graph_9.png deleted file mode 100644 index eba9dfc2b..000000000 Binary files a/inherit_graph_9.png and /dev/null differ diff --git a/inherits.html b/inherits.html deleted file mode 100644 index 8bb537f94..000000000 --- a/inherits.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -libsemigroups: Class Hierarchy - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Class Hierarchy
-
-
- - - - - - - - - - - - - - -
- - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - -
- - - -
- - - - -
- - - -
- - - -
- - - - -
- - - - - - - - - - -
- - - -
- - - -
-
- - - - diff --git a/iterator_8hpp_source.html b/iterator_8hpp_source.html deleted file mode 100644 index ac9e130dd..000000000 --- a/iterator_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/iterator.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
iterator.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef LIBSEMIGROUPS_INCLUDE_ITERATOR_HPP_
20 #define LIBSEMIGROUPS_INCLUDE_ITERATOR_HPP_
21 
22 #include <vector>
23 
24 namespace libsemigroups {
25  namespace internal {
26  template <typename TInternalIteratorType,
27  typename TExternalValueType,
28  typename TExternalConstPointer,
29  typename TExternalConstReference>
30  class const_iterator_base {
31  using internal_value_type = typename TInternalIteratorType::value_type;
32 
33  public:
34  using size_type = size_t;
35  using difference_type = typename TInternalIteratorType::difference_type;
36  using const_pointer = TExternalConstPointer;
37  using pointer = TExternalConstPointer;
38  using const_reference = TExternalConstReference;
39  using reference = TExternalConstReference;
40  using value_type = TExternalValueType;
41  using iterator_category = std::random_access_iterator_tag;
42 
43  explicit const_iterator_base(TInternalIteratorType it_vec)
44  : _it_vec(it_vec) {}
45 
46  const_iterator_base(const_iterator_base const& that)
47  : const_iterator_base(that._it_vec) {}
48 
49  virtual ~const_iterator_base() {}
50 
51  bool operator==(const_iterator_base const& that) const {
52  return _it_vec == that._it_vec;
53  }
54 
55  bool operator!=(const_iterator_base const& that) const {
56  return _it_vec != that._it_vec;
57  }
58 
59  bool operator<(const_iterator_base const& that) const {
60  return _it_vec < that._it_vec;
61  }
62 
63  bool operator>(const_iterator_base const& that) const {
64  return _it_vec > that._it_vec;
65  }
66 
67  bool operator<=(const_iterator_base const& that) const {
68  return operator<(that) || operator==(that);
69  }
70 
71  bool operator>=(const_iterator_base const& that) const {
72  return operator>(that) || operator==(that);
73  }
74 
75  // postfix
76  const_iterator_base operator++(int) {
77  const_iterator_base tmp(*this);
78  const_iterator_base::operator++();
79  return tmp;
80  }
81 
82  const_iterator_base operator--(int) {
83  const_iterator_base tmp(*this);
84  const_iterator_base::operator--();
85  return tmp;
86  }
87 
88  const_iterator_base operator+(size_type val) const {
89  const_iterator_base out(*this);
90  return out += val;
91  }
92 
93  friend const_iterator_base operator+(size_type val,
94  const_iterator_base const& it) {
95  return it + val;
96  }
97 
98  const_iterator_base operator-(size_type val) const {
99  const_iterator_base out(*this);
100  return out -= val;
101  }
102 
103  const_iterator_base& operator++() { // prefix
104  ++_it_vec;
105  return *this;
106  }
107 
108  const_iterator_base& operator--() {
109  --_it_vec;
110  return *this;
111  }
112 
113  const_iterator_base& operator+=(size_type val) {
114  _it_vec += val;
115  return *this;
116  }
117 
118  const_iterator_base& operator-=(size_type val) {
119  _it_vec -= val;
120  return *this;
121  }
122 
123  difference_type operator-(const_iterator_base that) const {
124  return _it_vec - that._it_vec;
125  }
126 
127  const_reference operator[](size_type pos) const {
128  return *(*this + pos);
129  }
130 
131  protected:
132  TInternalIteratorType _it_vec;
133  }; // const_iterator_base definition ends
134 
135  template <typename TMethodsType,
136  typename TInternalIteratorType,
137  typename TExternalValueType,
138  typename TExternalConstPointer = TExternalValueType const* const,
139  typename TExternalConstReference = TExternalValueType const&>
140  class const_iterator_stateless
141  : public const_iterator_base<TInternalIteratorType,
142  TExternalValueType,
143  TExternalConstPointer,
144  TExternalConstReference> {
145  static_assert(
146  std::is_trivially_default_constructible<TMethodsType>::value,
147  "the final template parameter is not trivially default "
148  "constructible!");
149 
150  using base_iterator = const_iterator_base<TInternalIteratorType,
151  TExternalValueType,
152  TExternalConstPointer,
153  TExternalConstReference>;
154 
155  public:
156  using base_iterator::const_iterator_base;
157 
158  using size_type = typename base_iterator::size_type;
159  using difference_type = typename base_iterator::difference_type;
160  using const_pointer = typename base_iterator::const_pointer;
161  using pointer = typename base_iterator::pointer;
162  using const_reference = typename base_iterator::const_reference;
163  using reference = typename base_iterator::reference;
164  using value_type = typename base_iterator::value_type;
165  using iterator_category = std::random_access_iterator_tag;
166 
167  const_reference operator*() const {
168  return TMethodsType().indirection(this->_it_vec);
169  }
170 
171  const_pointer operator->() const {
172  return TMethodsType().addressof(this->_it_vec);
173  }
174  };
175 
176  template <typename TStateType,
177  typename TMethodsType,
178  typename TInternalIteratorType,
179  typename TExternalValueType,
180  typename TExternalConstPointer,
181  typename TExternalConstReference>
182  class const_iterator_stateful
183  : public const_iterator_base<TInternalIteratorType,
184  TExternalConstPointer,
185  TExternalConstReference,
186  TExternalValueType> {
187  static_assert(
188  std::is_trivially_default_constructible<TMethodsType>::value,
189  "the final template parameter is not trivially default "
190  "constructible!");
191 
192  using base_iterator = const_iterator_base<TInternalIteratorType,
193  TExternalConstPointer,
194  TExternalConstReference,
195  TExternalValueType>;
196 
197  public:
198  const_iterator_stateful(TStateType st, TInternalIteratorType it_vec)
199  : base_iterator(it_vec), _state(st) {}
200 
201  // TODO other constructors
202 
203  using const_reference = typename base_iterator::const_reference;
204  using const_pointer = typename base_iterator::const_pointer;
205 
206  const_reference operator*() const {
207  return TMethodsType().indirection(_state, this->_it_vec);
208  }
209 
210  const_pointer operator->() const {
211  return TMethodsType().addressof(_state, this->_it_vec);
212  }
213 
214  private:
215  TStateType _state;
216  };
217 
218  // Is just TInternalIteratorType if the external and internal types are the
219  // same.
220  template <typename TMethodsType,
221  typename TInternalIteratorType,
222  typename TExternalValueType,
223  typename TExternalConstPointer = TExternalValueType const* const,
224  typename TExternalConstReference = TExternalValueType const&>
225  using const_iterator_stateless_helper = typename std::conditional<
226  std::is_same<typename TInternalIteratorType::value_type,
227  TExternalValueType>::value,
228  TInternalIteratorType,
229  const_iterator_stateless<TMethodsType,
230  TInternalIteratorType,
231  TExternalValueType,
232  TExternalConstPointer,
233  TExternalConstReference>>::type;
234 
235  // The class iterator_base provides a base class for random access
236  // iterators that wrap an iterator to a vector of TWrappedItemType. The
237  // template parameter TMethodsType must provide two methods:
238  // 1. indirection - returning a FroidurePin::const_reference to a
239  // FroidurePin::element_type for use by the operator* method of
240  // iterator_base;
241  // 2. addressof - returning a pointer to const FroidurePin::element_type for
242  // use by the operator& method of iterator_base.
243  // FIXME remove this (use const_iterator_stateless instead)!
244  template <typename TWrappedItemType,
245  typename TConstPointer,
246  typename TConstReference,
247  typename TValueType,
248  class TMethodsType>
249  class iterator_base {
250  public:
251  using size_type = typename std::vector<TWrappedItemType>::size_type;
252  using difference_type =
253  typename std::vector<TWrappedItemType>::difference_type;
254  using const_pointer = TConstPointer;
255  using pointer = TConstPointer;
256  using const_reference = TConstReference;
257  using reference = TConstReference;
258  using value_type = TValueType;
259  using iterator_category = std::random_access_iterator_tag;
260 
261  explicit iterator_base(
262  typename std::vector<TWrappedItemType>::const_iterator it_vec)
263  : _it_vec(it_vec) {}
264 
265  iterator_base(iterator_base const& that) : iterator_base(that._it_vec) {}
266 
267  virtual ~iterator_base() {}
268 
269  bool operator==(iterator_base const& that) const {
270  return _it_vec == that._it_vec;
271  }
272 
273  bool operator!=(iterator_base const& that) const {
274  return _it_vec != that._it_vec;
275  }
276 
277  bool operator<(iterator_base const& that) const {
278  return _it_vec < that._it_vec;
279  }
280 
281  bool operator>(iterator_base const& that) const {
282  return _it_vec > that._it_vec;
283  }
284 
285  bool operator<=(iterator_base const& that) const {
286  return operator<(that) || operator==(that);
287  }
288 
289  bool operator>=(iterator_base const& that) const {
290  return operator>(that) || operator==(that);
291  }
292 
293  // postfix
294  iterator_base operator++(int) {
295  iterator_base tmp(*this);
296  iterator_base::operator++();
297  return tmp;
298  }
299 
300  iterator_base operator--(int) {
301  iterator_base tmp(*this);
302  iterator_base::operator--();
303  return tmp;
304  }
305 
306  iterator_base operator+(size_type val) const {
307  iterator_base out(*this);
308  return out += val;
309  }
310 
311  friend iterator_base operator+(size_type val, iterator_base const& it) {
312  return it + val;
313  }
314 
315  iterator_base operator-(size_type val) const {
316  iterator_base out(*this);
317  return out -= val;
318  }
319 
320  iterator_base& operator++() { // prefix
321  ++_it_vec;
322  return *this;
323  }
324 
325  iterator_base& operator--() {
326  --_it_vec;
327  return *this;
328  }
329 
330  iterator_base& operator+=(size_type val) {
331  _it_vec += val;
332  return *this;
333  }
334 
335  iterator_base& operator-=(size_type val) {
336  _it_vec -= val;
337  return *this;
338  }
339 
340  difference_type operator-(iterator_base that) const {
341  return _it_vec - that._it_vec;
342  }
343 
344  const_reference operator[](size_type pos) const {
345  return *(*this + pos);
346  }
347 
348  const_reference operator*() const {
349  return TMethodsType().indirection(_it_vec);
350  }
351 
352  const_pointer operator->() const {
353  return TMethodsType().addressof(_it_vec);
354  }
355 
356  protected:
357  typename std::vector<TWrappedItemType>::const_iterator _it_vec;
358  }; // iterator_base definition ends
359  } // namespace internal
360 } // namespace libsemigroups
361 #endif // LIBSEMIGROUPS_INCLUDE_ITERATOR_HPP_
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/jquery.js b/jquery.js deleted file mode 100644 index 1ee895ca3..000000000 --- a/jquery.js +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Wed Mar 21 12:46:34 2012 -0700 - */ -(function(bd,L){var av=bd.document,bu=bd.navigator,bm=bd.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bd.jQuery,bH=bd.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bd.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bd.attachEvent("onload",bF.ready);var b0=false;try{b0=bd.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0!=null&&b0==b0.window},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bd.JSON&&bd.JSON.parse){return bd.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){if(typeof b2!=="string"||!b2){return null}var b0,b1;try{if(bd.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bd.execScript||function(b1){bd["eval"].call(bd,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aK.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aK.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bH=bv.getElementsByTagName("*");bE=bv.getElementsByTagName("a")[0];if(!bH||!bH.length||!bE){return{}}bF=av.createElement("select");bx=bF.appendChild(av.createElement("option"));bD=bv.getElementsByTagName("input")[0];bI={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bE.getAttribute("style")),hrefNormalized:(bE.getAttribute("href")==="/a"),opacity:/^0.55/.test(bE.style.opacity),cssFloat:!!bE.style.cssFloat,checkOn:(bD.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,pixelMargin:true};b.boxModel=bI.boxModel=(av.compatMode==="CSS1Compat");bD.checked=true;bI.noCloneChecked=bD.cloneNode(true).checked;bF.disabled=true;bI.optDisabled=!bx.disabled;try{delete bv.test}catch(bB){bI.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bI.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bD=av.createElement("input");bD.value="t";bD.setAttribute("type","radio");bI.radioValue=bD.value==="t";bD.setAttribute("checked","checked");bD.setAttribute("name","t");bv.appendChild(bD);bC=av.createDocumentFragment();bC.appendChild(bv.lastChild);bI.checkClone=bC.cloneNode(true).cloneNode(true).lastChild.checked;bI.appendChecked=bD.checked;bC.removeChild(bD);bC.appendChild(bv);if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bA="on"+by;bw=(bA in bv);if(!bw){bv.setAttribute(bA,"return;");bw=(typeof bv[bA]==="function")}bI[by+"Bubbles"]=bw}}bC.removeChild(bv);bC=bF=bx=bv=bD=null;b(function(){var bM,bV,bW,bU,bO,bP,bR,bL,bK,bQ,bN,e,bT,bS=av.getElementsByTagName("body")[0];if(!bS){return}bL=1;bT="padding:0;margin:0;border:";bN="position:absolute;top:0;left:0;width:1px;height:1px;";e=bT+"0;visibility:hidden;";bK="style='"+bN+bT+"5px solid #000;";bQ="
";bM=av.createElement("div");bM.style.cssText=e+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bS.insertBefore(bM,bS.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bI.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);if(bd.getComputedStyle){bv.innerHTML="";bR=av.createElement("div");bR.style.width="0";bR.style.marginRight="0";bv.style.width="2px";bv.appendChild(bR);bI.reliableMarginRight=(parseInt((bd.getComputedStyle(bR,null)||{marginRight:0}).marginRight,10)||0)===0}if(typeof bv.style.zoom!=="undefined"){bv.innerHTML="";bv.style.width=bv.style.padding="1px";bv.style.border=0;bv.style.overflow="hidden";bv.style.display="inline";bv.style.zoom=1;bI.inlineBlockNeedsLayout=(bv.offsetWidth===3);bv.style.display="block";bv.style.overflow="visible";bv.innerHTML="
";bI.shrinkWrapBlocks=(bv.offsetWidth!==3)}bv.style.cssText=bN+e;bv.innerHTML=bQ;bV=bv.firstChild;bW=bV.firstChild;bO=bV.nextSibling.firstChild.firstChild;bP={doesNotAddBorder:(bW.offsetTop!==5),doesAddBorderForTableAndCells:(bO.offsetTop===5)};bW.style.position="fixed";bW.style.top="20px";bP.fixedPosition=(bW.offsetTop===20||bW.offsetTop===15);bW.style.position=bW.style.top="";bV.style.overflow="hidden";bV.style.position="relative";bP.subtractsBorderForOverflowNotVisible=(bW.offsetTop===-5);bP.doesNotIncludeMarginInBodyOffset=(bS.offsetTop!==bL);if(bd.getComputedStyle){bv.style.marginTop="1%";bI.pixelMargin=(bd.getComputedStyle(bv,null)||{marginTop:0}).marginTop!=="1%"}if(typeof bM.style.zoom!=="undefined"){bM.style.zoom=1}bS.removeChild(bM);bR=bv=bM=null;b.extend(bI,bP)});return bI})();var aT=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA1,null,false)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function a6(bx,bw,by){if(by===L&&bx.nodeType===1){var bv="data-"+bw.replace(aA,"-$1").toLowerCase();by=bx.getAttribute(bv);if(typeof by==="string"){try{by=by==="true"?true:by==="false"?false:by==="null"?null:b.isNumeric(by)?+by:aT.test(by)?b.parseJSON(by):by}catch(bz){}b.data(bx,bw,by)}else{by=L}}return by}function S(bv){for(var e in bv){if(e==="data"&&b.isEmptyObject(bv[e])){continue}if(e!=="toJSON"){return false}}return true}function bj(by,bx,bA){var bw=bx+"defer",bv=bx+"queue",e=bx+"mark",bz=b._data(by,bw);if(bz&&(bA==="queue"||!b._data(by,bv))&&(bA==="mark"||!b._data(by,e))){setTimeout(function(){if(!b._data(by,bv)&&!b._data(by,e)){b.removeData(by,bw,true);bz.fire()}},0)}}b.extend({_mark:function(bv,e){if(bv){e=(e||"fx")+"mark";b._data(bv,e,(b._data(bv,e)||0)+1)}},_unmark:function(by,bx,bv){if(by!==true){bv=bx;bx=by;by=false}if(bx){bv=bv||"fx";var e=bv+"mark",bw=by?0:((b._data(bx,e)||1)-1);if(bw){b._data(bx,e,bw)}else{b.removeData(bx,e,true);bj(bx,bv,"mark")}}},queue:function(bv,e,bx){var bw;if(bv){e=(e||"fx")+"queue";bw=b._data(bv,e);if(bx){if(!bw||b.isArray(bx)){bw=b._data(bv,e,b.makeArray(bx))}else{bw.push(bx)}}return bw||[]}},dequeue:function(by,bx){bx=bx||"fx";var bv=b.queue(by,bx),bw=bv.shift(),e={};if(bw==="inprogress"){bw=bv.shift()}if(bw){if(bx==="fx"){bv.unshift("inprogress")}b._data(by,bx+".run",e);bw.call(by,function(){b.dequeue(by,bx)},e)}if(!bv.length){b.removeData(by,bx+"queue "+bx+".run",true);bj(by,bx,"queue")}}});b.fn.extend({queue:function(e,bv){var bw=2;if(typeof e!=="string"){bv=e;e="fx";bw--}if(arguments.length1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,bv){return b.access(this,b.prop,e,bv,arguments.length>1)},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=L;delete this[e]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,e;if(b.isFunction(by)){return this.each(function(bC){b(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(ag);for(bw=0,bv=this.length;bw-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.type]||b.valHooks[bw.nodeName.toLowerCase()];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aV,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aZ:bf)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(by,bA){var bz,bB,bw,e,bv,bx=0;if(bA&&by.nodeType===1){bB=bA.toLowerCase().split(ag);e=bB.length;for(;bx=0)}}})});var be=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/(?:^|\s)hover(\.\S+)?\b/,aP=/^key/,bg=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler;by=bv.selector}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bd,bI])}}for(bC=0;bCbC){bv.push({elem:this,matches:bD.slice(bC)})}for(bJ=0;bJ0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aP.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bg.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}bE.match.globalPOS=bD;var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(B(bx[0])||B(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function B(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||bb.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aH(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aS.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aS="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ah=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,v=/]","i"),o=/checked\s*(?:[^=]|=\s*.checked.)/i,bn=/\/(java|ecma)script/i,aO=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){return b.access(this,function(bv){return bv===L?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(bv))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(e){return b.access(this,function(by){var bx=this[0]||{},bw=0,bv=this.length;if(by===L){return bx.nodeType===1?bx.innerHTML.replace(ah,""):null}if(typeof by==="string"&&!ae.test(by)&&(b.support.leadingWhitespace||!ar.test(by))&&!ax[(d.exec(by)||["",""])[1].toLowerCase()]){by=by.replace(R,"<$1>");try{for(;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bh(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function D(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function am(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||b.isXMLDoc(by)||!ai.test("<"+by.nodeName+">")?by.cloneNode(true):am(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){aj(by,bz);e=bh(by);bv=bh(bz);for(bx=0;e[bx];++bx){if(bv[bx]){aj(e[bx],bv[bx])}}}if(bA){s(by,bz);if(bw){e=bh(by);bv=bh(bz);for(bx=0;e[bx];++bx){s(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bI,bw,bv,bx){var bA,bH,bD,bJ=[];bw=bw||av;if(typeof bw.createElement==="undefined"){bw=bw.ownerDocument||bw[0]&&bw[0].ownerDocument||av}for(var bE=0,bG;(bG=bI[bE])!=null;bE++){if(typeof bG==="number"){bG+=""}if(!bG){continue}if(typeof bG==="string"){if(!W.test(bG)){bG=bw.createTextNode(bG)}else{bG=bG.replace(R,"<$1>");var bN=(d.exec(bG)||["",""])[1].toLowerCase(),bz=ax[bN]||ax._default,bK=bz[0],bB=bw.createElement("div"),bL=ac.childNodes,bM;if(bw===av){ac.appendChild(bB)}else{a(bw).appendChild(bB)}bB.innerHTML=bz[1]+bG+bz[2];while(bK--){bB=bB.lastChild}if(!b.support.tbody){var by=v.test(bG),e=bN==="table"&&!by?bB.firstChild&&bB.firstChild.childNodes:bz[1]===""&&!by?bB.childNodes:[];for(bD=e.length-1;bD>=0;--bD){if(b.nodeName(e[bD],"tbody")&&!e[bD].childNodes.length){e[bD].parentNode.removeChild(e[bD])}}}if(!b.support.leadingWhitespace&&ar.test(bG)){bB.insertBefore(bw.createTextNode(ar.exec(bG)[0]),bB.firstChild)}bG=bB.childNodes;if(bB){bB.parentNode.removeChild(bB);if(bL.length>0){bM=bL[bL.length-1];if(bM&&bM.parentNode){bM.parentNode.removeChild(bM)}}}}}var bF;if(!b.support.appendChecked){if(bG[0]&&typeof(bF=bG.length)==="number"){for(bD=0;bD1)};b.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var e=Z(bw,"opacity");return e===""?"1":e}else{return bw.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bx,bw,bD,by){if(!bx||bx.nodeType===3||bx.nodeType===8||!bx.style){return}var bB,bC,bz=b.camelCase(bw),bv=bx.style,bE=b.cssHooks[bz];bw=b.cssProps[bz]||bz;if(bD!==L){bC=typeof bD;if(bC==="string"&&(bB=I.exec(bD))){bD=(+(bB[1]+1)*+bB[2])+parseFloat(b.css(bx,bw));bC="number"}if(bD==null||bC==="number"&&isNaN(bD)){return}if(bC==="number"&&!b.cssNumber[bz]){bD+="px"}if(!bE||!("set" in bE)||(bD=bE.set(bx,bD))!==L){try{bv[bw]=bD}catch(bA){}}}else{if(bE&&"get" in bE&&(bB=bE.get(bx,false,by))!==L){return bB}return bv[bw]}},css:function(by,bx,bv){var bw,e;bx=b.camelCase(bx);e=b.cssHooks[bx];bx=b.cssProps[bx]||bx;if(bx==="cssFloat"){bx="float"}if(e&&"get" in e&&(bw=e.get(by,true,bv))!==L){return bw}else{if(Z){return Z(by,bx)}}},swap:function(by,bx,bz){var e={},bw,bv;for(bv in bx){e[bv]=by.style[bv];by.style[bv]=bx[bv]}bw=bz.call(by);for(bv in bx){by.style[bv]=e[bv]}return bw}});b.curCSS=b.css;if(av.defaultView&&av.defaultView.getComputedStyle){aJ=function(bA,bw){var bv,bz,e,by,bx=bA.style;bw=bw.replace(y,"-$1").toLowerCase();if((bz=bA.ownerDocument.defaultView)&&(e=bz.getComputedStyle(bA,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(bA.ownerDocument.documentElement,bA)){bv=b.style(bA,bw)}}if(!b.support.pixelMargin&&e&&aE.test(bw)&&a1.test(bv)){by=bx.width;bx.width=bv;bv=e.width;bx.width=by}return bv}}if(av.documentElement.currentStyle){aY=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv==null&&bx&&(by=bx[bw])){bv=by}if(a1.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":bv;bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aJ||aY;function af(by,bw,bv){var bz=bw==="width"?by.offsetWidth:by.offsetHeight,bx=bw==="width"?1:0,e=4;if(bz>0){if(bv!=="border"){for(;bx=1&&b.trim(bw.replace(al,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=al.test(bw)?bw.replace(al,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bv,e){return b.swap(bv,{display:"inline-block"},function(){if(e){return Z(bv,"margin-right")}else{return bv.style.marginRight}})}}}});if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bw){var bv=bw.offsetWidth,e=bw.offsetHeight;return(bv===0&&e===0)||(!b.support.reliableHiddenOffsets&&((bw.style&&bw.style.display)||b.css(bw,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}b.each({margin:"",padding:"",border:"Width"},function(e,bv){b.cssHooks[e+bv]={expand:function(by){var bx,bz=typeof by==="string"?by.split(" "):[by],bw={};for(bx=0;bx<4;bx++){bw[e+G[bx]+bv]=bz[bx]||bz[bx-2]||bz[0]}return bw}}});var k=/%20/g,ap=/\[\]$/,bs=/\r?\n/g,bq=/#.*$/,aD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,a0=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aN=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aR=/^(?:GET|HEAD)$/,c=/^\/\//,M=/\?/,a7=/)<[^<]*)*<\/script>/gi,p=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,z=b.fn.load,aa={},q={},aF,r,aW=["*/"]+["*"];try{aF=bm.href}catch(aw){aF=av.createElement("a");aF.href="";aF=aF.href}r=K.exec(aF.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a7,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||a0.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){an(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}an(bv,e);return bv},ajaxSettings:{url:aF,isLocal:aN.test(r[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bd.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(q),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bk(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=F(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,r[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=r[1]||bI[2]!=r[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(r[3]||(r[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aX(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aR.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aW+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aX(q,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){u(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function u(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{u(bw+"["+(typeof bz==="object"?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&b.type(by)==="object"){for(var e in by){u(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bk(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function F(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!ba){ba=av.createElement("iframe");ba.frameBorder=ba.width=ba.height=0}e.appendChild(ba);if(!m||!ba.createElement){m=(ba.contentWindow||ba.contentDocument).document;m.write((b.support.boxModel?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(ba)}Q[bx]=bw}return Q[bx]}var a8,V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){a8=function(by,bH,bw,bB){try{bB=by.getBoundingClientRect()}catch(bF){}if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aL(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{a8=function(bz,bE,bx){var bC,bw=bz.offsetParent,bv=bz,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.fn.offset=function(e){if(arguments.length){return e===L?this:this.each(function(bx){b.offset.setOffset(this,e,bx)})}var bv=this[0],bw=bv&&bv.ownerDocument;if(!bw){return null}if(bv===bw.body){return b.offset.bodyOffset(bv)}return a8(bv,bw,bw.documentElement)};b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(bw,bv){var e=/Y/.test(bv);b.fn[bw]=function(bx){return b.access(this,function(by,bB,bA){var bz=aL(by);if(bA===L){return bz?(bv in bz)?bz[bv]:b.support.boxModel&&bz.document.documentElement[bB]||bz.document.body[bB]:by[bB]}if(bz){bz.scrollTo(!e?bA:b(bz).scrollLeft(),e?bA:b(bz).scrollTop())}else{by[bB]=bA}},bw,bx,arguments.length,null)}});function aL(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each({Height:"height",Width:"width"},function(bw,bx){var bv="client"+bw,e="scroll"+bw,by="offset"+bw;b.fn["inner"+bw]=function(){var bz=this[0];return bz?bz.style?parseFloat(b.css(bz,bx,"padding")):this[bx]():null};b.fn["outer"+bw]=function(bA){var bz=this[0];return bz?bz.style?parseFloat(b.css(bz,bx,bA?"margin":"border")):this[bx]():null};b.fn[bx]=function(bz){return b.access(this,function(bC,bB,bD){var bF,bE,bG,bA;if(b.isWindow(bC)){bF=bC.document;bE=bF.documentElement[bv];return b.support.boxModel&&bE||bF.body&&bF.body[bv]||bE}if(bC.nodeType===9){bF=bC.documentElement;if(bF[bv]>=bF[e]){return bF[bv]}return Math.max(bC.body[e],bF[e],bC.body[by],bF[by])}if(bD===L){bG=b.css(bC,bB);bA=parseFloat(bG);return b.isNumeric(bA)?bA:bG}b(bC).css(bB,bD)},bx,bz,arguments.length,null)}});bd.jQuery=bd.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! - * jQuery UI Mouse 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' - - - - -
- -
-
kbe.hpp File Reference
-
-
- -

This file contains the declaration of the class KBE, which can be used as the element_type for a FroidurePin instance. This class essentially wraps a reduced word of a KnuthBendix instance. -More...

-
#include <cstddef>
-#include <functional>
-#include <string>
-#include <utility>
-#include "adapters.hpp"
-#include "element.hpp"
-#include "froidure-pin.hpp"
-#include "knuth-bendix.hpp"
-#include "types.hpp"
-
-Include dependency graph for kbe.hpp:
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
-
-This graph shows which files directly or indirectly include this file:
-
-
- - - - -
-
-

Go to the source code of this file.

-
- - - - - - - - - - -

-Classes

struct  std::equal_to< libsemigroups::KBE >
 Provides a call operator for comparing KBEs via references. More...
 
struct  std::hash< libsemigroups::KBE >
 Provides a call operator returning a hash value for an Element via a pointer. More...
 
class  libsemigroups::KBE
 Subclass of Element that wraps an libsemigroups::internal_string_type. More...
 
- - - - -

-Namespaces

 libsemigroups
 Namespace for everything in the libsemigroups library.
 
-

Detailed Description

-

This file contains the declaration of the class KBE, which can be used as the element_type for a FroidurePin instance. This class essentially wraps a reduced word of a KnuthBendix instance.

-
- - - - diff --git a/kbe_8hpp__dep__incl.map b/kbe_8hpp__dep__incl.map deleted file mode 100644 index 16085fc02..000000000 --- a/kbe_8hpp__dep__incl.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/kbe_8hpp__dep__incl.md5 b/kbe_8hpp__dep__incl.md5 deleted file mode 100644 index 6c47c6f19..000000000 --- a/kbe_8hpp__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -0a3a7f7b0669bf8a06d263dfbffec9c8 \ No newline at end of file diff --git a/kbe_8hpp__dep__incl.png b/kbe_8hpp__dep__incl.png deleted file mode 100644 index 7d401e282..000000000 Binary files a/kbe_8hpp__dep__incl.png and /dev/null differ diff --git a/kbe_8hpp__incl.map b/kbe_8hpp__incl.map deleted file mode 100644 index fb637c799..000000000 --- a/kbe_8hpp__incl.map +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kbe_8hpp__incl.md5 b/kbe_8hpp__incl.md5 deleted file mode 100644 index 886ef05fe..000000000 --- a/kbe_8hpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -fab9da4065837536b1ea66769f80f904 \ No newline at end of file diff --git a/kbe_8hpp__incl.png b/kbe_8hpp__incl.png deleted file mode 100644 index edf137c53..000000000 Binary files a/kbe_8hpp__incl.png and /dev/null differ diff --git a/kbe_8hpp_source.html b/kbe_8hpp_source.html deleted file mode 100644 index 4cf5b55aa..000000000 --- a/kbe_8hpp_source.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -libsemigroups: include/kbe.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
kbe.hpp
-
-
-Go to the documentation of this file.
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
23 
24 // For technical reasons this is implemented in src/kbe-impl.hpp
25 
26 #ifndef LIBSEMIGROUPS_INCLUDE_KBE_HPP_
27 #define LIBSEMIGROUPS_INCLUDE_KBE_HPP_
28 
29 #include <cstddef> // for size_t
30 #include <functional> // for internal::equal_to
31 #include <string> // for string
32 #include <utility> // for hash
33 
34 #include "adapters.hpp" // for one
35 #include "element.hpp" // for Element
36 #include "froidure-pin.hpp" // for FroidurePin
37 #include "knuth-bendix.hpp" // for fpsemigroup::KnuthBendix
38 #include "types.hpp" // for word_type, letter_type
39 
40 namespace libsemigroups {
41 
47  class KBE : public Element {
49  using internal_string_type = std::string;
50 
51  private:
52  KBE(KnuthBendix*, internal_string_type, bool);
53 
54  public:
59  KBE() = default;
60 
69  explicit KBE(KnuthBendix*);
70 
79  KBE(KnuthBendix*, internal_string_type const&);
80 
84  KBE(KnuthBendix*, letter_type const&);
85 
89  KBE(KnuthBendix&, letter_type const&);
90 
94  KBE(KnuthBendix*, word_type const&);
95 
99  KBE(KnuthBendix&, word_type const&);
100 
102  KBE(KBE const&) = default;
103 
109  bool operator==(Element const&) const override;
110 
116  bool operator<(Element const&) const override;
117 
122  void swap(Element&) override;
123 
132  size_t complexity() const override;
133 
140  size_t degree() const override;
141 
148  KBE identity() const;
149 
154  KBE* heap_copy() const override;
155 
160  KBE* heap_identity() const override;
161 
165  void cache_hash_value() const override;
166 
178  void redefine(Element const&, Element const&, size_t = 0) override;
179 
180 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
181  Element* empty_key() const override;
182 #endif
183 
184  operator word_type() const;
185  operator std::string() const;
186 
187  private:
188  KnuthBendix* _kb;
189  internal_string_type _kb_word;
190  };
191 
192  template <>
193  struct one<KBE*> {
194  KBE* operator()(KBE const*);
195  };
196 } // namespace libsemigroups
197 
198 namespace std {
205  template <>
206  struct hash<libsemigroups::KBE> {
208  size_t operator()(libsemigroups::KBE const& x) const {
209  return x.hash_value();
210  }
211  };
212 
218  template <>
219  struct equal_to<libsemigroups::KBE> {
222  libsemigroups::KBE const& y) const {
223  return x == y;
224  }
225  };
226 } // namespace std
227 
228 namespace libsemigroups {
233  template <>
234  word_type FroidurePin<
235  KBE,
236  internal::hash<KBE>,
237  internal::equal_to<KBE>,
238  TraitsHashEqual<KBE, internal::hash<KBE>, internal::equal_to<KBE>>>::
239  factorisation(KBE const& x);
240 } // namespace libsemigroups
241 
242 #endif // LIBSEMIGROUPS_INCLUDE_KBE_HPP_
This class is used to represent a string rewriting system defining a finitely presented monoid or sem...
Definition: knuth-bendix.hpp:54
-
void cache_hash_value() const override
Calculates a hash value for this object which is cached.
-
void redefine(Element const &, Element const &, size_t=0) override
Multiply x and y and stores the result in this.
-
Definition: kbe.hpp:198
-
Abstract base class for semigroup elements.
Definition: element.hpp:61
-
This file contains a declaration of the class template FroidurePin which implements the Froidure-Pin ...
-
bool operator()(libsemigroups::KBE const &x, libsemigroups::KBE const &y) const
Tests equality of two const KBE references via equality of the KBEs.
Definition: kbe.hpp:221
-
Subclass of Element that wraps an libsemigroups::internal_string_type.
Definition: kbe.hpp:47
-
KBE * heap_copy() const override
Returns an independent copy of this.
-
KBE identity() const
Return the identity KBE.
-
bool operator==(Element const &) const override
Returns true if this equals that.
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
size_t operator()(libsemigroups::KBE const &x) const
Hashes a KBE given by const KBE reference.
Definition: kbe.hpp:208
-
size_t letter_type
Type for the index of a generator of a semigroup.
Definition: types.hpp:50
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
KBE()=default
Constructor.
-
size_t hash_value() const
Return the hash value of an Element.
Definition: element.hpp:144
-
KBE * heap_identity() const override
Returns a new copy of the identity KBE.
-
size_t degree() const override
Returns the degree of an KBE.
-
bool operator<(Element const &) const override
Returns true if this is less than that and false if it is not.
-
void swap(Element &) override
Copy x into this.
-
size_t complexity() const override
Returns the approximate time complexity of multiplying two KBE&#39;s.
-
This file contains function templates for adapting a user-defined type so that it can be used with li...
-
- - - - diff --git a/knuth-bendix_8hpp_source.html b/knuth-bendix_8hpp_source.html deleted file mode 100644 index d924cf491..000000000 --- a/knuth-bendix_8hpp_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -libsemigroups: include/knuth-bendix.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
knuth-bendix.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file contains a class KnuthBendix which implements the Knuth-Bendix
20 // algorithm for finitely presented monoids.
21 
22 #ifndef LIBSEMIGROUPS_INCLUDE_KNUTH_BENDIX_HPP_
23 #define LIBSEMIGROUPS_INCLUDE_KNUTH_BENDIX_HPP_
24 
25 #include <iosfwd> // for string, ostream
26 #include <memory> // for unique_ptr
27 #include <stddef.h> // for size_t
28 #include <utility> // for pair
29 #include <vector> // for vector
30 
31 #include "cong-base.hpp" // for CongBase::class_index_type, CongBase, Con...
32 #include "fpsemi-base.hpp" // for FpSemiBase
33 #include "types.hpp" // for word_type
34 
35 namespace libsemigroups {
36  // Forward declarations
37  class FroidurePinBase;
38  class KBE;
39  class ReductionOrdering;
40  namespace congruence {
41  class KnuthBendix;
42  }
43  namespace internal {
44  template <class TPtrType>
45  class owned_ptr;
46  }
47 
48  namespace fpsemigroup {
53 
54  class KnuthBendix : public FpSemiBase {
55  friend class ::libsemigroups::congruence::KnuthBendix;
56  friend class ::libsemigroups::KBE; // defined in kbe.hpp
57 
58  public:
60  // Runner - virtual methods - public
62 
63  void run() override;
64 
66  // FpSemiBase - pure virtual methods - public
68 
69  size_t size() override;
70 
71  bool equal_to(std::string const&, std::string const&) override;
72  std::string normal_form(std::string const&) override;
73 
75  // FpSemiBase - non-pure virtual methods - public
77 
78  using FpSemiBase::equal_to;
79  using FpSemiBase::normal_form;
80 
82  // KnuthBendix - static data members and enums - public
84 
93  enum class overlap_policy { ABC = 0, AB_BC = 1, MAX_AB_BC = 2 };
94 
96  // KnuthBendix - constructors and destructor - public
98 
105  explicit KnuthBendix(ReductionOrdering*);
106  explicit KnuthBendix(FroidurePinBase&);
107  // TODO(now) remove this
108  explicit KnuthBendix(KnuthBendix const*);
109 
112  KnuthBendix();
113 
118  ~KnuthBendix();
119 
121  // KnuthBendix - setters for optional parameters - public
123 
135  void set_check_confluence_interval(size_t);
136 
146  void set_max_overlap(size_t);
147 
155  void set_max_rules(size_t);
156 
162 
164  // KnuthBendix - methods for rules and rewriting - public
166 
168  size_t nr_active_rules() const noexcept;
169 
176  // TODO delete this
177  std::vector<std::pair<std::string, std::string>> rules() const;
178  // using FpSemiBase::const_iterator;
179 
180  // TODO(now) these will have to be derived from iterator_base
181  // const_iterator cbegin_active_rules() const;
182  // const_iterator cend_active_rules() const;
183 
186  // TODO(now) change to void rewrite(std::string&);
187  std::string* rewrite(std::string*) const;
188 
191  std::string rewrite(std::string) const;
192 
196  friend std::ostream& operator<<(std::ostream&, KnuthBendix const&);
197 
199  // KnuthBendix - main methods - public
201 
205  bool confluent() const;
206 
215  void knuth_bendix();
216 
227 
228  private:
230  // FpSemiBase - pure virtual methods - private
232 
233  void add_rule_impl(std::string const&, std::string const&) override;
234  internal::owned_ptr<FroidurePinBase> froidure_pin_impl() override;
235 
237  // FpSemiBase - non-pure virtual methods - private
239 
240  void set_alphabet_impl(std::string const&) override;
241  void set_alphabet_impl(size_t) override;
242  bool is_obviously_infinite_impl() override;
243  void validate_word_impl(std::string const&) const override;
244  bool validate_identity_impl(std::string const&) const override;
245 
247  // KnuthBendix - data - private
249 
250  struct Settings {
251  Settings();
252  size_t _check_confluence_interval;
253  size_t _max_overlap;
254  size_t _max_rules;
255  overlap_policy _overlap_policy;
256  } _settings;
257 
258  class KnuthBendixImpl; // Forward declaration
259  KnuthBendixImpl* _impl;
260  };
261  } // namespace fpsemigroup
262 
263  namespace congruence {
264  class KnuthBendix : public CongBase {
265  public:
267  // KnuthBendix - constructors - public
269 
270  KnuthBendix();
271  explicit KnuthBendix(FroidurePinBase&);
272  explicit KnuthBendix(fpsemigroup::KnuthBendix const*);
273 
275  // Runner - pure virtual methods - public
277 
278  void run() override;
279 
281  // CongBase - pure virtual methods - public
283 
284  word_type class_index_to_word(class_index_type) override;
285  size_t nr_classes() override;
286  class_index_type word_to_class_index(word_type const&) override;
287 
289  // CongBase - non-pure virtual methods - public
291 
292  result_type const_contains(word_type const&,
293  word_type const&) const override;
294  bool contains(word_type const&, word_type const&) override;
295 
296  protected:
298  // Runner - non-pure virtual methods - protected
300 
301  bool finished_impl() const override;
302 
303  private:
305  // CongBase - pure virtual methods - private
307 
308  void add_pair_impl(word_type const&, word_type const&) override;
309  internal::owned_ptr<FroidurePinBase> quotient_impl() override;
310 
312  // CongBase - non-pure virtual methods - private
314 
315  void set_nr_generators_impl(size_t) override;
316 
318  // KnuthBendix - data - private
320 
321  std::unique_ptr<fpsemigroup::KnuthBendix> _kb;
322  };
323  } // namespace congruence
324 } // namespace libsemigroups
325 #endif // LIBSEMIGROUPS_INCLUDE_KNUTH_BENDIX_HPP_
This class is used to represent a string rewriting system defining a finitely presented monoid or sem...
Definition: knuth-bendix.hpp:54
-
std::vector< std::pair< std::string, std::string > > rules() const
This method returns a vector consisting of the pairs of strings which represent the rules of the rewr...
-
KnuthBendix()
Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering. ...
-
Definition: kbe.hpp:198
-
std::string * rewrite(std::string *) const
Rewrites the word w in-place according to the current rules in the rewriting system, and returns it.
-
size_t nr_active_rules() const noexcept
Returns the current number of active rules in the rewriting system.
-
~KnuthBendix()
A default destructor.
-
std::vector< letter_type > word_type
Type for a word over the generators of a semigroup.
Definition: types.hpp:53
-
bool confluent() const
Returns true if the rewriting system is confluent and false if it is not.
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
void set_max_overlap(size_t)
This method can be used to specify the maximum length of the overlap of two left hand sides of rules ...
-
void knuth_bendix_by_overlap_length()
This method runs the Knuth-Bendix algorithm on the rewriting system by considering all overlaps of a ...
-
overlap_policy
The values in this enum determine how a rewriting system measures the length of the overlap of two w...
Definition: knuth-bendix.hpp:93
-
void set_max_rules(size_t)
This method sets the (approximate) maximum number of rules that the system should contain...
-
void set_overlap_policy(overlap_policy)
This method can be used to determine the way that the length of an overlap of two words in the system...
-
void knuth_bendix()
Run the Knuth-Bendix algorithm on the rewriting system.
-
void set_check_confluence_interval(size_t)
The method KnuthBendix::knuth_bendix periodically checks if the system is already confluent...
-
This class provides a call operator which can be used to compare libsemigroups::rws_word_t.
Definition: reduct.hpp:35
-
- - - - diff --git a/konieczny_8hpp_source.html b/konieczny_8hpp_source.html deleted file mode 100644 index a10de2402..000000000 --- a/konieczny_8hpp_source.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -libsemigroups: include/konieczny.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
konieczny.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 Finn Smith
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // This file contains an implementation of Konieczny's algorithm for computing
19 // subsemigroups of the boolean matrix monoid.
20 
21 // TODO: exception safety!
22 
23 #ifndef LIBSEMIGROUPS_INCLUDE_KONIECZNY_HPP_
24 #define LIBSEMIGROUPS_INCLUDE_KONIECZNY_HPP_
25 
26 #include <algorithm>
27 #include <map>
28 #include <set>
29 #include <tuple>
30 #include <unordered_set>
31 #include <vector>
32 
33 #include "bmat8.hpp"
34 #include "constants.hpp"
35 #include "digraph.hpp"
36 #include "element.hpp"
37 #include "orb.hpp"
38 #include "schreier-sims.hpp"
39 
40 //
41 namespace libsemigroups {
42 
47  struct pair_hash {
49  size_t operator()(std::pair<size_t, size_t> x) const {
50  return std::get<0>(x) + std::get<1>(x) + 0x9e3779b97f4a7c16;
51  }
52  };
53 
58  struct vec_bmat8_hash {
60  size_t operator()(std::vector<BMat8> vec) const {
61  size_t hash = 0;
62  for (BMat8 x : vec) {
63  hash ^= x.to_int() + 0x9e3779b97f4a7c16 + (hash << 6) + (hash >> 2);
64  }
65  return hash;
66  }
67  };
68 
69  using row_action_type = right_action<BMat8, BMat8>;
70  using col_action_type = left_action<BMat8, BMat8>;
71  using row_orb_type = Orb<BMat8, BMat8, row_action_type, Side::RIGHT>;
72  using col_orb_type = Orb<BMat8, BMat8, col_action_type, Side::LEFT>;
73 
74  BMat8 group_inverse(BMat8 id, BMat8 bm) {
75  BMat8 tmp = bm;
76  BMat8 y;
77  do {
78  y = tmp;
79  tmp = bm * y;
80  } while (tmp != id);
81  return y;
82  }
83 
84  class Konieczny {
85  public:
86  explicit Konieczny(std::vector<BMat8> const& gens)
87  : _col_orb(),
88  _D_classes(),
89  _D_rels(),
90  _dim(1),
91  _gens(gens),
92  _group_indices(),
93  _group_indices_alt(),
94  _perm_in_gens(false),
95  _regular_D_classes(),
96  _row_orb() {
97  compute_D_classes();
98  }
99 
100  ~Konieczny();
101 
103  size_t find_group_index(BMat8 bm) {
104  BMat8 col_space_basis = bm.col_space_basis();
105  size_t pos = _row_orb.position(bm.row_space_basis());
106  size_t row_scc_id = _row_orb.digraph().scc_id(pos);
107  std::pair<size_t, size_t> key = std::make_pair(
108  col_space_basis.to_int(), _row_orb.digraph().scc_id(pos));
109 
110  if (_group_indices.find(key) == _group_indices.end()) {
111  for (auto it = _row_orb.digraph().cbegin_scc(row_scc_id);
112  it < _row_orb.digraph().cend_scc(row_scc_id);
113  it++) {
114  if (is_group_index(col_space_basis, _row_orb.at(*it))) {
115  _group_indices.emplace(key, *it);
116  return *it;
117  }
118  }
119  } else {
120  return _group_indices.at(key);
121  }
122  _group_indices.emplace(key, UNDEFINED);
123  return UNDEFINED;
124  }
125 
126  bool is_regular_element(BMat8 bm) {
127  if (find_group_index(bm) != UNDEFINED) {
128  return true;
129  }
130  return false;
131  }
132 
133  // TODO: it must be possible to do better than this
134  BMat8 idem_in_H_class(BMat8 bm) {
135  BMat8 tmp = bm;
136  while (tmp * tmp != tmp) {
137  tmp = tmp * bm;
138  }
139  return tmp;
140  }
141 
143  BMat8 find_idem(BMat8 bm) {
144  if (bm * bm == bm) {
145  return bm;
146  }
147  if (!is_regular_element(bm)) {
148  return BMat8(static_cast<size_t>(UNDEFINED));
149  }
150  size_t i = find_group_index(bm);
151  size_t pos = _row_orb.position(bm.row_space_basis());
152  BMat8 x = bm * _row_orb.multiplier_to_scc_root(pos)
153  * _row_orb.multiplier_from_scc_root(i);
154  // BMat8(UNDEFINED) happens to be idempotent...
155  return idem_in_H_class(x);
156  }
157 
158  class BaseDClass;
159  class RegularDClass;
160  class NonRegularDClass;
161 
162  std::vector<RegularDClass*> regular_D_classes() {
163  return _regular_D_classes;
164  }
165 
166  std::vector<BaseDClass*> D_classes() {
167  return _D_classes;
168  }
169 
170  size_t size() const;
171 
172  private:
173  void add_D_class(Konieczny::RegularDClass* D);
174  void add_D_class(Konieczny::NonRegularDClass* D);
175 
178  void compute_min_possible_dim() {
179  _dim = 1;
180  for (BMat8 x : _gens) {
181  size_t d = min_possible_dim(x);
182  if (d > _dim) {
183  _dim = d;
184  }
185  }
186  }
187 
191  void conditional_add_identity() {
192  // TODO: this isn't quite right - could be 0 generators etc.
193  compute_min_possible_dim();
194  for (BMat8 x : _gens) {
195  if (x * x.transpose() == bmat8_sub_one(_dim)) {
196  _perm_in_gens = true;
197  }
198  }
199  if (!_perm_in_gens) {
200  _gens.push_back(bmat8_sub_one(_dim));
201  }
202  }
203 
204  void compute_orbs() {
205  _row_orb.add_seed(bmat8_sub_one(_dim));
206  _col_orb.add_seed(bmat8_sub_one(_dim));
207  for (BMat8 g : _gens) {
208  _row_orb.add_generator(g);
209  _col_orb.add_generator(g);
210  }
211  _row_orb.enumerate();
212  _col_orb.enumerate();
213  // std::cout << _row_orb.size() << std::endl;
214  // std::cout << _col_orb.size() << std::endl;
215  }
216 
217  void compute_D_classes();
218 
219  col_orb_type _col_orb;
220  std::vector<BaseDClass*> _D_classes;
221  // contains in _D_rels[i] the indices of the D classes which lie above
222  // _D_classes[i]
223  std::vector<std::vector<size_t>> _D_rels;
224  size_t _dim;
225  std::vector<BMat8> _gens;
226  std::unordered_map<std::pair<size_t, size_t>, size_t, pair_hash>
227  _group_indices;
228  std::unordered_map<std::pair<size_t, size_t>, size_t, pair_hash>
229  _group_indices_alt;
230  bool _perm_in_gens;
231  std::vector<RegularDClass*> _regular_D_classes;
232  row_orb_type _row_orb;
233  };
234 
235  class Konieczny::BaseDClass {
236  friend class Konieczny;
237 
238  public:
239  BaseDClass(Konieczny* parent, BMat8 rep)
240  : _card(rep.row_space_size()),
241  _computed(false),
242  _H_class(),
243  _left_mults(),
244  _left_mults_inv(),
245  _left_reps(),
246  _parent(parent),
247  _rep(rep),
248  _right_mults(),
249  _right_mults_inv(),
250  _right_reps() {}
251 
252  virtual ~BaseDClass() {}
253 
254  BMat8 rep() const {
255  return _rep;
256  }
257 
258  std::vector<BMat8>::const_iterator cbegin_left_reps() {
259  init();
260  return _left_reps.cbegin();
261  }
262 
263  std::vector<BMat8>::const_iterator cend_left_reps() {
264  init();
265  return _left_reps.cend();
266  }
267 
268  std::vector<BMat8>::const_iterator cbegin_right_reps() {
269  init();
270  return _right_reps.cbegin();
271  }
272 
273  std::vector<BMat8>::const_iterator cend_right_reps() {
274  init();
275  return _right_reps.cend();
276  }
277 
278  std::vector<BMat8>::const_iterator cbegin_left_mults() {
279  init();
280  return _left_mults.cbegin();
281  }
282 
283  std::vector<BMat8>::const_iterator cend_left_mults() {
284  init();
285  return _left_mults.cend();
286  }
287 
288  std::vector<BMat8>::const_iterator cbegin_left_mults_inv() {
289  init();
290  return _left_mults_inv.cbegin();
291  }
292 
293  std::vector<BMat8>::const_iterator cend_left_mults_inv() {
294  init();
295  return _left_mults_inv.cend();
296  }
297 
298  std::vector<BMat8>::const_iterator cbegin_right_mults() {
299  init();
300  return _right_mults.cbegin();
301  }
302 
303  std::vector<BMat8>::const_iterator cend_right_mults() {
304  init();
305  return _right_mults.cend();
306  }
307 
308  std::vector<BMat8>::const_iterator cbegin_right_mults_inv() {
309  init();
310  return _right_mults_inv.cbegin();
311  }
312 
313  std::vector<BMat8>::const_iterator cend_right_mults_inv() {
314  init();
315  return _right_mults_inv.cend();
316  }
317 
318  std::vector<BMat8>::const_iterator cbegin_H_class() {
319  init();
320  return _H_class.cbegin();
321  }
322 
323  std::vector<BMat8>::const_iterator cend_H_class() {
324  init();
325  return _H_class.cend();
326  }
327 
328  virtual bool contains(BMat8 bm) = 0;
329 
330  bool contains(BMat8 bm, size_t card) {
331  return (card == _card && contains(bm));
332  }
333 
334  virtual size_t size() {
335  init();
336  return _H_class.size() * _left_reps.size() * _right_reps.size();
337  }
338 
339  // TODO: is NRVO getting rid of the copies on calling this function? I
340  // think so...
341  std::vector<BMat8> covering_reps() {
342  init();
343  std::vector<BMat8> out;
344  // TODO: how to decide which side to calculate? One is often faster
345  if (_parent->_row_orb.size() < _parent->_col_orb.size()) {
346  for (BMat8 w : _left_reps) {
347  for (BMat8 g : _parent->_gens) {
348  BMat8 x = w * g;
349  // std::cout << "found " << std::endl << x << std::endl;
350  if (!contains(x)) {
351  // std::cout << "not contained in this D class!" << std::endl;
352  out.push_back(x);
353  } else {
354  // std::cout << "contained in this D class!" << std::endl;
355  }
356  }
357  }
358  } else {
359  for (BMat8 z : _right_reps) {
360  for (BMat8 g : _parent->_gens) {
361  BMat8 x = g * z;
362  if (!contains(x)) {
363  out.push_back(x);
364  }
365  }
366  }
367  }
368  std::sort(out.begin(), out.end());
369  auto it = std::unique(out.begin(), out.end());
370  out.erase(it, out.end());
371  // std::cout << "found " << internal::to_string(out.size())
372  // << " covering reps this time" << std::endl;
373  return out;
374  }
375 
376  protected:
377  virtual void init() = 0;
378 
379  size_t _card;
380  bool _computed;
381  std::vector<BMat8> _H_class;
382  std::vector<BMat8> _left_mults;
383  std::vector<BMat8> _left_mults_inv;
384  std::vector<BMat8> _left_reps;
385  Konieczny* _parent;
386  BMat8 _rep;
387  std::vector<BMat8> _right_mults;
388  std::vector<BMat8> _right_mults_inv;
389  std::vector<BMat8> _right_reps;
390  };
391 
392  class Konieczny::RegularDClass : public Konieczny::BaseDClass {
393  public:
394  RegularDClass(Konieczny* parent, BMat8 idem_rep)
395  : Konieczny::BaseDClass(parent, idem_rep),
396  _col_basis_positions(),
397  _H_gens(),
398  _left_idem_reps(),
399  _left_indices(),
400  _right_idem_reps(),
401  _right_indices(),
402  _row_basis_positions(),
403  _stab_chain() {
404  if (idem_rep * idem_rep != idem_rep) {
405  LIBSEMIGROUPS_EXCEPTION(
406  "RegularDClass: the representative given should be idempotent");
407  }
408  }
409 
410  std::vector<size_t>::const_iterator cbegin_left_indices() {
411  init();
412  return _left_indices.cbegin();
413  }
414 
415  std::vector<size_t>::const_iterator cend_left_indices() {
416  init();
417  return _left_indices.cend();
418  }
419 
420  std::vector<size_t>::const_iterator cbegin_right_indices() {
421  init();
422  return _right_indices.cbegin();
423  }
424 
425  std::vector<size_t>::const_iterator cend_right_indices() {
426  init();
427  return _right_indices.cend();
428  }
429 
430  std::vector<BMat8>::const_iterator cbegin_left_idem_reps() {
431  init();
432  return _left_idem_reps.cbegin();
433  }
434 
435  std::vector<BMat8>::const_iterator cend_left_idem_reps() {
436  init();
437  return _left_idem_reps.cend();
438  }
439 
440  std::vector<BMat8>::const_iterator cbegin_right_idem_reps() {
441  init();
442  return _right_idem_reps.cbegin();
443  }
444 
445  std::vector<BMat8>::const_iterator cend_right_idem_reps() {
446  init();
447  return _right_idem_reps.cend();
448  }
449 
450  SchreierSims<8, uint8_t, Permutation<uint8_t>> stab_chain() {
451  init();
452  return _stab_chain;
453  }
454 
455  // TODO: this is the wrong function! contains shouldn't assume argument is
456  // in semigroup!
461  bool contains(BMat8 bm) override {
462  init();
463  std::pair<size_t, size_t> x = index_positions(bm);
464  return x.first != UNDEFINED;
465  }
466 
467  // returns the position of [the positions of the row and column bases in
468  // the row and column orbits] in the left and right index vector of \c this
469  // i.e. the position of the L and R classes that \p bm is in,
470  // unless bm is not in \c this, in which case returns the pair
471  // (UNDEFINED, UNDEFINED)
472  std::pair<size_t, size_t> index_positions(BMat8 bm) {
473  init();
474  auto row_it = _row_basis_positions.find(bm.row_space_basis().to_int());
475  if (row_it != _row_basis_positions.end()) {
476  auto col_it = _col_basis_positions.find(bm.col_space_basis().to_int());
477  if (col_it != _col_basis_positions.end()) {
478  return std::make_pair((*row_it).second, (*col_it).second);
479  }
480  }
481  return std::make_pair(UNDEFINED, UNDEFINED);
482  }
483 
484  private:
485  // this is annoyingly a bit more complicated than the right indices
486  // because the find_group_index method fixes the column basis and loops
487  // through the scc of the row basis
488  void compute_left_indices() {
489  if (_left_indices.size() > 0) {
490  return;
491  }
492  size_t row_basis_pos = _parent->_row_orb.position(_rep.row_space_basis());
493  size_t col_basis_pos = _parent->_col_orb.position(_rep.col_space_basis());
494  size_t row_scc_id = _parent->_row_orb.digraph().scc_id(row_basis_pos);
495  size_t col_scc_id = _parent->_col_orb.digraph().scc_id(col_basis_pos);
496 
497  std::pair<size_t, size_t> key = std::make_pair(col_scc_id, 0);
498  for (auto it = _parent->_row_orb.digraph().cbegin_scc(row_scc_id);
499  it < _parent->_row_orb.digraph().cend_scc(row_scc_id);
500  it++) {
501  std::get<1>(key) = *it;
502  if (_parent->_group_indices_alt.find(key)
503  == _parent->_group_indices_alt.end()) {
504  bool found = false;
505  for (auto it2 = _parent->_col_orb.digraph().cbegin_scc(col_scc_id);
506  !found && it2 < _parent->_col_orb.digraph().cend_scc(col_scc_id);
507  it2++) {
508  if (is_group_index(_parent->_col_orb.at(*it2),
509  _parent->_row_orb.at(*it))) {
510  _parent->_group_indices_alt.emplace(key, *it2);
511  found = true;
512  }
513  }
514  if (!found) {
515  _parent->_group_indices_alt.emplace(key, UNDEFINED);
516  }
517  }
518  if (_parent->_group_indices_alt.at(key) != UNDEFINED) {
519  _row_basis_positions.emplace(_parent->_row_orb.at(*it).to_int(),
520  _left_indices.size());
521  _left_indices.push_back(*it);
522  }
523  }
524 #ifdef LIBSEMIGROUPS_DEBUG
525  for (size_t i : _left_indices) {
526  LIBSEMIGROUPS_ASSERT(i < _parent->_row_orb.size());
527  }
528 #endif
529  }
530 
531  void compute_right_indices() {
532  if (_right_indices.size() > 0) {
533  return;
534  }
535  size_t col_basis_pos = _parent->_col_orb.position(_rep.col_space_basis());
536  size_t col_scc_id = _parent->_col_orb.digraph().scc_id(col_basis_pos);
537  for (auto it = _parent->_col_orb.digraph().cbegin_scc(col_scc_id);
538  it < _parent->_col_orb.digraph().cend_scc(col_scc_id);
539  it++) {
540  BMat8 x = _parent->_col_orb.multiplier_from_scc_root(*it)
541  * _parent->_col_orb.multiplier_to_scc_root(col_basis_pos)
542  * _rep;
543  if (_parent->find_group_index(x) != UNDEFINED) {
544  _col_basis_positions.emplace(_parent->_col_orb.at(*it).to_int(),
545  _right_indices.size());
546  _right_indices.push_back(*it);
547  }
548  }
549 #ifdef LIBSEMIGROUPS_DEBUG
550  for (size_t i : _right_indices) {
551  LIBSEMIGROUPS_ASSERT(i < _parent->_col_orb.size());
552  }
553 #endif
554  }
555 
556  void compute_mults() {
557  if (_left_mults.size() > 0) {
558  return;
559  }
560  BMat8 row_basis = _rep.row_space_basis();
561  size_t row_basis_pos = _parent->_row_orb.position(row_basis);
562  BMat8 col_basis = _rep.col_space_basis();
563  size_t col_basis_pos = _parent->_col_orb.position(col_basis);
564 
565  for (size_t i = 0; i < _left_indices.size(); ++i) {
566  BMat8 b
567  = _parent->_row_orb.multiplier_to_scc_root(row_basis_pos)
568  * _parent->_row_orb.multiplier_from_scc_root(_left_indices[i]);
569  BMat8 c = _parent->_row_orb.multiplier_to_scc_root(_left_indices[i])
570  * _parent->_row_orb.multiplier_from_scc_root(row_basis_pos);
571 
572  _left_mults.push_back(b);
573  _left_mults_inv.push_back(c);
574  }
575 
576  for (size_t i = 0; i < _right_indices.size(); ++i) {
577  BMat8 c = _parent->_col_orb.multiplier_from_scc_root(_right_indices[i])
578  * _parent->_col_orb.multiplier_to_scc_root(col_basis_pos);
579  BMat8 d = _parent->_col_orb.multiplier_from_scc_root(col_basis_pos)
580  * _parent->_col_orb.multiplier_to_scc_root(_right_indices[i]);
581 
582  _right_mults.push_back(c);
583  _right_mults_inv.push_back(d);
584  }
585  }
586 
587  void compute_reps() {
588  compute_mults();
589 
590  _left_reps.clear();
591  _right_reps.clear();
592 
593  for (BMat8 b : _left_mults) {
594  _left_reps.push_back(_rep * b);
595  }
596 
597  for (BMat8 c : _right_mults) {
598  _right_reps.push_back(c * _rep);
599  }
600  }
601 
602  void compute_H_gens() {
603  _H_gens.clear();
604  BMat8 col_basis = _rep.col_space_basis();
605  size_t col_basis_pos = _parent->_col_orb.position(col_basis);
606  size_t col_basis_scc_id
607  = _parent->_col_orb.digraph().scc_id(col_basis_pos);
608  std::vector<BMat8> right_invs;
609 
610  for (size_t i = 0; i < _left_indices.size(); ++i) {
611  BMat8 p = _left_reps[i];
612  std::pair<size_t, size_t> key
613  = std::make_pair(col_basis_scc_id, _left_indices[i]);
614 
615  size_t k = _parent->_group_indices_alt.at(key);
616  size_t j = _col_basis_positions.at(_parent->_col_orb.at(k).to_int());
617  BMat8 q = _right_reps[j];
618  // find the inverse of pq in H_rep
619  BMat8 y = group_inverse(_rep, p * q);
620  right_invs.push_back(q * y);
621  }
622 
623  for (size_t i = 0; i < _left_indices.size(); ++i) {
624  BMat8 p = _left_reps[i];
625  for (BMat8 g : _parent->_gens) {
626  BMat8 x = p * g;
627  BMat8 s = x.row_space_basis();
628  for (size_t j = 0; j < _left_indices.size(); ++j) {
629  if (_parent->_row_orb.at(_left_indices[j]) == s) {
630  _H_gens.push_back(x * right_invs[j]);
631  break;
632  }
633  }
634  }
635  }
636  std::unordered_set<BMat8> set(_H_gens.begin(), _H_gens.end());
637  _H_gens.assign(set.begin(), set.end());
638  }
639 
640  /*
641  void compute_stab_chain() {
642  BMat8 row_basis = _rep.row_space_basis();
643  for (BMat8 x : _H_gens) {
644  _stab_chain.add_generator(BMat8::perm_action_on_basis(row_basis, x));
645  }
646  }
647  */
648 
649  void compute_idem_reps() {
650  BMat8 row_basis = _rep.row_space_basis();
651  BMat8 col_basis = _rep.col_space_basis();
652  size_t row_basis_pos = _parent->_row_orb.position(row_basis);
653  size_t col_basis_pos = _parent->_col_orb.position(col_basis);
654  size_t row_scc_id = _parent->_row_orb.digraph().scc_id(row_basis_pos);
655  size_t col_scc_id = _parent->_col_orb.digraph().scc_id(col_basis_pos);
656 
657  // this all relies on the indices having been computed already
658 
659  // TODO: use information from the looping through the left indices in
660  // the loop through the right indices
661  for (size_t i = 0; i < _left_indices.size(); ++i) {
662  std::pair<size_t, size_t> key
663  = std::make_pair(col_scc_id, _left_indices[i]);
664  size_t k = _parent->_group_indices_alt.at(key);
665  size_t j = 0;
666  while (_right_indices[j] != k) {
667  ++j;
668  }
669  BMat8 x = _right_mults[j] * _rep * _left_mults[i];
670  BMat8 y = x;
671  // BMat8(UNDEFINED) happens to be idempotent...
672  while (x * x != x) {
673  x = x * y;
674  }
675  _left_idem_reps.push_back(x);
676  }
677 
678  for (size_t j = 0; j < _right_indices.size(); ++j) {
679  // TODO: make comprehensible
680  std::pair<size_t, size_t> key = std::make_pair(
681  _parent->_col_orb.at(_right_indices[j]).to_int(), row_scc_id);
682  size_t k = _parent->_group_indices.at(key);
683  size_t i = 0;
684  while (_left_indices[i] != k) {
685  ++i;
686  }
687  BMat8 x = _right_mults[j] * _rep * _left_mults[i];
688  BMat8 y = x;
689  // BMat8(UNDEFINED) happens to be idempotent...
690  while (x * x != x) {
691  x = x * y;
692  }
693  _right_idem_reps.push_back(x);
694  }
695  }
696 
697  // there should be some way of getting rid of this
698  void compute_H_class() {
699  _H_class = std::vector<BMat8>(_H_gens.begin(), _H_gens.end());
700  std::unordered_set<BMat8> set(_H_class.begin(), _H_class.end());
701  for (size_t i = 0; i < _H_class.size(); ++i) {
702  for (BMat8 g : _H_gens) {
703  BMat8 y = _H_class[i] * g;
704  if (set.find(y) == set.end()) {
705  set.insert(y);
706  _H_class.push_back(y);
707  }
708  }
709  }
710  }
711 
712  void init() override {
713  if (_computed) {
714  return;
715  }
716  compute_left_indices();
717  compute_right_indices();
718  compute_mults();
719  compute_reps();
720  compute_idem_reps();
721  compute_H_gens();
722  compute_H_class();
723  // compute_stab_chain();
724  _computed = true;
725  }
726 
727  std::unordered_map<size_t, size_t> _col_basis_positions;
728  std::vector<BMat8> _H_gens;
729  // TODO: why have these and the other reps?
730  std::vector<BMat8> _left_idem_reps;
731  std::vector<size_t> _left_indices;
732  std::vector<BMat8> _right_idem_reps;
733  std::vector<size_t> _right_indices;
734  std::unordered_map<size_t, size_t> _row_basis_positions;
735  SchreierSims<8, uint8_t, Permutation<uint8_t>> _stab_chain;
736  };
737 
738  class Konieczny::NonRegularDClass : public Konieczny::BaseDClass {
739  friend class Konieczny;
740 
741  public:
742  NonRegularDClass(Konieczny* parent, BMat8 rep)
743  : Konieczny::BaseDClass(parent, rep),
744  _col_basis_positions(),
745  _left_idem_above(),
746  _left_idem_class(),
747  _H_set(),
748  _right_idem_above(),
749  _right_idem_class(),
750  _row_basis_positions() {
751  if (rep * rep == rep) {
752  LIBSEMIGROUPS_EXCEPTION("NonRegularDClass: the representative "
753  "given should not be idempotent");
754  }
755  }
756 
757  bool contains(BMat8 bm) override {
758  init();
759  size_t x = bm.row_space_basis().to_int();
760  if (_row_basis_positions[x].size() == 0) {
761  return false;
762  }
763  size_t y = bm.col_space_basis().to_int();
764  for (size_t i : _row_basis_positions[x]) {
765  for (size_t j : _col_basis_positions[y]) {
766  if (_H_set.find(_right_mults_inv[j] * bm * _left_mults_inv[i])
767  != _H_set.end()) {
768  return true;
769  }
770  }
771  }
772  return false;
773  }
774 
775  private:
776  void init() override {
777  if (_computed) {
778  return;
779  }
780  find_idems_above();
781  compute_H_class();
782  _computed = true;
783  }
784 
785  void find_idems_above() {
786  // assumes that all D classes above this have already been calculated!
787  bool left_found = false;
788  bool right_found = false;
789  for (auto it = _parent->_regular_D_classes.rbegin();
790  (!left_found || !right_found)
791  && it != _parent->_regular_D_classes.rend();
792  it++) {
793  RegularDClass* D = *it;
794  if (!left_found) {
795  for (auto idem_it = D->cbegin_left_idem_reps();
796  idem_it < D->cend_left_idem_reps();
797  idem_it++) {
798  if (_rep * (*idem_it) == _rep) {
799  _left_idem_above = *idem_it;
800  _left_idem_class = D;
801  left_found = true;
802  break;
803  }
804  }
805  }
806 
807  if (!right_found) {
808  for (auto idem_it = D->cbegin_right_idem_reps();
809  idem_it < D->cend_right_idem_reps();
810  idem_it++) {
811  if ((*idem_it) * _rep == _rep) {
812  _right_idem_above = (*idem_it);
813  _right_idem_class = D;
814  right_found = true;
815  break;
816  }
817  }
818  }
819  }
820 
821 #ifdef LIBSEMIGROUPS_DEBUG
822  LIBSEMIGROUPS_ASSERT(_left_idem_class->contains(_left_idem_above));
823  LIBSEMIGROUPS_ASSERT(_right_idem_class->contains(_right_idem_above));
824  LIBSEMIGROUPS_ASSERT(left_found && right_found);
825  LIBSEMIGROUPS_ASSERT(_rep * _left_idem_above == _rep);
826  LIBSEMIGROUPS_ASSERT(_right_idem_above * _rep == _rep);
827 #endif
828  }
829 
830  // TODO: this computes more than just the H class, and should be split
831  void compute_H_class() {
832  _H_class = std::vector<BMat8>();
833  std::pair<size_t, size_t> left_idem_indices
834  = _left_idem_class->index_positions(_left_idem_above);
835  BMat8 left_idem_left_mult
836  = _left_idem_class
837  ->cbegin_left_mults()[std::get<0>(left_idem_indices)];
838  BMat8 left_idem_right_mult
839  = _left_idem_class
840  ->cbegin_right_mults()[std::get<1>(left_idem_indices)];
841 
842  std::pair<size_t, size_t> right_idem_indices
843  = _right_idem_class->index_positions(_right_idem_above);
844  BMat8 right_idem_left_mult
845  = _right_idem_class
846  ->cbegin_left_mults()[std::get<0>(right_idem_indices)];
847  BMat8 right_idem_right_mult
848  = _right_idem_class
849  ->cbegin_right_mults()[std::get<1>(right_idem_indices)];
850 
851  std::vector<BMat8> _left_idem_H_class;
852  std::vector<BMat8> _right_idem_H_class;
853 
854  for (auto it = _left_idem_class->cbegin_H_class();
855  it < _left_idem_class->cend_H_class();
856  it++) {
857  _left_idem_H_class.push_back(left_idem_right_mult * (*it)
858  * left_idem_left_mult);
859  }
860 
861  for (auto it = _right_idem_class->cbegin_H_class();
862  it < _right_idem_class->cend_H_class();
863  it++) {
864  _right_idem_H_class.push_back(right_idem_right_mult * (*it)
865  * right_idem_left_mult);
866  }
867 
868  std::vector<BMat8> left_idem_left_reps;
869  std::vector<BMat8> right_idem_right_reps;
870 
871  for (auto it = _left_idem_class->cbegin_left_mults();
872  it < _left_idem_class->cend_left_mults();
873  it++) {
874  left_idem_left_reps.push_back(left_idem_right_mult
875  * _left_idem_class->rep() * (*it));
876  }
877 
878  for (auto it = _right_idem_class->cbegin_right_mults();
879  it < _right_idem_class->cend_right_mults();
880  it++) {
881  right_idem_right_reps.push_back((*it) * _right_idem_class->rep()
882  * right_idem_left_mult);
883  }
884 
885  std::vector<BMat8> Hex;
886  std::vector<BMat8> xHf;
887 
888  for (BMat8 s : _left_idem_H_class) {
889  xHf.push_back(_rep * s);
890  }
891 
892  for (BMat8 t : _right_idem_H_class) {
893  Hex.push_back(t * _rep);
894  }
895 
896  std::unordered_set<BMat8> s(Hex.begin(), Hex.end());
897  Hex.assign(s.begin(), s.end());
898 
899  s = std::unordered_set<BMat8>(xHf.begin(), xHf.end());
900  xHf.assign(s.begin(), s.end());
901 
902  std::sort(Hex.begin(), Hex.end());
903  std::sort(xHf.begin(), xHf.end());
904 
905  std::set_intersection(Hex.begin(),
906  Hex.end(),
907  xHf.begin(),
908  xHf.end(),
909  std::back_inserter(_H_class));
910  for (BMat8 x : _H_class) {
911  _H_set.insert(x);
912  }
913 
914  _left_reps.clear();
915  _left_mults.clear();
916  _right_reps.clear();
917  _right_mults.clear();
918 
919  std::unordered_set<std::vector<BMat8>, vec_bmat8_hash> Hxhw_set;
920  std::unordered_set<std::vector<BMat8>, vec_bmat8_hash> zhHx_set;
921 
922  for (BMat8 h : _left_idem_H_class) {
923  for (size_t i = 0; i < left_idem_left_reps.size(); ++i) {
924  BMat8 w = left_idem_left_reps[i];
925  // TODO: enforce uniqueness here?
926  std::vector<BMat8> Hxhw;
927  for (BMat8 s : _H_class) {
928  Hxhw.push_back(s * h * w);
929  }
930  std::sort(Hxhw.begin(), Hxhw.end());
931  if (Hxhw_set.find(Hxhw) == Hxhw_set.end()) {
932  Hxhw_set.insert(Hxhw);
933  BMat8 A = _rep * h * w;
934  BMat8 inv
935  = group_inverse(_left_idem_above,
936  w * _left_idem_class->cbegin_left_mults_inv()[i]
937  * left_idem_left_mult)
938  * group_inverse(_left_idem_above, h);
939 
940  size_t x = A.row_space_basis().to_int();
941  auto it = _row_basis_positions.find(x);
942  if (it == _row_basis_positions.end()) {
943  _row_basis_positions.emplace(x, std::vector<size_t>());
944  }
945  _row_basis_positions[x].push_back(_left_reps.size());
946  _left_reps.push_back(A);
947  _left_mults.push_back(h * w);
948  _left_mults_inv.push_back(
949  _left_idem_class->cbegin_left_mults_inv()[i]
950  * left_idem_left_mult * inv);
951  }
952  }
953  }
954 
955  for (BMat8 h : _right_idem_H_class) {
956  for (size_t i = 0; i < right_idem_right_reps.size(); ++i) {
957  BMat8 z = right_idem_right_reps[i];
958  std::vector<BMat8> zhHx;
959  for (BMat8 s : _H_class) {
960  zhHx.push_back(z * h * s);
961  }
962  std::sort(zhHx.begin(), zhHx.end());
963  if (zhHx_set.find(zhHx) == zhHx_set.end()) {
964  zhHx_set.insert(zhHx);
965  BMat8 B = z * h * _rep;
966  BMat8 inv
967  = group_inverse(_right_idem_above, h)
968  * group_inverse(
969  _right_idem_above,
970  right_idem_right_mult
971  * _right_idem_class->cbegin_right_mults_inv()[i]
972  * z);
973 
974  size_t x = B.col_space_basis().to_int();
975  auto it = _col_basis_positions.find(x);
976  if (it == _col_basis_positions.end()) {
977  _col_basis_positions.emplace(x, std::vector<size_t>());
978  }
979  _col_basis_positions[x].push_back(_right_reps.size());
980  _right_reps.push_back(B);
981  _right_mults.push_back(z * h);
982  _right_mults_inv.push_back(
983  inv * right_idem_right_mult
984  * _right_idem_class->cbegin_right_mults_inv()[i]);
985  }
986  }
987  }
988  }
989 
990  std::unordered_map<size_t, std::vector<size_t>> _col_basis_positions;
991  BMat8 _left_idem_above;
992  RegularDClass* _left_idem_class;
993  std::unordered_set<BMat8> _H_set;
994  BMat8 _right_idem_above;
995  RegularDClass* _right_idem_class;
996  std::unordered_map<size_t, std::vector<size_t>> _row_basis_positions;
997  };
998 
999  Konieczny::~Konieczny() {
1000  for (BaseDClass* D : _D_classes) {
1001  delete D;
1002  }
1003  }
1004 
1005  void Konieczny::add_D_class(Konieczny::RegularDClass* D) {
1006  _regular_D_classes.push_back(D);
1007  _D_classes.push_back(D);
1008  _D_rels.push_back(std::vector<size_t>());
1009  }
1010 
1011  void Konieczny::add_D_class(Konieczny::NonRegularDClass* D) {
1012  _D_classes.push_back(D);
1013  _D_rels.push_back(std::vector<size_t>());
1014  }
1015 
1016  size_t Konieczny::size() const {
1017  size_t out = 0;
1018  auto it = _D_classes.begin();
1019  if (!_perm_in_gens) {
1020  it++;
1021  }
1022  for (; it < _D_classes.end(); it++) {
1023  out += (*it)->size();
1024  }
1025  return out;
1026  }
1027 
1028  void Konieczny::compute_D_classes() {
1029  conditional_add_identity();
1030  compute_orbs();
1031 
1032  std::vector<std::vector<std::pair<BMat8, size_t>>> reg_reps(
1033  257, std::vector<std::pair<BMat8, size_t>>());
1034  std::vector<std::vector<std::pair<BMat8, size_t>>> non_reg_reps(
1035  257, std::vector<std::pair<BMat8, size_t>>());
1036  // TODO: reserve?
1037  std::set<size_t> cards;
1038  size_t max_card = 0;
1039  cards.insert(0);
1040 
1041  RegularDClass* top = new RegularDClass(this, bmat8_sub_one(_dim));
1042  add_D_class(top);
1043  for (BMat8 x : top->covering_reps()) {
1044  size_t card = x.row_space_size();
1045  cards.insert(card);
1046  if (is_regular_element(x)) {
1047  reg_reps[card].push_back(std::make_pair(x, 0));
1048  } else {
1049  non_reg_reps[card].push_back(std::make_pair(x, 0));
1050  }
1051  }
1052 
1053  // std::cout << "next card: " << internal::to_string(*cards.rbegin())
1054  // << std::endl;
1055 
1056  while (*cards.rbegin() > 0) {
1057  size_t reps_are_reg = false;
1058  std::vector<std::pair<BMat8, size_t>> next_reps;
1059 
1060  max_card = *cards.rbegin();
1061  if (!reg_reps[max_card].empty()) {
1062  reps_are_reg = true;
1063  next_reps = std::move(reg_reps[max_card]);
1064  reg_reps[max_card].clear();
1065  } else {
1066  next_reps = std::move(non_reg_reps[max_card]);
1067  non_reg_reps[max_card].clear();
1068  }
1069 
1070  std::vector<std::pair<BMat8, size_t>> tmp_next;
1071  for (auto it = next_reps.begin(); it < next_reps.end(); it++) {
1072  bool contained = false;
1073  for (size_t i = 0; i < _D_classes.size(); ++i) {
1074  if (_D_classes[i]->contains(std::get<0>(*it), max_card)) {
1075  _D_rels[i].push_back(std::get<1>(*it));
1076  contained = true;
1077  break;
1078  }
1079  }
1080  if (!contained) {
1081  tmp_next.push_back(*it);
1082  }
1083  }
1084  next_reps = std::move(tmp_next);
1085 
1086  while (!next_reps.empty()) {
1087  BaseDClass* D;
1088  std::tuple<BMat8, size_t> tup;
1089 
1090  if (reps_are_reg) {
1091  tup = next_reps.back();
1092  D = new RegularDClass(this, find_idem(std::get<0>(tup)));
1093  add_D_class(static_cast<RegularDClass*>(D));
1094  for (BMat8 x : D->covering_reps()) {
1095  size_t card = x.row_space_size();
1096  cards.insert(card);
1097  if (is_regular_element(x)) {
1098  reg_reps[card].push_back(
1099  std::make_pair(x, _D_classes.size() - 1));
1100  } else {
1101  non_reg_reps[card].push_back(
1102  std::make_pair(x, _D_classes.size() - 1));
1103  }
1104  }
1105  next_reps.pop_back();
1106 
1107  } else {
1108  tup = next_reps.back();
1109  D = new NonRegularDClass(this, std::get<0>(tup));
1110  add_D_class(static_cast<NonRegularDClass*>(D));
1111  for (BMat8 x : D->covering_reps()) {
1112  size_t card = x.row_space_size();
1113  cards.insert(card);
1114  if (is_regular_element(x)) {
1115  reg_reps[card].push_back(
1116  std::make_pair(x, _D_classes.size() - 1));
1117  } else {
1118  non_reg_reps[card].push_back(
1119  std::make_pair(x, _D_classes.size() - 1));
1120  }
1121  }
1122  next_reps.pop_back();
1123  }
1124 
1125  std::vector<std::pair<BMat8, size_t>> tmp;
1126  for (std::pair<BMat8, size_t> x : next_reps) {
1127  if (D->contains(std::get<0>(x))) {
1128  _D_rels[_D_classes.size() - 1].push_back(std::get<1>(x));
1129  } else {
1130  tmp.push_back(x);
1131  }
1132  }
1133  next_reps = std::move(tmp);
1134  }
1135 #ifdef LIBSEMIGROUPS_DEBUG
1136  LIBSEMIGROUPS_ASSERT(reg_reps[max_card].empty());
1137 #endif
1138  if (non_reg_reps[max_card].empty()) {
1139  cards.erase(max_card);
1140  max_card = *cards.rbegin();
1141  }
1142  }
1143  }
1144 } // namespace libsemigroups
1145 #endif // LIBSEMIGROUPS_INCLUDE_KONIECZNY_HPP_
size_t operator()(std::vector< BMat8 > vec) const
Hashes a vector of BMat8s.
Definition: konieczny.hpp:60
-
This file contains a generic implementation of a class Orb which represents the action of a semigroup...
-
This file contains an implementation of out-regular digraph which represents the action of a semigrou...
-
Provides a call operator returning a hash value for a pair of size_t.
Definition: konieczny.hpp:47
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
Provides a call operator returning a hash value for a vector of BMat8s.
Definition: konieczny.hpp:58
-
size_t operator()(std::pair< size_t, size_t > x) const
Hashes a pair of size_t.
Definition: konieczny.hpp:49
-
- - - - diff --git a/libsemigroups-config_8h_source.html b/libsemigroups-config_8h_source.html deleted file mode 100644 index 13b3db0a0..000000000 --- a/libsemigroups-config_8h_source.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: src/libsemigroups-config.h Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups-config.h
-
-
-
1 #ifndef _SRC_LIBSEMIGROUPS_CONFIG_H
2 #define _SRC_LIBSEMIGROUPS_CONFIG_H 1
3 
4 /* src/libsemigroups-config.h. Generated automatically at end of configure. */
5 /* config/config.h. Generated from config.h.in by configure. */
6 /* config/config.h.in. Generated from configure.ac by autoheader. */
7 
8 /* define if building in debug mode */
9 /* #undef DEBUG */
10 
11 /* define if the compiler supports basic C++11 syntax */
12 #ifndef LIBSEMIGROUPS_HAVE_CXX11
13 #define LIBSEMIGROUPS_HAVE_CXX11 1
14 #endif
15 
16 /* Define to 1 if you have the <dlfcn.h> header file. */
17 #ifndef LIBSEMIGROUPS_HAVE_DLFCN_H
18 #define LIBSEMIGROUPS_HAVE_DLFCN_H 1
19 #endif
20 
21 /* Define to 1 if you have the `gettimeofday' function. */
22 #ifndef LIBSEMIGROUPS_HAVE_GETTIMEOFDAY
23 #define LIBSEMIGROUPS_HAVE_GETTIMEOFDAY 1
24 #endif
25 
26 /* Define to 1 if you have the <inttypes.h> header file. */
27 #ifndef LIBSEMIGROUPS_HAVE_INTTYPES_H
28 #define LIBSEMIGROUPS_HAVE_INTTYPES_H 1
29 #endif
30 
31 /* Define to 1 if you have the `pthread' library (-lpthread). */
32 #ifndef LIBSEMIGROUPS_HAVE_LIBPTHREAD
33 #define LIBSEMIGROUPS_HAVE_LIBPTHREAD 1
34 #endif
35 
36 /* Define to 1 if you have the <limits.h> header file. */
37 #ifndef LIBSEMIGROUPS_HAVE_LIMITS_H
38 #define LIBSEMIGROUPS_HAVE_LIMITS_H 1
39 #endif
40 
41 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
42  to 0 otherwise. */
43 #ifndef LIBSEMIGROUPS_HAVE_MALLOC
44 #define LIBSEMIGROUPS_HAVE_MALLOC 1
45 #endif
46 
47 /* Define to 1 if you have the <memory.h> header file. */
48 #ifndef LIBSEMIGROUPS_HAVE_MEMORY_H
49 #define LIBSEMIGROUPS_HAVE_MEMORY_H 1
50 #endif
51 
52 /* Define to 1 if you have the `memset' function. */
53 #ifndef LIBSEMIGROUPS_HAVE_MEMSET
54 #define LIBSEMIGROUPS_HAVE_MEMSET 1
55 #endif
56 
57 /* Define to 1 if you have the `pow' function. */
58 #ifndef LIBSEMIGROUPS_HAVE_POW
59 #define LIBSEMIGROUPS_HAVE_POW 1
60 #endif
61 
62 /* Define if you have POSIX threads libraries and header files. */
63 #ifndef LIBSEMIGROUPS_HAVE_PTHREAD
64 #define LIBSEMIGROUPS_HAVE_PTHREAD 1
65 #endif
66 
67 /* Define to 1 if you have the <pthread.h> header file. */
68 #ifndef LIBSEMIGROUPS_HAVE_PTHREAD_H
69 #define LIBSEMIGROUPS_HAVE_PTHREAD_H 1
70 #endif
71 
72 /* Have PTHREAD_PRIO_INHERIT. */
73 #ifndef LIBSEMIGROUPS_HAVE_PTHREAD_PRIO_INHERIT
74 #define LIBSEMIGROUPS_HAVE_PTHREAD_PRIO_INHERIT 1
75 #endif
76 
77 /* Define to 1 if the system has the type `ptrdiff_t'. */
78 /* #undef HAVE_PTRDIFF_T */
79 
80 /* Define to 1 if you have the `sqrt' function. */
81 #ifndef LIBSEMIGROUPS_HAVE_SQRT
82 #define LIBSEMIGROUPS_HAVE_SQRT 1
83 #endif
84 
85 /* Define to 1 if you have the <stdint.h> header file. */
86 #ifndef LIBSEMIGROUPS_HAVE_STDINT_H
87 #define LIBSEMIGROUPS_HAVE_STDINT_H 1
88 #endif
89 
90 /* Define to 1 if you have the <stdlib.h> header file. */
91 #ifndef LIBSEMIGROUPS_HAVE_STDLIB_H
92 #define LIBSEMIGROUPS_HAVE_STDLIB_H 1
93 #endif
94 
95 /* Define to 1 if you have the <strings.h> header file. */
96 #ifndef LIBSEMIGROUPS_HAVE_STRINGS_H
97 #define LIBSEMIGROUPS_HAVE_STRINGS_H 1
98 #endif
99 
100 /* Define to 1 if you have the <string.h> header file. */
101 #ifndef LIBSEMIGROUPS_HAVE_STRING_H
102 #define LIBSEMIGROUPS_HAVE_STRING_H 1
103 #endif
104 
105 /* Define to 1 if you have the <sys/stat.h> header file. */
106 #ifndef LIBSEMIGROUPS_HAVE_SYS_STAT_H
107 #define LIBSEMIGROUPS_HAVE_SYS_STAT_H 1
108 #endif
109 
110 /* Define to 1 if you have the <sys/time.h> header file. */
111 #ifndef LIBSEMIGROUPS_HAVE_SYS_TIME_H
112 #define LIBSEMIGROUPS_HAVE_SYS_TIME_H 1
113 #endif
114 
115 /* Define to 1 if you have the <sys/types.h> header file. */
116 #ifndef LIBSEMIGROUPS_HAVE_SYS_TYPES_H
117 #define LIBSEMIGROUPS_HAVE_SYS_TYPES_H 1
118 #endif
119 
120 /* Define to 1 if you have the <unistd.h> header file. */
121 #ifndef LIBSEMIGROUPS_HAVE_UNISTD_H
122 #define LIBSEMIGROUPS_HAVE_UNISTD_H 1
123 #endif
124 
125 /* Define to 1 if the system has the type `_Bool'. */
126 /* #undef HAVE__BOOL */
127 
128 /* Define to the sub-directory where libtool stores uninstalled libraries. */
129 #ifndef LIBSEMIGROUPS_LT_OBJDIR
130 #define LIBSEMIGROUPS_LT_OBJDIR ".libs/"
131 #endif
132 
133 /* Name of package */
134 #ifndef LIBSEMIGROUPS_PACKAGE
135 #define LIBSEMIGROUPS_PACKAGE "libsemigroups"
136 #endif
137 
138 /* Define to the address where bug reports for this package should be sent. */
139 #ifndef LIBSEMIGROUPS_PACKAGE_BUGREPORT
140 #define LIBSEMIGROUPS_PACKAGE_BUGREPORT "jdm3@st-andrews.ac.uk"
141 #endif
142 
143 /* Define to the full name of this package. */
144 #ifndef LIBSEMIGROUPS_PACKAGE_NAME
145 #define LIBSEMIGROUPS_PACKAGE_NAME "libsemigroups"
146 #endif
147 
148 /* Define to the full name and version of this package. */
149 #ifndef LIBSEMIGROUPS_PACKAGE_STRING
150 #define LIBSEMIGROUPS_PACKAGE_STRING "libsemigroups 0.6.7"
151 #endif
152 
153 /* Define to the one symbol short name of this package. */
154 #ifndef LIBSEMIGROUPS_PACKAGE_TARNAME
155 #define LIBSEMIGROUPS_PACKAGE_TARNAME "libsemigroups"
156 #endif
157 
158 /* Define to the home page for this package. */
159 #ifndef LIBSEMIGROUPS_PACKAGE_URL
160 #define LIBSEMIGROUPS_PACKAGE_URL ""
161 #endif
162 
163 /* Define to the version of this package. */
164 #ifndef LIBSEMIGROUPS_PACKAGE_VERSION
165 #define LIBSEMIGROUPS_PACKAGE_VERSION "0.6.7"
166 #endif
167 
168 /* Define to necessary symbol if this constant uses a non-standard name on
169  your system. */
170 /* #undef PTHREAD_CREATE_JOINABLE */
171 
172 /* define if building in stats mode */
173 /* #undef STATS */
174 
175 /* Define to 1 if you have the ANSI C header files. */
176 /* #undef STDC_HEADERS */
177 
178 /* Version number of package */
179 #ifndef LIBSEMIGROUPS_VERSION
180 #define LIBSEMIGROUPS_VERSION "0.6.7"
181 #endif
182 
183 /* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
184  <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
185  #define below would cause a syntax error. */
186 /* #undef _UINT64_T */
187 
188 /* Define to `__inline__' or `__inline' if that's what the C compiler
189  calls it, or to nothing if 'inline' is not supported under any name. */
190 #ifndef __cplusplus
191 /* #undef inline */
192 #endif
193 
194 /* Define to the type of a signed integer type of width exactly 64 bits if
195  such a type exists and the standard includes do not define it. */
196 /* #undef int64_t */
197 
198 /* Define to rpl_malloc if the replacement function should be used. */
199 /* #undef malloc */
200 
201 /* Define to `unsigned int' if <sys/types.h> does not define. */
202 /* #undef size_t */
203 
204 /* Define to the type of an unsigned integer type of width exactly 64 bits if
205  such a type exists and the standard includes do not define it. */
206 /* #undef uint64_t */
207 
208 /* once: _SRC_LIBSEMIGROUPS_CONFIG_H */
209 #endif
- - - - diff --git a/libsemigroups-config_8hpp_source.html b/libsemigroups-config_8hpp_source.html deleted file mode 100644 index 2a335a0dd..000000000 --- a/libsemigroups-config_8hpp_source.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: include/libsemigroups-config.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups-config.hpp
-
-
-
1 #ifndef _INCLUDE_LIBSEMIGROUPS_CONFIG_HPP
2 #define _INCLUDE_LIBSEMIGROUPS_CONFIG_HPP 1
3 
4 /* include/libsemigroups-config.hpp. Generated automatically at end of
5  * configure. */
6 /* config/config.h. Generated from config.h.in by configure. */
7 /* config/config.h.in. Generated from configure.ac by autoheader. */
8 
9 /* define if building in debug mode */
10 /* #undef DEBUG */
11 
12 /* define if google's dense_hash_map is available */
13 /* #undef DENSEHASHMAP */
14 
15 /* define if the compiler supports basic C++11 syntax */
16 #ifndef LIBSEMIGROUPS_HAVE_CXX11
17 #define LIBSEMIGROUPS_HAVE_CXX11 1
18 #endif
19 
20 /* Define to 1 if you have the <dlfcn.h> header file. */
21 #ifndef LIBSEMIGROUPS_HAVE_DLFCN_H
22 #define LIBSEMIGROUPS_HAVE_DLFCN_H 1
23 #endif
24 
25 /* Define to 1 if you have the `gettimeofday' function. */
26 #ifndef LIBSEMIGROUPS_HAVE_GETTIMEOFDAY
27 #define LIBSEMIGROUPS_HAVE_GETTIMEOFDAY 1
28 #endif
29 
30 /* Define to 1 if you have the <inttypes.h> header file. */
31 #ifndef LIBSEMIGROUPS_HAVE_INTTYPES_H
32 #define LIBSEMIGROUPS_HAVE_INTTYPES_H 1
33 #endif
34 
35 /* Define to 1 if you have the `pthread' library (-lpthread). */
36 #ifndef LIBSEMIGROUPS_HAVE_LIBPTHREAD
37 #define LIBSEMIGROUPS_HAVE_LIBPTHREAD 1
38 #endif
39 
40 /* Define to 1 if you have the <limits.h> header file. */
41 #ifndef LIBSEMIGROUPS_HAVE_LIMITS_H
42 #define LIBSEMIGROUPS_HAVE_LIMITS_H 1
43 #endif
44 
45 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
46  to 0 otherwise. */
47 #ifndef LIBSEMIGROUPS_HAVE_MALLOC
48 #define LIBSEMIGROUPS_HAVE_MALLOC 1
49 #endif
50 
51 /* Define to 1 if you have the <memory.h> header file. */
52 #ifndef LIBSEMIGROUPS_HAVE_MEMORY_H
53 #define LIBSEMIGROUPS_HAVE_MEMORY_H 1
54 #endif
55 
56 /* Define to 1 if you have the `memset' function. */
57 #ifndef LIBSEMIGROUPS_HAVE_MEMSET
58 #define LIBSEMIGROUPS_HAVE_MEMSET 1
59 #endif
60 
61 /* Define to 1 if you have the `pow' function. */
62 #ifndef LIBSEMIGROUPS_HAVE_POW
63 #define LIBSEMIGROUPS_HAVE_POW 1
64 #endif
65 
66 /* Define if you have POSIX threads libraries and header files. */
67 #ifndef LIBSEMIGROUPS_HAVE_PTHREAD
68 #define LIBSEMIGROUPS_HAVE_PTHREAD 1
69 #endif
70 
71 /* Define to 1 if you have the <pthread.h> header file. */
72 #ifndef LIBSEMIGROUPS_HAVE_PTHREAD_H
73 #define LIBSEMIGROUPS_HAVE_PTHREAD_H 1
74 #endif
75 
76 /* Have PTHREAD_PRIO_INHERIT. */
77 #ifndef LIBSEMIGROUPS_HAVE_PTHREAD_PRIO_INHERIT
78 #define LIBSEMIGROUPS_HAVE_PTHREAD_PRIO_INHERIT 1
79 #endif
80 
81 /* Define to 1 if the system has the type `ptrdiff_t'. */
82 /* #undef HAVE_PTRDIFF_T */
83 
84 /* Define to 1 if you have the `sqrt' function. */
85 #ifndef LIBSEMIGROUPS_HAVE_SQRT
86 #define LIBSEMIGROUPS_HAVE_SQRT 1
87 #endif
88 
89 /* Define to 1 if you have the <stdint.h> header file. */
90 #ifndef LIBSEMIGROUPS_HAVE_STDINT_H
91 #define LIBSEMIGROUPS_HAVE_STDINT_H 1
92 #endif
93 
94 /* Define to 1 if you have the <stdlib.h> header file. */
95 #ifndef LIBSEMIGROUPS_HAVE_STDLIB_H
96 #define LIBSEMIGROUPS_HAVE_STDLIB_H 1
97 #endif
98 
99 /* Define to 1 if you have the <strings.h> header file. */
100 #ifndef LIBSEMIGROUPS_HAVE_STRINGS_H
101 #define LIBSEMIGROUPS_HAVE_STRINGS_H 1
102 #endif
103 
104 /* Define to 1 if you have the <string.h> header file. */
105 #ifndef LIBSEMIGROUPS_HAVE_STRING_H
106 #define LIBSEMIGROUPS_HAVE_STRING_H 1
107 #endif
108 
109 /* Define to 1 if you have the <sys/stat.h> header file. */
110 #ifndef LIBSEMIGROUPS_HAVE_SYS_STAT_H
111 #define LIBSEMIGROUPS_HAVE_SYS_STAT_H 1
112 #endif
113 
114 /* Define to 1 if you have the <sys/time.h> header file. */
115 #ifndef LIBSEMIGROUPS_HAVE_SYS_TIME_H
116 #define LIBSEMIGROUPS_HAVE_SYS_TIME_H 1
117 #endif
118 
119 /* Define to 1 if you have the <sys/types.h> header file. */
120 #ifndef LIBSEMIGROUPS_HAVE_SYS_TYPES_H
121 #define LIBSEMIGROUPS_HAVE_SYS_TYPES_H 1
122 #endif
123 
124 /* Define to 1 if you have the <unistd.h> header file. */
125 #ifndef LIBSEMIGROUPS_HAVE_UNISTD_H
126 #define LIBSEMIGROUPS_HAVE_UNISTD_H 1
127 #endif
128 
129 /* Define to 1 if the system has the type `_Bool'. */
130 /* #undef HAVE__BOOL */
131 
132 /* define if building with HPCombi */
133 #ifndef LIBSEMIGROUPS_HPCOMBI
134 #define LIBSEMIGROUPS_HPCOMBI 1
135 #endif
136 
137 /* Define to the sub-directory where libtool stores uninstalled libraries. */
138 #ifndef LIBSEMIGROUPS_LT_OBJDIR
139 #define LIBSEMIGROUPS_LT_OBJDIR ".libs/"
140 #endif
141 
142 /* Name of package */
143 #ifndef LIBSEMIGROUPS_PACKAGE
144 #define LIBSEMIGROUPS_PACKAGE "libsemigroups"
145 #endif
146 
147 /* Define to the address where bug reports for this package should be sent. */
148 #ifndef LIBSEMIGROUPS_PACKAGE_BUGREPORT
149 #define LIBSEMIGROUPS_PACKAGE_BUGREPORT "jdm3@st-andrews.ac.uk"
150 #endif
151 
152 /* Define to the full name of this package. */
153 #ifndef LIBSEMIGROUPS_PACKAGE_NAME
154 #define LIBSEMIGROUPS_PACKAGE_NAME "libsemigroups"
155 #endif
156 
157 /* Define to the full name and version of this package. */
158 #ifndef LIBSEMIGROUPS_PACKAGE_STRING
159 #define LIBSEMIGROUPS_PACKAGE_STRING "libsemigroups 1.0.0"
160 #endif
161 
162 /* Define to the one symbol short name of this package. */
163 #ifndef LIBSEMIGROUPS_PACKAGE_TARNAME
164 #define LIBSEMIGROUPS_PACKAGE_TARNAME "libsemigroups"
165 #endif
166 
167 /* Define to the home page for this package. */
168 #ifndef LIBSEMIGROUPS_PACKAGE_URL
169 #define LIBSEMIGROUPS_PACKAGE_URL ""
170 #endif
171 
172 /* Define to the version of this package. */
173 #ifndef LIBSEMIGROUPS_PACKAGE_VERSION
174 #define LIBSEMIGROUPS_PACKAGE_VERSION "1.0.0"
175 #endif
176 
177 /* Define to necessary symbol if this constant uses a non-standard name on
178  your system. */
179 /* #undef PTHREAD_CREATE_JOINABLE */
180 
181 /* The size of `void *', as computed by sizeof. */
182 #ifndef LIBSEMIGROUPS_SIZEOF_VOID_P
183 #define LIBSEMIGROUPS_SIZEOF_VOID_P 8
184 #endif
185 
186 /* define if building in stats mode */
187 /* #undef STATS */
188 
189 /* Define to 1 if you have the ANSI C header files. */
190 /* #undef STDC_HEADERS */
191 
192 /* Version number of package */
193 #ifndef LIBSEMIGROUPS_VERSION
194 #define LIBSEMIGROUPS_VERSION "1.0.0"
195 #endif
196 
197 /* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
198  <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
199  #define below would cause a syntax error. */
200 /* #undef _UINT64_T */
201 
202 /* Define to `__inline__' or `__inline' if that's what the C compiler
203  calls it, or to nothing if 'inline' is not supported under any name. */
204 #ifndef __cplusplus
205 /* #undef inline */
206 #endif
207 
208 /* Define to the type of a signed integer type of width exactly 64 bits if
209  such a type exists and the standard includes do not define it. */
210 /* #undef int64_t */
211 
212 /* Define to rpl_malloc if the replacement function should be used. */
213 /* #undef malloc */
214 
215 /* Define to `unsigned int' if <sys/types.h> does not define. */
216 /* #undef size_t */
217 
218 /* Define to the type of an unsigned integer type of width exactly 64 bits if
219  such a type exists and the standard includes do not define it. */
220 /* #undef uint64_t */
221 
222 /* once: _INCLUDE_LIBSEMIGROUPS_CONFIG_HPP */
223 #endif
- - - - diff --git a/libsemigroups-debug_8h_source.html b/libsemigroups-debug_8h_source.html deleted file mode 100644 index 1a27078f4..000000000 --- a/libsemigroups-debug_8h_source.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: src/libsemigroups-debug.h Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups-debug.h
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2017 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file declares debugging functionality.
20 
21 #ifndef LIBSEMIGROUPS_SRC_LIBSEMIGROUPS_DEBUG_H_
22 #define LIBSEMIGROUPS_SRC_LIBSEMIGROUPS_DEBUG_H_
23 
24 #include <assert.h>
25 
26 #include "libsemigroups-config.h"
27 
28 #ifdef LIBSEMIGROUPS_DEBUG
29 #define LIBSEMIGROUPS_ASSERT(x) assert(x)
30 #else
31 #define LIBSEMIGROUPS_ASSERT(x)
32 #endif
33 
34 #endif // LIBSEMIGROUPS_SRC_LIBSEMIGROUPS_DEBUG_H_
- - - - diff --git a/libsemigroups-debug_8hpp_source.html b/libsemigroups-debug_8hpp_source.html deleted file mode 100644 index 884576049..000000000 --- a/libsemigroups-debug_8hpp_source.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: include/libsemigroups-debug.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups-debug.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2017 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 // This file declares debugging functionality.
20 
21 #ifndef LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_DEBUG_HPP_
22 #define LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_DEBUG_HPP_
23 
24 #include <assert.h>
25 
26 #include "libsemigroups-config.hpp"
27 
28 #ifdef LIBSEMIGROUPS_DEBUG
29 #define LIBSEMIGROUPS_ASSERT(x) assert(x)
30 #else
31 #define LIBSEMIGROUPS_ASSERT(x)
32 #endif
33 
34 #if (defined(__GNUC__) && __GNUC__ < 5 \
35  && !(defined(__clang__) || defined(__INTEL_COMPILER)))
36 #pragma message( \
37  "GCC version >=5.0 is recommended, some features may not work correctly")
38 #endif
39 
40 #endif // LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_DEBUG_HPP_
- - - - diff --git a/libsemigroups-exception_8hpp_source.html b/libsemigroups-exception_8hpp_source.html deleted file mode 100644 index 038381c3f..000000000 --- a/libsemigroups-exception_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/libsemigroups-exception.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups-exception.hpp
-
-
-
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_EXCEPTION_HPP_
20 #define LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_EXCEPTION_HPP_
21 
22 #include <exception>
23 #include <string>
24 
25 #include "stl.hpp"
26 
27 namespace libsemigroups {
28  struct LibsemigroupsException : public std::runtime_error {
29  LibsemigroupsException(std::string const& fname,
30  int linenum,
31  std::string const& funcname,
32  std::string const& msg)
33  : std::runtime_error(fname + ":" + internal::to_string(linenum) + ":"
34  + funcname + ": " + msg) {}
35  };
36 } // namespace libsemigroups
37 
38 #define LIBSEMIGROUPS_EXCEPTION(msg) \
39  std::stringstream _libsemigroups_ss; \
40  _libsemigroups_ss << msg; \
41  throw LibsemigroupsException( \
42  __FILE__, __LINE__, __func__, _libsemigroups_ss.str());
43 #define INTERNAL_EXCEPTION \
44  LIBSEMIGROUPS_EXCEPTION("internal error, something went wrong")
45 
46 #endif // LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_EXCEPTION_HPP_
Definition: kbe.hpp:198
-
Namespace for everything in the libsemigroups library.
Definition: adapters.hpp:34
-
- - - - diff --git a/libsemigroups_8hpp.html b/libsemigroups_8hpp.html deleted file mode 100644 index 225364560..000000000 --- a/libsemigroups_8hpp.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -libsemigroups: include/libsemigroups.hpp File Reference - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups.hpp File Reference
-
-
- -

This file includes all the headers in libsemigroups, for convenience. -More...

-
#include "blocks.hpp"
-#include "bmat8.hpp"
-#include "cong-base.hpp"
-#include "cong-pair.hpp"
-#include "cong.hpp"
-#include "constants.hpp"
-#include "containers.hpp"
-#include "fpsemi-base.hpp"
-#include "fpsemi.hpp"
-#include "froidure-pin-base.hpp"
-#include "knuth-bendix.hpp"
-#include "libsemigroups-config.hpp"
-#include "libsemigroups-debug.hpp"
-#include "libsemigroups-exception.hpp"
-#include "obvinf.hpp"
-#include "race.hpp"
-#include "range.hpp"
-#include "reduct.hpp"
-#include "report.hpp"
-#include "runner.hpp"
-#include "schreier-sims.hpp"
-#include "semiring.hpp"
-#include "stl.hpp"
-#include "tce.hpp"
-#include "timer.hpp"
-#include "todd-coxeter.hpp"
-#include "traits.hpp"
-#include "types.hpp"
-#include "uf.hpp"
-#include "wrap.hpp"
-
-Include dependency graph for libsemigroups.hpp:
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

Go to the source code of this file.

-

Detailed Description

-

This file includes all the headers in libsemigroups, for convenience.

-
- - - - diff --git a/libsemigroups_8hpp__incl.map b/libsemigroups_8hpp__incl.map deleted file mode 100644 index d1fbf2b39..000000000 --- a/libsemigroups_8hpp__incl.map +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libsemigroups_8hpp__incl.md5 b/libsemigroups_8hpp__incl.md5 deleted file mode 100644 index 965a80a48..000000000 --- a/libsemigroups_8hpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -a2b68fd5de14ff03cdfecede56930950 \ No newline at end of file diff --git a/libsemigroups_8hpp__incl.png b/libsemigroups_8hpp__incl.png deleted file mode 100644 index 391d3b892..000000000 Binary files a/libsemigroups_8hpp__incl.png and /dev/null differ diff --git a/libsemigroups_8hpp_source.html b/libsemigroups_8hpp_source.html deleted file mode 100644 index 59a752491..000000000 --- a/libsemigroups_8hpp_source.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -libsemigroups: include/libsemigroups.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
libsemigroups -
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
libsemigroups.hpp
-
-
-Go to the documentation of this file.
1 //
2 // libsemigroups - C++ library for semigroups and monoids
3 // Copyright (C) 2018 James D. Mitchell
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
21 
22 #ifndef LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_HPP_
23 #define LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_HPP_
24 
25 #include "blocks.hpp"
26 #include "bmat8.hpp"
27 #include "cong-base.hpp"
28 #include "cong-pair.hpp"
29 #include "cong.hpp"
30 #include "constants.hpp"
31 #include "containers.hpp"
32 #include "fpsemi-base.hpp"
33 #include "fpsemi.hpp"
34 #include "froidure-pin-base.hpp"
35 #include "knuth-bendix.hpp"
36 #include "libsemigroups-config.hpp"
37 #include "libsemigroups-debug.hpp"
38 #include "libsemigroups-exception.hpp"
39 #include "obvinf.hpp"
40 #include "race.hpp"
41 #include "range.hpp"
42 #include "reduct.hpp"
43 #include "report.hpp"
44 #include "runner.hpp"
45 #include "schreier-sims.hpp"
46 #include "semiring.hpp"
47 #include "stl.hpp"
48 #include "tce.hpp"
49 #include "timer.hpp"
50 #include "todd-coxeter.hpp"
51 #include "traits.hpp"
52 #include "types.hpp"
53 #include "uf.hpp"
54 #include "wrap.hpp"
55 
56 #ifdef LIBSEMIGROUPS_DENSEHASHMAP
57 #include "extern/sparsehash-c11/sparsehash/dense_hash_map"
58 #endif
59 
60 #endif // LIBSEMIGROUPS_INCLUDE_LIBSEMIGROUPS_HPP_
- - - - diff --git a/menu.js b/menu.js deleted file mode 100644 index 433c15b8f..000000000 --- a/menu.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { - function makeTree(data,relPath) { - var result=''; - if ('children' in data) { - result+=''; - } - return result; - } - - $('#main-nav').append(makeTree(menudata,relPath)); - $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); - if (searchEnabled) { - if (serverSide) { - $('#main-menu').append('
  • '); - } else { - $('#main-menu').append('
  • '); - } - } - $('#main-menu').smartmenus(); -} -/* @license-end */ diff --git a/menudata.js b/menudata.js deleted file mode 100644 index 6ccecb628..000000000 --- a/menudata.js +++ /dev/null @@ -1,92 +0,0 @@ -/* -@ @licstart The following is the entire license notice for the -JavaScript code in this file. - -Copyright (C) 1997-2017 by Dimitri van Heesch - -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 2 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, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -@licend The above is the entire license notice -for the JavaScript code in this file -*/ -var menudata={children:[ -{text:"Main Page",url:"index.html"}, -{text:"Namespaces",url:"namespaces.html",children:[ -{text:"Namespace List",url:"namespaces.html"}, -{text:"Namespace Members",url:"namespacemembers.html",children:[ -{text:"All",url:"namespacemembers.html"}, -{text:"Functions",url:"namespacemembers_func.html"}, -{text:"Typedefs",url:"namespacemembers_type.html"}]}]}, -{text:"Classes",url:"annotated.html",children:[ -{text:"Class List",url:"annotated.html"}, -{text:"Class Index",url:"classes.html"}, -{text:"Class Hierarchy",url:"inherits.html"}, -{text:"Class Members",url:"functions.html",children:[ -{text:"All",url:"functions.html",children:[ -{text:"_",url:"functions.html#index__5F"}, -{text:"a",url:"functions_a.html#index_a"}, -{text:"b",url:"functions_b.html#index_b"}, -{text:"c",url:"functions_c.html#index_c"}, -{text:"d",url:"functions_d.html#index_d"}, -{text:"e",url:"functions_e.html#index_e"}, -{text:"f",url:"functions_f.html#index_f"}, -{text:"g",url:"functions_g.html#index_g"}, -{text:"h",url:"functions_h.html#index_h"}, -{text:"i",url:"functions_i.html#index_i"}, -{text:"k",url:"functions_k.html#index_k"}, -{text:"l",url:"functions_l.html#index_l"}, -{text:"m",url:"functions_m.html#index_m"}, -{text:"n",url:"functions_n.html#index_n"}, -{text:"o",url:"functions_o.html#index_o"}, -{text:"p",url:"functions_p.html#index_p"}, -{text:"r",url:"functions_r.html#index_r"}, -{text:"s",url:"functions_s.html#index_s"}, -{text:"t",url:"functions_t.html#index_t"}, -{text:"u",url:"functions_u.html#index_u"}, -{text:"v",url:"functions_v.html#index_v"}, -{text:"w",url:"functions_w.html#index_w"}, -{text:"z",url:"functions_z.html#index_z"}, -{text:"~",url:"functions_~.html#index__7E"}]}, -{text:"Functions",url:"functions_func.html",children:[ -{text:"a",url:"functions_func.html#index_a"}, -{text:"b",url:"functions_func_b.html#index_b"}, -{text:"c",url:"functions_func_c.html#index_c"}, -{text:"d",url:"functions_func_d.html#index_d"}, -{text:"e",url:"functions_func_e.html#index_e"}, -{text:"f",url:"functions_func_f.html#index_f"}, -{text:"g",url:"functions_func_g.html#index_g"}, -{text:"h",url:"functions_func_h.html#index_h"}, -{text:"i",url:"functions_func_i.html#index_i"}, -{text:"k",url:"functions_func_k.html#index_k"}, -{text:"l",url:"functions_func_l.html#index_l"}, -{text:"m",url:"functions_func_m.html#index_m"}, -{text:"n",url:"functions_func_n.html#index_n"}, -{text:"o",url:"functions_func_o.html#index_o"}, -{text:"p",url:"functions_func_p.html#index_p"}, -{text:"r",url:"functions_func_r.html#index_r"}, -{text:"s",url:"functions_func_s.html#index_s"}, -{text:"t",url:"functions_func_t.html#index_t"}, -{text:"u",url:"functions_func_u.html#index_u"}, -{text:"v",url:"functions_func_v.html#index_v"}, -{text:"w",url:"functions_func_w.html#index_w"}, -{text:"z",url:"functions_func_z.html#index_z"}, -{text:"~",url:"functions_func_~.html#index__7E"}]}, -{text:"Variables",url:"functions_vars.html"}, -{text:"Typedefs",url:"functions_type.html"}, -{text:"Enumerations",url:"functions_enum.html"}, -{text:"Enumerator",url:"functions_eval.html"}, -{text:"Related Functions",url:"functions_rela.html"}]}]}, -{text:"Files",url:"files.html",children:[ -{text:"File List",url:"files.html"}]}]} diff --git a/namespacelibsemigroups.html b/namespacelibsemigroups.html deleted file mode 100644 index f3620ff4f..000000000 --- a/namespacelibsemigroups.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups Namespace Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - -
    -
    - -
    -
    libsemigroups Namespace Reference
    -
    -
    - -

    Namespace for everything in the libsemigroups library. -More...

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    class  Bipartition
     Class for bipartitions. More...
     
    class  Blocks
     Class for signed partitions of the set \(\{0, \ldots, n - 1\}\). More...
     
    class  BooleanMat
     Matrices over the boolean semiring. More...
     
    class  BooleanSemiring
     The usual Boolean semiring. More...
     
    class  Congruence
     Class for congruence on a semigroup or fintely presented semigroup. More...
     
    class  Element
     Abstract base class for semigroup elements. More...
     
    class  ElementWithVectorData
     Abstract base class for elements using a vector to store their defining data. More...
     
    class  ElementWithVectorDataDefaultHash
     Abstract base class for elements using a vector to store their defining data and the default hash function for that underlying vector. More...
     
    class  Integers
     The usual ring of integers. More...
     
    class  MatrixOverSemiring
     Matrices over a semiring. More...
     
    class  MatrixOverSemiringBase
     Matrices over a semiring. More...
     
    class  MaxPlusSemiring
     The max-plus semiring consists of the integers together with negative infinity with operations max and plus. Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY. More...
     
    class  MinPlusSemiring
     The min-plus semiring consists of the integers together with infinity with operations min and plus. Infinity is represented by Semiring<int64_t>::INFTY. More...
     
    class  NaturalSemiring
     This class implements the semiring consisting of \(\{0, 1, ..., t, t + 1, ..., t + p - 1\}\) for some threshold \(t\) and period \(p\) with operations addition and multiplication modulo the congruence \(t = t + p\). More...
     
    class  PartialPerm
     Template class for partial permutations. More...
     
    class  PartialTransformation
     Abstract class for partial transformations. More...
     
    class  Partition
     Class for partitions of a set used by Congruence::nontrivial_classes. More...
     
    class  PBR
     Class for partitioned binary relations (PBR). More...
     
    class  Permutation
     Template class for permutations. More...
     
    class  ProjectiveMaxPlusMatrix
     Class for projective max-plus matrices. More...
     
    class  ReductionOrdering
     This class provides a call operator which can be used to compare libsemigroups::rws_word_t. More...
     
    class  RWS
     This class is used to represent a string rewriting system defining a finitely presented monoid or semigroup. More...
     
    class  RWSE
     Subclass of Element that wraps an libsemigroups::rws_word_t. More...
     
    class  Semigroup
     Class for semigroups generated by instances of Element. More...
     
    class  Semiring
     This class its subclasses provide very basic functionality for creating semirings. More...
     
    class  SemiringWithThreshold
     This abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring. More...
     
    class  SHORTLEX
     This class implements the shortlex reduction ordering derived from an ordering on libsemigroups::rws_letter_t's. More...
     
    class  Transformation
     Template class for transformations. More...
     
    class  TropicalMaxPlusSemiring
     The tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\infty\). Negative infinity is represented by Semiring<int64_t>::MINUS_INFTY. More...
     
    class  TropicalMinPlusSemiring
     The tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\infty\). Infinity is represented by Semiring<int64_t>::INFTY. More...
     
    - - - - - - - - - - - - - -

    -Typedefs

    typedef Semigroup::cayley_graph_t cayley_graph_t
     This is just for backwards compatibility and should disappear at some point. More...
     
    typedef size_t letter_t
     Type for the index of a generator of a semigroup. More...
     
    typedef std::pair< word_t, word_trelation_t
     Type for a pair of word_t (a relation) of a semigroup. More...
     
    typedef std::vector< letter_tword_t
     Type for a word over the generators of a semigroup. More...
     
    - - - - -

    -Functions

    std::ostream & operator<< (std::ostream &os, RWS const &rws)
     This method allows a RWS object to be left shifted into a std::ostream, such as std::cout. The currently active rules of the system are represented in the output. More...
     
    -

    Detailed Description

    -

    Namespace for everything in the libsemigroups library.

    -

    Typedef Documentation

    - -

    ◆ cayley_graph_t

    - -
    -
    - -

    This is just for backwards compatibility and should disappear at some point.

    - -
    -
    - -

    ◆ letter_t

    - -
    -
    - - - - -
    typedef size_t libsemigroups::letter_t
    -
    - -

    Type for the index of a generator of a semigroup.

    - -
    -
    - -

    ◆ relation_t

    - -
    -
    - - - - -
    typedef std::pair<word_t, word_t> libsemigroups::relation_t
    -
    - -

    Type for a pair of word_t (a relation) of a semigroup.

    - -
    -
    - -

    ◆ word_t

    - -
    -
    - - - - -
    typedef std::vector<letter_t> libsemigroups::word_t
    -
    - -

    Type for a word over the generators of a semigroup.

    - -
    -
    -

    Function Documentation

    - -

    ◆ operator<<()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    std::ostream& libsemigroups::operator<< (std::ostream & os,
    RWS const & rws 
    )
    -
    - -

    This method allows a RWS object to be left shifted into a std::ostream, such as std::cout. The currently active rules of the system are represented in the output.

    - -
    -
    -
    - - - - diff --git a/namespacemembers.html b/namespacemembers.html deleted file mode 100644 index 991802947..000000000 --- a/namespacemembers.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -libsemigroups: Namespace Members - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    - -
    - -
    -
    Here is a list of all documented namespace members with links to the namespaces they belong to:
    -
    - - - - diff --git a/namespacemembers_func.html b/namespacemembers_func.html deleted file mode 100644 index 337e2c54c..000000000 --- a/namespacemembers_func.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -libsemigroups: Namespace Members - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    - -
    - -
    -
    - - - - diff --git a/namespacemembers_type.html b/namespacemembers_type.html deleted file mode 100644 index 7316b14e8..000000000 --- a/namespacemembers_type.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Namespace Members - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    - -
    - -
    -
    - - - - diff --git a/namespaces.html b/namespaces.html deleted file mode 100644 index d1d8d54c3..000000000 --- a/namespaces.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: Namespace List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    - -
    - -
    -
    -
    Namespace List
    -
    -
    -
    Here is a list of all documented namespaces with brief descriptions:
    - - -
     NlibsemigroupsNamespace for everything in the libsemigroups library
    -
    -
    - - - - diff --git a/nav_f.png b/nav_f.png deleted file mode 100644 index 72a58a529..000000000 Binary files a/nav_f.png and /dev/null differ diff --git a/nav_g.png b/nav_g.png deleted file mode 100644 index 2093a237a..000000000 Binary files a/nav_g.png and /dev/null differ diff --git a/nav_h.png b/nav_h.png deleted file mode 100644 index 33389b101..000000000 Binary files a/nav_h.png and /dev/null differ diff --git a/obvinf_8hpp_source.html b/obvinf_8hpp_source.html deleted file mode 100644 index 49bc1d64b..000000000 --- a/obvinf_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/obvinf.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    obvinf.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains a helper class for checking whether or not a congruence
    20 // defined by TODO
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_OBVINF_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_OBVINF_HPP_
    24 
    25 #include <stddef.h> // for size_t
    26 #include <string> // for string
    27 #include <unordered_map> // for unordered_map
    28 #include <unordered_set> // for unordered_set
    29 #include <utility> // for pair
    30 #include <vector> // for vector
    31 
    32 namespace libsemigroups {
    33  namespace internal {
    34  template <typename TLetterType, typename TWordType>
    35  class IsObviouslyInfinite {
    36  using const_iterator =
    37  typename std::vector<std::pair<TWordType, TWordType>>::const_iterator;
    38 
    39  public:
    40  explicit IsObviouslyInfinite(size_t n)
    41  : _empty_word(false), _map(), _nr_gens(n), _preserve(), _unique() {}
    42 
    43  explicit IsObviouslyInfinite(std::string const& lphbt)
    44  : IsObviouslyInfinite(lphbt.size()) {}
    45 
    46  void add_rules(const_iterator first, const_iterator last) {
    47  std::unordered_map<TLetterType, size_t> map;
    48 
    49  for (auto it = first; it < last; ++it) {
    50  if ((*it).first.empty() || (*it).second.empty()) {
    51  _empty_word = true;
    52  }
    53  _map.clear();
    54  plus_letters_in_word((*it).first);
    55  if (!_empty_word && _map.size() == 1) {
    56  _unique.insert((*it).first[0]);
    57  }
    58  minus_letters_in_word((*it).second);
    59  if (!_empty_word && !(*it).second.empty()
    60  && std::all_of((*it).second.cbegin() + 1,
    61  (*it).second.cend(),
    62  [&it](TLetterType i) -> bool {
    63  return i == (*it).second[0];
    64  })) {
    65  _unique.insert((*it).second[0]);
    66  }
    67  for (auto const& x : _map) {
    68  if (x.second != 0) {
    69  _preserve.insert(x.first);
    70  }
    71  }
    72  }
    73  }
    74 
    75  bool result() const {
    76  return (!_empty_word && _unique.size() != _nr_gens)
    77  || _preserve.size() != _nr_gens;
    78  }
    79 
    80  private:
    81  void letters_in_word(TWordType const& w, size_t adv) {
    82  for (auto const& x : w) {
    83  auto it = _map.find(x);
    84  if (it == _map.end()) {
    85  _map.emplace(x, adv);
    86  } else {
    87  it->second += adv;
    88  }
    89  }
    90  }
    91 
    92  void plus_letters_in_word(TWordType const& w) {
    93  letters_in_word(w, 1);
    94  }
    95 
    96  void minus_letters_in_word(TWordType const& w) {
    97  letters_in_word(w, -1);
    98  }
    99 
    100  // TLetterType i belongs to "preserve" if there exists a relation where
    101  // the number of occurrences of i is not the same on both sides of the
    102  // relation
    103  // TLetterType i belongs to "unique" if there is a relation where one side
    104  // consists solely of i.
    105  bool _empty_word;
    106  std::unordered_map<TLetterType, int64_t> _map;
    107  size_t _nr_gens;
    108  std::unordered_set<TLetterType> _preserve;
    109  std::unordered_set<TLetterType> _unique;
    110  };
    111  } // namespace internal
    112 } // namespace libsemigroups
    113 #endif // LIBSEMIGROUPS_INCLUDE_OBVINF_HPP_
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/open.png b/open.png deleted file mode 100644 index 30f75c7ef..000000000 Binary files a/open.png and /dev/null differ diff --git a/orb_8hpp.html b/orb_8hpp.html deleted file mode 100644 index 55baeb685..000000000 --- a/orb_8hpp.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - -libsemigroups: include/orb.hpp File Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    orb.hpp File Reference
    -
    -
    - -

    This file contains a generic implementation of a class Orb which represents the action of a semigroup on a set. -More...

    -
    #include <algorithm>
    -#include <iostream>
    -#include <numeric>
    -#include <unordered_map>
    -#include <unordered_set>
    -#include <vector>
    -#include "adapters.hpp"
    -#include "constants.hpp"
    -#include "digraph.hpp"
    -#include "iterator.hpp"
    -#include "runner.hpp"
    -#include "timer.hpp"
    -#include "traits.hpp"
    -
    -Include dependency graph for orb.hpp:
    -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -This graph shows which files directly or indirectly include this file:
    -
    -
    - - - -
    -
    -

    Go to the source code of this file.

    - - - - - -

    -Namespaces

     libsemigroups
     Namespace for everything in the libsemigroups library.
     
    - - - -

    -Enumerations

    enum  Side { LEFT = 0, -RIGHT = 1 - }
     
    -

    Detailed Description

    -

    This file contains a generic implementation of a class Orb which represents the action of a semigroup on a set.

    -
    - - - - diff --git a/orb_8hpp__dep__incl.map b/orb_8hpp__dep__incl.map deleted file mode 100644 index 29b9858b5..000000000 --- a/orb_8hpp__dep__incl.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/orb_8hpp__dep__incl.md5 b/orb_8hpp__dep__incl.md5 deleted file mode 100644 index ae3d8593b..000000000 --- a/orb_8hpp__dep__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -8c82de9fb0387713593cea8829a66894 \ No newline at end of file diff --git a/orb_8hpp__dep__incl.png b/orb_8hpp__dep__incl.png deleted file mode 100644 index 58912b584..000000000 Binary files a/orb_8hpp__dep__incl.png and /dev/null differ diff --git a/orb_8hpp__incl.map b/orb_8hpp__incl.map deleted file mode 100644 index e268ecd40..000000000 --- a/orb_8hpp__incl.map +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/orb_8hpp__incl.md5 b/orb_8hpp__incl.md5 deleted file mode 100644 index cac7637fb..000000000 --- a/orb_8hpp__incl.md5 +++ /dev/null @@ -1 +0,0 @@ -cf6c622d3d00857576bc505572a4a02f \ No newline at end of file diff --git a/orb_8hpp__incl.png b/orb_8hpp__incl.png deleted file mode 100644 index 1a5fc7943..000000000 Binary files a/orb_8hpp__incl.png and /dev/null differ diff --git a/orb_8hpp_source.html b/orb_8hpp_source.html deleted file mode 100644 index be023ed95..000000000 --- a/orb_8hpp_source.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -libsemigroups: include/orb.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    orb.hpp
    -
    -
    -Go to the documentation of this file.
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    23 
    24 // TODO(now):
    25 // 1. Doc
    26 
    27 #ifndef LIBSEMIGROUPS_INCLUDE_ORB_HPP_
    28 #define LIBSEMIGROUPS_INCLUDE_ORB_HPP_
    29 
    30 #include <algorithm>
    31 #include <iostream>
    32 #include <numeric>
    33 #include <unordered_map>
    34 #include <unordered_set>
    35 #include <vector>
    36 
    37 #include "adapters.hpp"
    38 #include "constants.hpp"
    39 #include "digraph.hpp"
    40 #include "iterator.hpp"
    41 #include "runner.hpp"
    42 #include "timer.hpp"
    43 #include "traits.hpp"
    44 
    45 namespace libsemigroups {
    46 
    47  enum class Side { LEFT = 0, RIGHT = 1 };
    48 
    49  template <typename TElementType,
    50  typename TPointType,
    51  typename TActionType
    52  = ::libsemigroups::right_action<TElementType, TPointType>,
    53  Side TLeftOrRight = Side::RIGHT,
    54  typename TPointHash = internal::hash<TPointType>,
    55  typename TPointEqual = internal::equal_to<TPointType>,
    56  typename TTraits = BruidhinnTraits<TPointType>>
    57  class Orb : public internal::Runner, private TTraits {
    59  // Orb - typedefs - private
    61 
    62  using internal_point_type = typename TTraits::internal_value_type;
    63  using internal_const_point_type =
    64  typename TTraits::internal_const_value_type;
    65  using internal_const_reference = typename TTraits::internal_const_reference;
    66 
    67  struct internal_equal_to : private TTraits {
    68  bool operator()(internal_const_point_type x,
    69  internal_const_point_type y) const {
    70  return TPointEqual()(this->to_external_const(x),
    71  this->to_external_const(y));
    72  }
    73  };
    74 
    75  struct internal_hash : private TTraits {
    76  size_t operator()(internal_const_point_type x) const {
    77  return TPointHash()(this->to_external_const(x));
    78  }
    79  };
    80 
    81  static_assert(
    82  std::is_const<internal_const_point_type>::value
    83  || std::is_const<typename std::remove_pointer<
    84  internal_const_point_type>::type>::value,
    85  "internal_const_element_type must be const or pointer to const");
    86 
    87  public:
    89  // Orb - typedefs - public
    91 
    92  using element_type = TElementType;
    93  using point_type = TPointType;
    94  using const_reference_point_type = typename TTraits::const_reference;
    95  using const_pointer_point_type = typename TTraits::const_pointer;
    96 
    97  using index_type = size_t;
    98  using scc_index_type = ActionDigraph<size_t>::scc_index_type;
    99 
    100  private:
    102  // Orb - iterators - private
    104 
    105  struct iterator_methods : private TTraits {
    106  const_reference_point_type indirection(
    107  typename std::vector<internal_point_type>::const_iterator it) const {
    108  return this->to_external_const((*it));
    109  }
    110 
    111  const_pointer_point_type addressof(
    112  typename std::vector<internal_point_type>::const_iterator it) const {
    113  return &(this->to_external_const((*it)));
    114  }
    115  };
    116 
    117  public:
    119  // Orb - iterators - public
    121 
    122  using const_iterator_scc = ActionDigraph<size_t>::const_iterator_scc;
    123  using const_iterator_sccs = ActionDigraph<size_t>::const_iterator_sccs;
    124  using const_iterator_scc_roots
    126 
    127  using const_iterator = internal::const_iterator_stateless_helper<
    128  iterator_methods,
    129  typename std::vector<internal_point_type>::const_iterator,
    130  point_type>;
    131 
    132  private:
    134  // Orb - internal types with call operators - private
    136 
    137  // gcc apparently requires the extra qualification on the aliases below
    138  using action = TActionType;
    139  using one = ::libsemigroups::one<element_type>;
    140  using product = ::libsemigroups::product<element_type>;
    141  using swap = ::libsemigroups::swap<element_type>;
    142 
    143  static_assert(std::is_trivially_default_constructible<action>::value,
    144  "the third template parameter TActionType is not trivially "
    145  "default constructible");
    146  // TODO more static assertions
    147 
    149  // Orb - product functions for left/right multiplication - private
    151 
    152  template <typename SFINAE = void>
    153  auto internal_product(element_type& xy,
    154  element_type const& x,
    155  element_type const& y) ->
    156  typename std::enable_if<Side::RIGHT == TLeftOrRight, SFINAE>::type {
    157  product()(xy, x, y);
    158  }
    159 
    160  template <typename SFINAE = void>
    161  auto internal_product(element_type& xy,
    162  element_type const& x,
    163  element_type const& y) ->
    164  typename std::enable_if<Side::LEFT == TLeftOrRight, SFINAE>::type {
    165  product()(xy, y, x);
    166  }
    167 
    168  public:
    170  // Orb - constructor + destructor - public
    172 
    173  Orb()
    174  : _gens(),
    175  _graph(),
    176  _map(),
    177  _orb(),
    178  _pos(0),
    179  _tmp_point(),
    180  _tmp_point_init(false) {}
    181 
    182  ~Orb() {
    183  if (_tmp_point_init) {
    184  this->internal_free(_tmp_point);
    185  }
    186  for (auto pt : _orb) {
    187  this->internal_free(pt);
    188  }
    189  }
    190 
    192  // Orb - modifiers - public
    194 
    195  void reserve(size_t val) {
    196  _graph.reserve(val, _gens.size());
    197  _map.reserve(val);
    198  _orb.reserve(val);
    199  }
    200 
    201  void add_seed(const_reference_point_type seed) {
    202  auto internal_seed = this->internal_copy(this->to_internal_const(seed));
    203  if (!_tmp_point_init) {
    204  _tmp_point_init = true;
    205  _tmp_point = this->internal_copy(internal_seed);
    206  }
    207  _map.emplace(internal_seed, _orb.size());
    208  _orb.push_back(internal_seed);
    209  _graph.add_nodes(1);
    210  set_finished(false);
    211  }
    212 
    213  void add_generator(element_type gen) {
    214  _gens.push_back(gen);
    215  set_finished(false);
    216  }
    217 
    219  // Runner - pure virtual member functions - public
    221 
    222  void enumerate() {
    223  run();
    224  }
    225 
    226  void run() {
    227  if (finished()) {
    228  return;
    229  }
    230  size_t old_nr_gens = _graph.out_degree();
    231  _graph.add_to_out_degree(_gens.size() - _graph.out_degree());
    232  if (started() && old_nr_gens < _gens.size()) {
    233  // Generators were added after the last call to run
    234  for (size_t i = 0; i < _pos; i++) {
    235  for (size_t j = old_nr_gens; j < _gens.size(); ++j) {
    236  action()(this->to_external(_tmp_point),
    237  this->to_external_const(_orb[i]),
    238  _gens[j]);
    239  auto it = _map.find(_tmp_point);
    240  if (it == _map.end()) {
    241  _graph.add_nodes(1);
    242  _graph.add_edge(i, _orb.size(), j);
    243  _orb.push_back(this->internal_copy(_tmp_point));
    244  _map.emplace(_orb.back(), _orb.size() - 1);
    245  } else {
    246  _graph.add_edge(i, (*it).second, j);
    247  }
    248  }
    249  }
    250  }
    251  set_started(true);
    252 
    253  for (; _pos < _orb.size() && !stopped(); ++_pos) {
    254  for (size_t j = 0; j < _gens.size(); ++j) {
    255  action()(this->to_external(_tmp_point),
    256  this->to_external_const(_orb[_pos]),
    257  _gens[j]);
    258  auto it = _map.find(_tmp_point);
    259  if (it == _map.end()) {
    260  _graph.add_nodes(1);
    261  _graph.add_edge(_pos, _orb.size(), j);
    262  _orb.push_back(this->internal_copy(_tmp_point));
    263  _map.emplace(_orb.back(), _orb.size() - 1);
    264  } else {
    265  _graph.add_edge(_pos, (*it).second, j);
    266  }
    267  }
    268  if (report()) {
    269  REPORT("found ", _orb.size(), " points, so far");
    270  }
    271  }
    272  if (_pos == _orb.size()) {
    273  set_finished(true);
    274  }
    275  report_why_we_stopped();
    276  }
    277 
    279  // Orb - member functions: position, empty, size, etc - public
    281 
    282  index_type position(const_reference_point_type pt) {
    283  auto it = _map.find(this->to_internal_const(pt));
    284  if (it != _map.end()) {
    285  return (*it).second;
    286  } else {
    287  return UNDEFINED;
    288  }
    289  }
    290 
    291  bool empty() const {
    292  return _orb.empty();
    293  }
    294 
    295  inline const_reference_point_type operator[](size_t pos) const noexcept {
    296  LIBSEMIGROUPS_ASSERT(pos < _orb.size());
    297  return _orb[pos];
    298  }
    299 
    300  inline const_reference_point_type at(size_t pos) const {
    301  return this->to_external_const(_orb.at(pos));
    302  }
    303 
    304  size_t size() {
    305  enumerate();
    306  return _orb.size();
    307  }
    308 
    309  size_t current_size() const {
    310  return _orb.size();
    311  }
    312 
    313  const_iterator cbegin() const {
    314  return const_iterator(_orb.cbegin());
    315  }
    316 
    317  const_iterator cend() const {
    318  return const_iterator(_orb.cend());
    319  }
    320 
    322  // Orb - member functions: strongly connected components - public
    324 
    325  element_type multiplier_from_scc_root(index_type pos) {
    326  validate_gens();
    327  validate_index(pos);
    328  element_type out = one()(_gens[0]);
    329  element_type tmp = one()(_gens[0]);
    330  while (_graph.spanning_forest().parent(pos) != UNDEFINED) {
    331  swap()(tmp, out);
    332  internal_product(out, _gens[_graph.spanning_forest().label(pos)], tmp);
    333  pos = _graph.spanning_forest().parent(pos);
    334  }
    335  return out;
    336  }
    337 
    338  element_type multiplier_to_scc_root(index_type pos) {
    339  validate_gens();
    340  validate_index(pos);
    341  element_type out = one()(_gens[0]);
    342  element_type tmp = one()(_gens[0]);
    343  while (_graph.reverse_spanning_forest().parent(pos) != UNDEFINED) {
    344  swap()(tmp, out);
    345  internal_product(
    346  out, tmp, _gens[_graph.reverse_spanning_forest().label(pos)]);
    347  pos = _graph.reverse_spanning_forest().parent(pos);
    348  }
    349  return out;
    350  }
    351 
    352  const_reference_point_type root_of_scc(const_reference_point_type x) {
    353  return this->to_external_const(_orb[_graph.root_of_scc(position(x))]);
    354  }
    355 
    356  const_reference_point_type root_of_scc(index_type pos) {
    357  return this->to_external_const(_orb[_graph.root_of_scc(pos)]);
    358  }
    359 
    360  ActionDigraph<size_t> const& digraph() {
    361  enumerate();
    362  return _graph;
    363  }
    364 
    365  private:
    367  // Orb - member functions - private
    369 
    370  void validate_index(index_type i) const {
    371  if (i > _orb.size()) {
    372  LIBSEMIGROUPS_EXCEPTION("index out of range, expected value in [0, "
    373  << current_size() << ") but found " << i);
    374  }
    375  }
    376 
    377  void validate_gens() const {
    378  if (_gens.empty()) {
    379  LIBSEMIGROUPS_EXCEPTION("no generators defined, this methods cannot be "
    380  "used until at least one generator is added")
    381  }
    382  }
    383 
    385  // Orb - data members - private
    387 
    388  std::vector<element_type> _gens;
    389  ActionDigraph<size_t> _graph;
    390  std::unordered_map<internal_const_point_type,
    391  size_t,
    392  internal_hash,
    393  internal_equal_to>
    394  _map;
    395  std::vector<internal_point_type> _orb;
    396  size_t _pos;
    397  internal_point_type _tmp_point;
    398  bool _tmp_point_init;
    399  };
    400 } // namespace libsemigroups
    401 #endif // LIBSEMIGROUPS_INCLUDE_ORB_HPP_
    This file contains an implementation of out-regular digraph which represents the action of a semigrou...
    -
    typename std::vector< std::vector< size_t > >::const_iterator const_iterator_sccs
    Alias for the type of an iterator pointing to the strongly connected components of a digraph...
    Definition: digraph.hpp:113
    -
    typename std::vector< size_t >::const_iterator const_iterator_scc
    Alias for the type of an iterator pointing to the nodes in a strongly connected component of a digrap...
    Definition: digraph.hpp:108
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    internal::iterator_base< std::vector< size_t >, node_type const *, node_type const &, node_type, iterator_methods_scc_roots > const_iterator_scc_roots
    Alias for the type of an iterator pointing to the roots of a strongly connected components of a digra...
    Definition: digraph.hpp:122
    -
    size_t scc_index_type
    Alias for the type of an index in a strongly connected component of a digraph.
    Definition: digraph.hpp:95
    -
    This file contains function templates for adapting a user-defined type so that it can be used with li...
    -
    - - - - diff --git a/owned__ptr_8hpp_source.html b/owned__ptr_8hpp_source.html deleted file mode 100644 index de5b7f18c..000000000 --- a/owned__ptr_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/owned_ptr.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    owned_ptr.hpp
    -
    -
    -
    1 
    2 //
    3 // libsemigroups - C++ library for semigroups and monoids
    4 // Copyright (C) 2018 James D. Mitchell
    5 //
    6 // This program is free software: you can redistribute it and/or modify
    7 // it under the terms of the GNU General Public License as published by
    8 // the Free Software Foundation, either version 3 of the License, or
    9 // (at your option) any later version.
    10 //
    11 // This program is distributed in the hope that it will be useful,
    12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    14 // GNU General Public License for more details.
    15 //
    16 // You should have received a copy of the GNU General Public License
    17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    18 //
    19 
    20 // This file contains a base class for congruence-like classes.
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_OWNED_PTR_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_OWNED_PTR_HPP_
    24 
    25 #include <cstddef> // for std::nullptr_t
    26 
    27 namespace libsemigroups {
    28  namespace internal {
    29  template <class TPtrType>
    30  class owned_ptr {
    31  public:
    32  explicit owned_ptr(TPtrType* ptr, void* owner = nullptr)
    33  : _owner(owner), _ptr(ptr) {}
    34 
    35  owned_ptr(owned_ptr const&) = default;
    36  owned_ptr& operator=(owned_ptr const&) = default;
    37  owned_ptr(owned_ptr&&) = default;
    38  owned_ptr& operator=(owned_ptr&&) = default;
    39  ~owned_ptr() = default;
    40 
    41  TPtrType& operator*() {
    42  return *_ptr;
    43  }
    44 
    45  void free_from(void* obj) {
    46  if (obj == _owner) {
    47  delete _ptr;
    48  }
    49  _owner = nullptr;
    50  _ptr = nullptr;
    51  }
    52 
    53  bool operator!=(std::nullptr_t const&) {
    54  return _ptr != nullptr;
    55  }
    56 
    57  bool operator==(std::nullptr_t const&) {
    58  return _ptr == nullptr;
    59  }
    60 
    61  private:
    62  void* _owner;
    63  TPtrType* _ptr;
    64  };
    65  } // namespace internal
    66 } // namespace libsemigroups
    67 #endif // LIBSEMIGROUPS_INCLUDE_OWNED_PTR_HPP_
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/partition_8h_source.html b/partition_8h_source.html deleted file mode 100644 index 165371f12..000000000 --- a/partition_8h_source.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: src/partition.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    partition.h
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2017 Michael Torpey
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_SRC_PARTITION_H_
    20 #define LIBSEMIGROUPS_SRC_PARTITION_H_
    21 
    22 #include <algorithm>
    23 #include <vector>
    24 
    25 #include "libsemigroups-debug.h"
    26 
    27 namespace libsemigroups {
    33  template <typename T> class Partition {
    34  // TODO: do something else instead of using this object?
    35 
    36  public:
    40  explicit Partition(size_t nr_parts = 0)
    41  : _parts(new std::vector<std::vector<T*>*>()) {
    42  for (size_t i = 0; i < nr_parts; i++) {
    43  _parts->push_back(new std::vector<T*>());
    44  }
    45  }
    46 
    51  // FIXME delete if not used
    52  explicit Partition(std::vector<std::vector<T*>*>* parts) : _parts(parts) {}
    53 
    59  for (std::vector<T*>* block : *_parts) {
    60  for (T* elm : *block) {
    61  delete elm;
    62  }
    63  delete block;
    64  }
    65  delete _parts;
    66  }
    67 
    70  Partition& operator=(Partition const& part) = delete;
    71 
    74  Partition(Partition const& copy) = delete;
    75 
    77  // FIXME rename this to nr_parts
    78  inline size_t size() const {
    79  return _parts->size();
    80  }
    81 
    86  inline std::vector<T*>* operator[](size_t part_index) const {
    87  LIBSEMIGROUPS_ASSERT(part_index < size());
    88  return (*_parts)[part_index];
    89  }
    90 
    95  inline std::vector<T*>* at(size_t part_index) const {
    96  return _parts->at(part_index);
    97  }
    98 
    100  T* at(size_t part_index, size_t elm_nr) const {
    101  return _parts->at(part_index)->at(elm_nr);
    102  }
    103 
    104  private:
    105  std::vector<std::vector<T*>*>* _parts;
    106  };
    107 } // namespace libsemigroups
    108 #endif // LIBSEMIGROUPS_SRC_PARTITION_H_
    Partition(std::vector< std::vector< T * > * > *parts)
    A constructor.
    Definition: partition.h:52
    -
    std::vector< T * > * operator[](size_t part_index) const
    Returns the part with index part_index.
    Definition: partition.h:86
    -
    std::vector< T * > * at(size_t part_index) const
    Returns the part with index part_index.
    Definition: partition.h:95
    -
    ~Partition()
    A default destructor.
    Definition: partition.h:58
    -
    Partition(size_t nr_parts=0)
    A constructor.
    Definition: partition.h:40
    -
    Class for partitions of a set used by Congruence::nontrivial_classes.
    Definition: partition.h:33
    -
    T * at(size_t part_index, size_t elm_nr) const
    Returns the element with index elm_nr in part part_index.
    Definition: partition.h:100
    -
    Namespace for everything in the libsemigroups library.
    Definition: blocks.cc:32
    -
    Partition & operator=(Partition const &part)=delete
    The assignment operator is deleted for Partition to avoid unintended copying.
    -
    size_t size() const
    Returns the number of parts in the partition.
    Definition: partition.h:78
    -
    - - - - diff --git a/race_8hpp_source.html b/race_8hpp_source.html deleted file mode 100644 index 4fe2bdf04..000000000 --- a/race_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/race.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    race.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains the declaration of the Race class template for
    20 // competitively running different functions/methods in different threads, and
    21 // obtaining the winner.
    22 
    23 // TODO:
    24 // 1. consider if keeping killed off methods has any uses
    25 
    26 #ifndef LIBSEMIGROUPS_INCLUDE_RACE_HPP_
    27 #define LIBSEMIGROUPS_INCLUDE_RACE_HPP_
    28 
    29 #include <thread>
    30 #include <vector>
    31 
    32 #include "report.hpp"
    33 #include "runner.hpp"
    34 #include "stl.hpp"
    35 #include "timer.hpp"
    36 
    37 namespace libsemigroups {
    38  namespace internal {
    39  class Race {
    40  public:
    43  Race();
    44  ~Race();
    45 
    47  void set_max_threads(size_t);
    48 
    51  Runner* winner();
    52 
    54  void add_runner(Runner*);
    55 
    57  typename std::vector<Runner*>::const_iterator begin() const;
    58 
    60  typename std::vector<Runner*>::const_iterator end() const;
    61 
    64  bool empty() const;
    65 
    67  void run();
    68 
    70  void run_for(std::chrono::nanoseconds);
    71 
    76  // This is definitely tested but doesn't show up in the code coverage for
    77  // some reason.
    78  template <typename TCallable>
    79  void run_until(TCallable const& func,
    80  std::chrono::nanoseconds check_interval
    81  = std::chrono::milliseconds(2)) {
    82  static_assert(internal::is_callable<TCallable>::value,
    83  "the template parameter TCallable must be callable");
    84  static_assert(std::is_same<typename std::result_of<TCallable()>::type,
    85  bool>::value,
    86  "the template parameter TCallable must return a bool");
    87  if (empty()) {
    88  LIBSEMIGROUPS_EXCEPTION("no runners given, cannot run_until");
    89  }
    90  while (!func() && _winner == nullptr) {
    91  // if _winner != nullptr, then the race is over.
    92  run_for(check_interval);
    93  if (check_interval < std::chrono::milliseconds(1024)) {
    94  check_interval *= 2;
    95  }
    96  }
    97  }
    98 
    99  private:
    100  // Runs the callable object \p func on every Runner in parallel.
    101  template <typename TCallable>
    102  void run_func(TCallable const& func) {
    103  static_assert(
    104  std::is_same<typename std::result_of<TCallable(Runner*)>::type,
    105  void>::value,
    106  "the template parameter TCallable must be void");
    107  LIBSEMIGROUPS_ASSERT(!empty());
    108  if (_winner == nullptr) {
    109  size_t nr_threads = std::min(_runners.size(), _max_threads);
    110  if (nr_threads == 1) {
    111  REPORT("using 0 additional threads");
    112  internal::Timer tmr;
    113  func(_runners.at(0));
    114  _winner = _runners.at(0);
    115  REPORT("elapsed time = ", tmr);
    116  return;
    117  }
    118  for (size_t i = 0; i < _runners.size(); ++i) {
    119  if (_runners[i]->finished()) {
    120  REPORT("using 0 additional threads");
    121  _winner = _runners[i];
    122  REPORT("#", i, " is already finished!");
    123  return;
    124  }
    125  }
    126 
    127  std::vector<std::thread::id> tids(_runners.size(),
    128  std::this_thread::get_id());
    129 
    130  REPORT("using ",
    131  nr_threads,
    132  " / ",
    133  std::thread::hardware_concurrency(),
    134  " additional threads");
    135  internal::Timer tmr;
    136  LIBSEMIGROUPS_ASSERT(nr_threads != 0);
    137 
    138  auto thread_func = [this, &func, &tids](size_t pos) {
    139  tids[pos] = std::this_thread::get_id();
    140  try {
    141  func(_runners.at(pos));
    142  } catch (std::exception const& e) {
    143  size_t tid = REPORTER.thread_id(tids[pos]);
    144  REPORT("exception thrown by #", tid, ":");
    145  REPORT(e.what());
    146  return;
    147  }
    148  // Stop two Runner* objects from killing each other
    149  {
    150  std::lock_guard<std::mutex> lg(_mtx);
    151  if (_runners.at(pos)->finished()) {
    152  for (auto it = _runners.begin(); it < _runners.begin() + pos;
    153  it++) {
    154  (*it)->kill();
    155  }
    156  for (auto it = _runners.begin() + pos + 1; it < _runners.end();
    157  it++) {
    158  (*it)->kill();
    159  }
    160  }
    161  }
    162  };
    163 
    164  REPORTER.reset_thread_ids();
    165 
    166  std::vector<std::thread> t;
    167  for (size_t i = 0; i < nr_threads; ++i) {
    168  t.push_back(std::thread(thread_func, i));
    169  }
    170  for (size_t i = 0; i < nr_threads; ++i) {
    171  t.at(i).join();
    172  }
    173  REPORT("elapsed time = ", tmr);
    174  for (auto method = _runners.begin(); method < _runners.end();
    175  ++method) {
    176  if ((*method)->finished()) {
    177  LIBSEMIGROUPS_ASSERT(_winner == nullptr);
    178  _winner = *method;
    179  size_t tid
    180  = REPORTER.thread_id(tids.at(method - _runners.begin()));
    181  REPORT("#", tid, " is the winner!");
    182  break;
    183  }
    184  }
    185  if (_winner != nullptr) {
    186  for (auto rnnr : _runners) {
    187  if (rnnr != _winner) {
    188  delete rnnr;
    189  }
    190  }
    191  _runners.clear();
    192  _runners.push_back(_winner);
    193  }
    194  }
    195  }
    196 
    197  std::vector<Runner*> _runners;
    198  size_t _max_threads;
    199  std::mutex _mtx;
    200  Runner* _winner;
    201  };
    202  } // namespace internal
    203 } // namespace libsemigroups
    204 
    205 #endif // LIBSEMIGROUPS_INCLUDE_RACE_HPP_
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/range_8hpp_source.html b/range_8hpp_source.html deleted file mode 100644 index d361699e8..000000000 --- a/range_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/range.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    range.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains a class for creating ranges of integers, for use with
    20 // SchreierSims.
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_RANGE_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_RANGE_HPP_
    24 
    25 #include <type_traits>
    26 #include <vector>
    27 
    28 namespace libsemigroups {
    29  template <typename TIntegralType, size_t TBegin = 0, size_t TEnd = 0>
    30  class IntegralRange {
    31  static_assert(
    32  std::is_integral<TIntegralType>::value,
    33  "the template parameter TIntegralType must be an integral type");
    34 
    35  public:
    36  using value_type = TIntegralType;
    37  using size_type = TIntegralType;
    38 
    39  IntegralRange() : _begin(TBegin), _end(TEnd) {}
    40 
    41  IntegralRange(TIntegralType begin, TIntegralType end)
    42  : _begin(begin), _end(end) {}
    43 
    44  class iterator {
    45  friend class IntegralRange;
    46 
    47  public:
    48  using size_type = typename std::vector<TIntegralType>::size_type;
    49  using difference_type =
    50  typename std::vector<TIntegralType>::difference_type;
    51  using const_pointer = typename std::vector<TIntegralType>::const_pointer;
    52  using pointer = typename std::vector<TIntegralType>::pointer;
    53  using const_reference =
    54  typename std::vector<TIntegralType>::const_reference;
    55  using reference = const_reference;
    56  using value_type = TIntegralType;
    57  using iterator_category = std::random_access_iterator_tag;
    58 
    59  bool operator==(iterator const& that) const {
    60  return _i == that._i;
    61  }
    62 
    63  bool operator!=(iterator const& that) const {
    64  return _i != that._i;
    65  }
    66 
    67  bool operator<(iterator const& that) const {
    68  return _i < that._i;
    69  }
    70 
    71  bool operator>(iterator const& that) const {
    72  return _i > that._i;
    73  }
    74 
    75  bool operator<=(iterator const& that) const {
    76  return operator<(that) || operator==(that);
    77  }
    78 
    79  bool operator>=(iterator const& that) const {
    80  return operator>(that) || operator==(that);
    81  }
    82 
    83  iterator const& operator++() {
    84  ++_i;
    85  return *this;
    86  }
    87 
    88  iterator operator++(int) {
    89  iterator copy(*this);
    90  ++_i;
    91  return copy;
    92  }
    93 
    94  iterator operator--(int) {
    95  iterator tmp(*this);
    96  iterator::operator--();
    97  return tmp;
    98  }
    99 
    100  iterator operator+(size_type val) const {
    101  iterator out(*this);
    102  out._i += val;
    103  return out;
    104  }
    105 
    106  friend iterator operator+(size_type val, iterator const& it) {
    107  return it + val;
    108  }
    109 
    110  iterator operator-(size_type val) const {
    111  iterator out(*this);
    112  return out -= val;
    113  }
    114 
    115  iterator& operator--() {
    116  --_i;
    117  return *this;
    118  }
    119 
    120  iterator& operator+=(size_type val) {
    121  _i += val;
    122  return *this;
    123  }
    124 
    125  iterator& operator-=(size_type val) {
    126  _i -= val;
    127  return *this;
    128  }
    129 
    130  difference_type operator-(iterator that) const {
    131  return _i - that._i;
    132  }
    133 
    134  TIntegralType operator[](size_type pos) const {
    135  return *(*this + pos);
    136  }
    137 
    138  TIntegralType operator*() const {
    139  return _i;
    140  }
    141 
    142  protected:
    143  explicit iterator(TIntegralType start) : _i(start) {}
    144 
    145  private:
    146  TIntegralType _i;
    147  };
    148 
    149  iterator cbegin() const {
    150  return _begin;
    151  }
    152 
    153  iterator cend() const {
    154  return _end;
    155  }
    156 
    157  using const_iterator = iterator;
    158 
    159  private:
    160  iterator _begin;
    161  iterator _end;
    162  };
    163 } // namespace libsemigroups
    164 #endif // LIBSEMIGROUPS_INCLUDE_RANGE_HPP_
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/recvec_8h_source.html b/recvec_8h_source.html deleted file mode 100644 index a403aa92c..000000000 --- a/recvec_8h_source.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -libsemigroups: src/recvec.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    recvec.h
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2016 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_SRC_RECVEC_H_
    20 #define LIBSEMIGROUPS_SRC_RECVEC_H_
    21 
    22 #include <algorithm>
    23 #include <iostream>
    24 #include <vector>
    25 
    26 #include "libsemigroups-debug.h"
    27 
    28 namespace libsemigroups {
    29 
    33 
    34  template <typename T, class A = std::allocator<T>> class RecVec {
    35  // So that RecVec<T> can access private data members of RecVec<S> and vice
    36  // versa.
    37  template <typename S, class B> friend class RecVec;
    38 
    39  public:
    40  typedef A allocator_type;
    41  typedef typename std::vector<T, A>::value_type value_type;
    42  typedef typename std::vector<T, A>::reference reference;
    43  typedef typename std::vector<T, A>::const_reference const_reference;
    44  typedef typename std::vector<T, A>::difference_type difference_type;
    45  typedef typename std::vector<T, A>::size_type size_type;
    46 
    47  // Default constructor
    48  // @nr_cols the number of columns in the <RecVec> being constructed
    49  // @nr_rows the number of rows (defaults to 0) in the <RecVec> being
    50  // constructed
    51  // @default_val the default value (defaults to 0)
    52  //
    53  // Constructs a <RecVec> with the specified number of columns and rows and
    54  // initialises every position with the default value.
    55  explicit RecVec(size_t nr_cols = 0, size_t nr_rows = 0, T default_val = 0)
    56  : _vec(),
    57  _nr_used_cols(nr_cols),
    58  _nr_unused_cols(0),
    59  _nr_rows(0),
    60  _default_val(default_val) {
    61  this->add_rows(nr_rows);
    62  }
    63 
    64  // Copy and add columns
    65  // @copy the <RecVec> which will be copied
    66  // @nr_cols_to_add the number of columns to be added
    67  //
    68  // Constructs a copy of the given <RecVec> with the same number of rows as
    69  // the original and with some additional columns.
    70  template <typename S, class B>
    71  RecVec(RecVec<S, B> const& copy, size_t nr_cols_to_add)
    72  : _vec(),
    73  _nr_used_cols(copy._nr_used_cols),
    74  _nr_unused_cols(copy._nr_unused_cols),
    75  _nr_rows(copy.nr_rows()),
    76  _default_val(copy._default_val) {
    77  if (nr_cols_to_add <= _nr_unused_cols) {
    78  _vec.reserve(copy._vec.size());
    79  for (auto const& x : copy._vec) {
    80  _vec.push_back(static_cast<T>(x));
    81  }
    82  _nr_used_cols += nr_cols_to_add;
    83  _nr_unused_cols -= nr_cols_to_add;
    84  return;
    85  }
    86 
    87  size_t new_nr_cols
    88  = std::max(5 * nr_cols() / 4 + 4, nr_cols_to_add + nr_cols());
    89  _nr_used_cols += nr_cols_to_add;
    90  _nr_unused_cols = new_nr_cols - _nr_used_cols;
    91 
    92  _vec.reserve(new_nr_cols * _nr_rows);
    93 
    94  for (size_t i = 0; i < _nr_rows; i++) {
    95  size_t j;
    96  for (j = 0; j < copy._nr_used_cols; j++) {
    97  _vec.push_back(copy.get(i, j));
    98  }
    99  for (; j < new_nr_cols; j++) {
    100  _vec.push_back(_default_val);
    101  }
    102  }
    103  }
    104 
    105  RecVec<T, A>& operator=(RecVec<T, A> that) {
    106  swap(that);
    107  return *this;
    108  }
    109 
    110  // Default destructor
    111  ~RecVec() {}
    112 
    113  // Required methods to make RecVec STL container like
    114 
    115  bool operator==(RecVec<T, A> const& that) const {
    116  if (_nr_used_cols != that._nr_used_cols || _nr_rows != that._nr_rows) {
    117  return false;
    118  }
    119  return std::equal(cbegin(), cend(), that.cbegin());
    120  }
    121 
    122  bool operator!=(RecVec<T, A> const& that) const {
    123  return !operator==(that);
    124  }
    125 
    126  bool empty() const {
    127  return _nr_rows == 0;
    128  }
    129 
    130  size_t size() const {
    131  return _nr_rows * _nr_used_cols;
    132  }
    133 
    134  size_t max_size() const {
    135  return _vec.max_size();
    136  }
    137 
    138  void swap(RecVec<T, A>& that) {
    139  _vec.swap(that._vec);
    140  std::swap(_nr_used_cols, that._nr_used_cols);
    141  std::swap(_nr_unused_cols, that._nr_unused_cols);
    142  std::swap(_nr_rows, that._nr_rows);
    143  }
    144 
    145  void clear() {
    146  _nr_unused_cols += _nr_used_cols;
    147  _nr_used_cols = 0;
    148  _nr_rows = 0;
    149  _vec.clear();
    150  }
    151 
    152  // Add rows
    153  // @nr the number of rows to add (defaults to 1)
    154  //
    155  // Adds the specified number of rows to the <RecVec>. Every new position is
    156  // initialised with the default value specified when the <RecVec> was
    157  // constructed.
    158  void inline add_rows(size_t nr) {
    159  _nr_rows += nr;
    160  if (nr != 0) {
    161  _vec.resize(_vec.size() + (_nr_used_cols + _nr_unused_cols) * nr,
    162  _default_val);
    163  }
    164  }
    165 
    166  // Add columns
    167  // @nr the number of columns to add (no default value)
    168  //
    169  // Adds the specified number of columns to the <RecVec>. Every new position
    170  // is initialised with the default value specified when the <RecVec> was
    171  // constructed.
    172  //
    173  // The underlying vector reserves more space than is required to add the
    174  // specified number of columns so that repeated calls to this method require
    175  // fewer reallocations.
    176  void add_cols(size_t nr) {
    177  if (nr <= _nr_unused_cols) {
    178  _nr_used_cols += nr;
    179  _nr_unused_cols -= nr;
    180  return;
    181  }
    182 
    183  size_t old_nr_cols = _nr_used_cols + _nr_unused_cols;
    184  size_t new_nr_cols = std::max(5 * old_nr_cols / 4 + 4, nr + old_nr_cols);
    185  if (_nr_rows != 0) {
    186  _vec.resize(new_nr_cols * _nr_rows, _default_val);
    187 
    188  typename std::vector<T>::iterator old_it(
    189  _vec.begin() + (old_nr_cols * _nr_rows) - old_nr_cols);
    190  typename std::vector<T>::iterator new_it(
    191  _vec.begin() + (new_nr_cols * _nr_rows) - new_nr_cols);
    192 
    193  while (old_it != _vec.begin()) {
    194  std::move(old_it, old_it + _nr_used_cols, new_it);
    195  old_it -= old_nr_cols;
    196  new_it -= new_nr_cols;
    197  }
    198  }
    199  _nr_used_cols += nr;
    200  _nr_unused_cols = new_nr_cols - _nr_used_cols;
    201  }
    202 
    203  // Set a value
    204  // @i the row
    205  // @j the column
    206  // @val the value
    207  //
    208  // Sets the position specified by the row and column to the given value.
    209  //
    210  // Asserts whether the specified row and column are within the bounds of the
    211  // <RecVec>.
    212  void inline set(size_t i, size_t j, T val) {
    213  LIBSEMIGROUPS_ASSERT(i < _nr_rows && j < _nr_used_cols);
    214  _vec[i * (_nr_used_cols + _nr_unused_cols) + j] = val;
    215  }
    216 
    217  // Get a value (const)
    218  // @i the row
    219  // @j the column
    220  //
    221  // This method is const.
    222  // @return the value in the specified row and column.
    223  //
    224  // Asserts whether the specified row and column are within the bounds of the
    225  // <RecVec>.
    226  T inline get(size_t i, size_t j) const {
    227  LIBSEMIGROUPS_ASSERT(i < _nr_rows && j < _nr_used_cols);
    228  return _vec[i * (_nr_used_cols + _nr_unused_cols) + j];
    229  }
    230 
    231  // Number of rows (const)
    232  //
    233  // This method is const.
    234  // @return the number of rows (first dimension).
    235  size_t nr_rows() const {
    236  return _nr_rows;
    237  }
    238 
    239  // Number of columns (const)
    240  //
    241  // This method is const.
    242  // @return the number of columns (second dimension).
    243  size_t nr_cols() const {
    244  return _nr_used_cols;
    245  }
    246 
    247  // Append
    248  // @copy a <RecVec> of the same type as this with equal number of columns
    249  //
    250  // Appends **copy** to the end of **this** given that the number of columns
    251  // <nr_cols> of **this** and **copy** are equal.
    252  //
    253  // Asserts that the numbers of columns are equal.
    254  template <typename S> void append(const RecVec<S>& copy) {
    255  LIBSEMIGROUPS_ASSERT(copy._nr_used_cols == _nr_used_cols);
    256 
    257  size_t old_nr_rows = _nr_rows;
    258  add_rows(copy._nr_rows);
    259 
    260  if (copy._nr_unused_cols == _nr_unused_cols) {
    261  std::copy(copy._vec.begin(),
    262  copy._vec.end(),
    263  _vec.begin()
    264  + (_nr_used_cols + _nr_unused_cols) * old_nr_rows);
    265  } else { // TODO(JDM) improve this
    266  for (size_t i = old_nr_rows; i < _nr_rows; i++) {
    267  for (size_t j = 0; j < _nr_used_cols; j++) {
    268  set(i, j, copy.get(i - old_nr_rows, j));
    269  }
    270  }
    271  }
    272  }
    273 
    274  private:
    275  std::vector<T, A> _vec;
    276  size_t _nr_used_cols;
    277  size_t _nr_unused_cols;
    278  size_t _nr_rows;
    279  T _default_val;
    280 
    281  private:
    282  // Iterators
    283  //
    284  template <typename iterator_type,
    285  typename reference_type,
    286  typename pointer_type>
    287  class iterator_base {
    288  struct iterator_methods;
    289  friend struct iterator_methods;
    290 
    291  public:
    292  typedef typename std::vector<T, A>::size_type size_type;
    293  typedef typename std::vector<T, A>::difference_type difference_type;
    294  typedef typename std::vector<T, A>::value_type value_type;
    295  typedef reference_type reference;
    296  typedef pointer_type pointer;
    297  typedef reference_type const_reference;
    298  typedef pointer_type const_pointer;
    299  typedef std::random_access_iterator_tag iterator_category;
    300 
    301  iterator_base(RecVec<T, A> const& rv,
    302  iterator_type it_vec,
    303  iterator_methods const* methods)
    304  : _it_vec(it_vec), _rv(rv), _methods(methods) {}
    305 
    306  iterator_base(RecVec<T, A> const& rv, iterator_type it_vec)
    307  : _it_vec(it_vec), _rv(rv), _methods(nullptr) {
    308  if (_rv._nr_unused_cols == 0) {
    309  _methods = new fast_iterator_methods();
    310  } else {
    311  _methods = new iterator_methods();
    312  }
    313  }
    314 
    315  iterator_base(iterator_base const& that)
    316  : iterator_base(that._rv, that._it_vec, that._methods->copy()) {}
    317 
    318  iterator_base& operator=(iterator_base const& that) {
    319  _it_vec = that._it_vec;
    320  _rv = that._rv;
    321  return *this;
    322  }
    323 
    324  static iterator_base column_iterator(RecVec<T, A> const& rv,
    325  iterator_type it_vec) {
    326  return iterator_base(rv, it_vec, new column_iterator_methods());
    327  }
    328 
    329  ~iterator_base() {
    330  delete _methods;
    331  }
    332 
    333  bool operator==(iterator_base const& that) const {
    334  return _it_vec == that._it_vec;
    335  }
    336 
    337  bool operator!=(iterator_base const& that) const {
    338  return _it_vec != that._it_vec;
    339  }
    340 
    341  bool operator<(iterator_base const& that) const {
    342  return _it_vec < that._it_vec;
    343  }
    344 
    345  bool operator>(iterator_base const& that) const {
    346  return _it_vec > that._it_vec;
    347  }
    348 
    349  bool operator<=(iterator_base const& that) const {
    350  return operator<(that) || operator==(that);
    351  }
    352 
    353  bool operator>=(iterator_base const& that) const {
    354  return operator>(that) || operator==(that);
    355  }
    356 
    357  iterator_base operator++(int) { // postfix
    358  iterator_base tmp(*this);
    359  operator++();
    360  return tmp;
    361  }
    362 
    363  iterator_base operator--(int) {
    364  iterator_base tmp(*this);
    365  operator--();
    366  return tmp;
    367  }
    368 
    369  iterator_base operator+(size_type val) const {
    370  iterator_base out(*this);
    371  return out += val;
    372  }
    373 
    374  friend iterator_base operator+(size_type val, iterator_base const& it) {
    375  return it + val;
    376  }
    377 
    378  iterator_base operator-(size_type val) const {
    379  iterator_base out(*this);
    380  return out -= val;
    381  }
    382 
    383  reference_type operator*() const {
    384  return *_it_vec;
    385  }
    386 
    387  pointer_type operator->() const {
    388  return &(*_it_vec);
    389  }
    390 
    391  reference_type operator[](size_type pos) const {
    392  return *(*this + pos);
    393  }
    394 
    395  iterator_base& operator++() { // prefix
    396  _methods->prefix_increment(*this);
    397  return *this;
    398  }
    399 
    400  iterator_base& operator--() {
    401  _methods->prefix_decrement(*this);
    402  return *this;
    403  }
    404 
    405  iterator_base& operator+=(size_type val) {
    406  _methods->increment(*this, val);
    407  return *this;
    408  }
    409 
    410  iterator_base& operator-=(size_type val) {
    411  _methods->decrement(*this, val);
    412  return *this;
    413  }
    414 
    415  difference_type operator-(iterator_base that) const {
    416  return _methods->difference(*this, that);
    417  }
    418 
    419  private:
    420  iterator_type _it_vec;
    421  RecVec<T, A> const& _rv;
    422  iterator_methods const* _methods;
    423 
    424  struct iterator_methods {
    425  virtual ~iterator_methods() {}
    426  virtual iterator_methods const* copy() const {
    427  return new iterator_methods();
    428  }
    429 
    430  virtual inline void
    431  prefix_increment(iterator_base& it) const { // prefix
    432  increment(it, 1);
    433  }
    434 
    435  virtual inline void prefix_decrement(iterator_base& it) const {
    436  decrement(it, 1);
    437  }
    438 
    439  virtual inline void increment(iterator_base& it, size_type val) const {
    440  size_type s = it._rv._nr_used_cols;
    441  size_type n = it._rv._nr_unused_cols;
    442 
    443  size_type q = val / s;
    444  size_type r = val % s;
    445 
    446  difference_type p = it._it_vec - it._rv._vec.begin();
    447 
    448  it._it_vec += q * (s + n) + r;
    449  if (r + remainder(p, s + n) >= s) {
    450  it._it_vec += n;
    451  }
    452  }
    453 
    454  virtual inline void decrement(iterator_base& it, size_type val) const {
    455  size_type s = it._rv._nr_used_cols;
    456  size_type n = it._rv._nr_unused_cols;
    457 
    458  size_type q = val / s;
    459  size_type r = val % s;
    460 
    461  difference_type p = it._it_vec - it._rv._vec.begin();
    462 
    463  it._it_vec -= (q * (s + n) + r);
    464  if (remainder(p, s + n) < r) {
    465  it._it_vec -= n;
    466  }
    467  }
    468 
    469  virtual inline difference_type difference(iterator_base const& it,
    470  iterator_base that) const {
    471  difference_type s = it._rv._nr_used_cols;
    472  difference_type n = it._rv._nr_unused_cols;
    473  difference_type b = it._it_vec - it._rv._vec.begin();
    474  difference_type a = that._it_vec - it._rv._vec.begin();
    475  return (b - a) - n * (quotient(b, s + n) - quotient(a, s + n));
    476  }
    477 
    478  static inline size_type remainder(difference_type a,
    479  difference_type b) {
    480  if (a >= 0) {
    481  return a % b;
    482  } else {
    483  return (a % b) + b;
    484  }
    485  }
    486 
    487  static inline size_type quotient(difference_type a, difference_type b) {
    488  if (a % b >= 0) {
    489  return a / b;
    490  } else {
    491  return (a / b) - 1;
    492  }
    493  }
    494  };
    495 
    496  struct fast_iterator_methods : public iterator_methods {
    497  iterator_methods const* copy() const final {
    498  return new fast_iterator_methods();
    499  }
    500 
    501  inline void prefix_increment(iterator_base& it) const final { // prefix
    502  ++it._it_vec;
    503  }
    504 
    505  inline void prefix_decrement(iterator_base& it) const final {
    506  --it._it_vec;
    507  }
    508 
    509  inline void increment(iterator_base& it, size_type val) const final {
    510  it._it_vec += val;
    511  }
    512 
    513  inline void decrement(iterator_base& it, size_type val) const final {
    514  it._it_vec -= val;
    515  }
    516 
    517  inline difference_type difference(iterator_base const& it,
    518  iterator_base that) const final {
    519  return it._it_vec - that._it_vec;
    520  }
    521  };
    522 
    523  struct column_iterator_methods : public iterator_methods {
    524  iterator_methods const* copy() const final {
    525  return new column_iterator_methods();
    526  }
    527 
    528  inline void increment(iterator_base& it, size_type val) const final {
    529  it._it_vec += val * (it._rv._nr_used_cols + it._rv._nr_unused_cols);
    530  }
    531 
    532  inline void decrement(iterator_base& it, size_type val) const final {
    533  it._it_vec -= val * (it._rv._nr_used_cols + it._rv._nr_unused_cols);
    534  }
    535 
    536  inline difference_type difference(iterator_base const& it,
    537  iterator_base that) const final {
    538  return (it._it_vec - that._it_vec)
    539  / (it._rv._nr_used_cols + it._rv._nr_unused_cols);
    540  }
    541  };
    542  }; // iterator_base definition ends
    543 
    544  public:
    545  typedef iterator_base<typename std::vector<T, A>::iterator,
    546  typename std::vector<T, A>::reference,
    547  typename std::vector<T, A>::pointer>
    548  iterator;
    549 
    550  typedef iterator_base<typename std::vector<T, A>::const_iterator,
    551  typename std::vector<T, A>::const_reference,
    552  typename std::vector<T, A>::const_pointer>
    553  const_iterator;
    554 
    555  iterator begin() {
    556  return iterator(*this, _vec.begin());
    557  }
    558 
    559  iterator end() {
    560  return iterator(*this, _vec.end());
    561  }
    562 
    563  const_iterator begin() const {
    564  return cbegin();
    565  }
    566 
    567  const_iterator cbegin() const {
    568  return const_iterator(*this, _vec.begin());
    569  }
    570 
    571  const_iterator end() const {
    572  return cend();
    573  }
    574 
    575  const_iterator cend() const {
    576  return const_iterator(*this, _vec.end());
    577  }
    578 
    579  typedef std::reverse_iterator<iterator> reverse_iterator;
    580  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
    581 
    582  reverse_iterator rbegin() {
    583  return reverse_iterator(end());
    584  }
    585 
    586  reverse_iterator rend() {
    587  return reverse_iterator(begin());
    588  }
    589 
    590  const_reverse_iterator rbegin() const {
    591  return const_reverse_iterator(end());
    592  }
    593 
    594  const_reverse_iterator rend() const {
    595  return const_reverse_iterator(begin());
    596  }
    597 
    598  const_reverse_iterator crbegin() const {
    599  return const_reverse_iterator(cend());
    600  }
    601 
    602  const_reverse_iterator crend() const {
    603  return const_reverse_iterator(cbegin());
    604  }
    605 
    606  iterator begin_row(size_t row_index) {
    607  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
    608  return iterator(
    609  *this, _vec.begin() + (_nr_used_cols + _nr_unused_cols) * row_index);
    610  }
    611 
    612  iterator end_row(size_t row_index) {
    613  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
    614  return begin_row(row_index) + _nr_used_cols;
    615  }
    616 
    617  iterator begin_column(size_t col_index) {
    618  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
    619  return iterator::column_iterator(*this, _vec.begin() + col_index);
    620  }
    621 
    622  iterator end_column(size_t col_index) {
    623  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
    624  return iterator::column_iterator(*this, _vec.end() + col_index);
    625  }
    626 
    627  const_iterator cbegin_row(size_t row_index) const {
    628  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
    629  return const_iterator(
    630  *this, _vec.begin() + (_nr_used_cols + _nr_unused_cols) * row_index);
    631  }
    632 
    633  const_iterator cend_row(size_t row_index) const {
    634  LIBSEMIGROUPS_ASSERT(row_index < _nr_rows);
    635  return cbegin_row(row_index) + _nr_used_cols;
    636  }
    637 
    638  const_iterator cbegin_column(size_t col_index) {
    639  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
    640  return const_iterator::column_iterator(*this, _vec.begin() + col_index);
    641  }
    642 
    643  const_iterator cend_column(size_t col_index) {
    644  LIBSEMIGROUPS_ASSERT(col_index < _nr_used_cols);
    645  return const_iterator::column_iterator(*this, _vec.end() + col_index);
    646  }
    647  // TODO reverse row and column iterators
    648  };
    649 } // namespace libsemigroups
    650 #endif // LIBSEMIGROUPS_SRC_RECVEC_H_
    Namespace for everything in the libsemigroups library.
    Definition: blocks.cc:32
    -
    Template class for rectangular vectors i.e. two dimensional vectors. The unique template parameter T ...
    Definition: recvec.h:34
    -
    - - - - diff --git a/reduct_8hpp_source.html b/reduct_8hpp_source.html deleted file mode 100644 index 5ee45d264..000000000 --- a/reduct_8hpp_source.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: include/reduct.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    reduct.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_INCLUDE_REDUCT_HPP_
    20 #define LIBSEMIGROUPS_INCLUDE_REDUCT_HPP_
    21 
    22 #include <functional> // for function
    23 #include <stddef.h> // for size_t
    24 #include <string> // for string
    25 
    26 namespace libsemigroups {
    36  public:
    43  explicit ReductionOrdering(ReductionOrdering const*);
    44 
    45  explicit ReductionOrdering(
    46  std::function<bool(std::string const*, std::string const*)>);
    47 
    50  size_t operator()(std::string const*, std::string const*) const;
    51 
    54  size_t operator()(std::string const&, std::string const&) const;
    55 
    56  private:
    57  std::function<bool(std::string const*, std::string const*)> _func;
    58  };
    59 
    62  class SHORTLEX : public ReductionOrdering {
    63  public:
    66  SHORTLEX();
    67  };
    68 } // namespace libsemigroups
    69 #endif // LIBSEMIGROUPS_INCLUDE_REDUCT_HPP_
    This class implements the shortlex reduction ordering derived from an ordering on libsemigroups::rws_...
    Definition: reduct.hpp:62
    -
    ReductionOrdering(ReductionOrdering const *)
    A constructor.
    -
    size_t operator()(std::string const *, std::string const *) const
    Returns true if the word pointed to by p is greater than the word pointed to by q in the reduction or...
    -
    SHORTLEX()
    Constructs a short-lex reduction ordering object derived from the order of on libsemigroups::rws_lett...
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    This class provides a call operator which can be used to compare libsemigroups::rws_word_t.
    Definition: reduct.hpp:35
    -
    - - - - diff --git a/report_8hpp_source.html b/report_8hpp_source.html deleted file mode 100644 index 09f7042a5..000000000 --- a/report_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/report.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    report.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2016 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains a class for reporting things during a computation.
    20 
    21 #ifndef LIBSEMIGROUPS_INCLUDE_REPORT_HPP_
    22 #define LIBSEMIGROUPS_INCLUDE_REPORT_HPP_
    23 
    24 #include <cxxabi.h> // for abi::
    25 
    26 #include <atomic> // for atomic
    27 #include <iostream> // for string, operator<<, cout, ost...
    28 #include <mutex> // for mutex, lock_guard
    29 #include <stddef.h> // for size_t
    30 #include <thread> // for get_id, thread, thread::id
    31 #include <unordered_map> // for unordered_map
    32 #include <vector> // for vector
    33 
    34 #include "libsemigroups-debug.hpp" // for LIBSEMIGROUPS_ASSERT
    35 #include "libsemigroups-exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
    36 
    37 #define REPORT(...) REPORTER(this, __VA_ARGS__)
    38 
    39 namespace libsemigroups {
    40  namespace internal {
    41  // The following is based on Catch v2.1.0
    42  class ColourGuard {
    43  public:
    44  enum class Code {
    45  None = 0,
    46 
    47  White,
    48  Red,
    49  Green,
    50  Blue,
    51  Cyan,
    52  Yellow,
    53  Grey,
    54 
    55  Bright = 0x10,
    56 
    57  BrightRed = Bright | Red,
    58  BrightGreen = Bright | Green,
    59  LightGrey = Bright | Grey,
    60  BrightWhite = Bright | White,
    61  };
    62 
    63  // Use constructed object for RAII guard
    64  explicit ColourGuard(Code colourCode) {
    65  use(colourCode);
    66  }
    67 
    68  explicit ColourGuard(size_t tid) {
    69  static const std::vector<Code> colours = {Code::White,
    70  Code::Green,
    71  Code::Yellow,
    72  Code::Blue,
    73  Code::Red,
    74  Code::Cyan,
    75  Code::BrightWhite,
    76  Code::Grey,
    77  Code::BrightGreen,
    78  Code::BrightRed,
    79  Code::LightGrey};
    80  use(colours[tid % colours.size()]);
    81  }
    82 
    83  ColourGuard(ColourGuard&& other) noexcept {
    84  _moved = other._moved;
    85  other._moved = true;
    86  }
    87 
    88  ColourGuard& operator=(ColourGuard&& other) noexcept {
    89  _moved = other._moved;
    90  other._moved = true;
    91  return *this;
    92  }
    93 
    94  ~ColourGuard() {
    95  if (!_moved) {
    96  use(Code::None);
    97  }
    98  }
    99 
    100  friend std::ostream& operator<<(std::ostream& os, ColourGuard const&) {
    101  return os;
    102  }
    103 
    104  private:
    105  void use(Code colourCode) {
    106  switch (colourCode) {
    107  case Code::None:
    108  // intentional fall through
    109  case Code::White:
    110  return set_colour("[0m");
    111  case Code::Red:
    112  return set_colour("[0;31m");
    113  case Code::Green:
    114  return set_colour("[0;32m");
    115  case Code::Blue:
    116  return set_colour("[0;34m");
    117  case Code::Cyan:
    118  return set_colour("[0;36m");
    119  case Code::Yellow:
    120  return set_colour("[0;33m");
    121  case Code::Grey:
    122  return set_colour("[1;30m");
    123 
    124  case Code::LightGrey:
    125  return set_colour("[0;37m");
    126  case Code::BrightRed:
    127  return set_colour("[1;31m");
    128  case Code::BrightGreen:
    129  return set_colour("[1;32m");
    130  case Code::BrightWhite:
    131  return set_colour("[1;37m");
    132 
    133  case Code::Bright:
    134  LIBSEMIGROUPS_EXCEPTION("not a colour");
    135  }
    136  }
    137 
    138  void set_colour(const char* escapeCode) {
    139  std::cout << '\033' << escapeCode;
    140  }
    141 
    142  bool _moved = false;
    143  };
    144 
    145  class Reporter {
    146  using Code = ColourGuard::Code;
    147 
    148  public:
    149  Reporter()
    150  : _next_tid(0), _ostream(&std::cout), _report(false), _thread_map() {
    151  // Get thread id 0 for the main thread
    152  thread_id(std::this_thread::get_id());
    153  }
    154 
    155  ~Reporter() {}
    156 
    157  template <typename TThisType, typename... TParams>
    158  void operator()(TThisType const* ptr, TParams... args) {
    159  if (_report) {
    160  size_t tid = thread_id(std::this_thread::get_id());
    161  std::lock_guard<std::mutex> lg(_mtx);
    162  ColourGuard cg(tid);
    163  (*_ostream) << cg << "#" << tid << ": " << class_name(ptr) << ": ";
    164  int dummy[sizeof...(TParams)] = {((*_ostream) << args, 0)...};
    165  (void) dummy;
    166  (*_ostream) << '\n';
    167  }
    168  }
    169 
    170  // Reporter& operator()(char const* func, size_t tid) {
    171  // *_ostream << color_prefix(tid) << "#" << tid << ": " << func << ": ";
    172  // return *this;
    173  //}
    174 
    175  void set_report(bool val) {
    176  _report = val;
    177  }
    178 
    179  void reset_thread_ids() {
    180  // Only do this from the main thread
    181  LIBSEMIGROUPS_ASSERT(thread_id(std::this_thread::get_id()) == 0);
    182  // Delete all thread_ids
    183  _thread_map.clear();
    184  _next_tid = 0;
    185  // Reinsert the main thread's id
    186  thread_id(std::this_thread::get_id());
    187  }
    188 
    189  size_t thread_id(std::thread::id tid) {
    190  std::lock_guard<std::mutex> lg(_mtx);
    191  auto it = _thread_map.find(tid);
    192  if (it != _thread_map.end()) {
    193  return (*it).second;
    194  } else {
    195  // Don't check the assert below because on a single thread machine
    196  // (such as those used by appveyor), for an fp-semigroup more than 1
    197  // thread will be used, and this assertion will fail.
    198  // LIBSEMIGROUPS_ASSERT(_next_tid <=
    199  // std::thread::hardware_concurrency());
    200  _thread_map.emplace(tid, _next_tid++);
    201  return _next_tid - 1;
    202  }
    203  }
    204 
    205  void set_ostream(std::ostream& os) {
    206  _ostream = &os;
    207  }
    208 
    209  private:
    210  template <class T>
    211  std::string class_name(T const* o) {
    212  auto it = _class_name_map.find(typeid(*o).hash_code());
    213  if (it != _class_name_map.end()) {
    214  return (*it).second;
    215  }
    216  int status;
    217  char* ptr = abi::__cxa_demangle(typeid(*o).name(), 0, 0, &status);
    218  if (status == 0) { // successfully demangled
    219  std::string full = std::string(ptr);
    220  size_t last = full.size();
    221  if (full.back() == '>') {
    222  size_t bracket_count = 0;
    223  do {
    224  last = full.find_last_of("<>", last - 1);
    225  if (last != std::string::npos) {
    226  if (full.at(last) == '>') {
    227  bracket_count++;
    228  } else if (full.at(last) == '<') {
    229  bracket_count--;
    230  }
    231  }
    232  } while (bracket_count != 0);
    233  }
    234  size_t first = full.rfind("::", last - 1);
    235  first = (first == std::string::npos ? 0 : first + 2);
    236  free(ptr);
    237  std::string out = full.substr(first, last - first);
    238  _class_name_map.emplace(typeid(*o).hash_code(), out);
    239  return out;
    240  }
    241  free(ptr);
    242  std::string out;
    243  _class_name_map.emplace(typeid(*o).hash_code(), out);
    244  return out;
    245  }
    246 
    247  std::unordered_map<size_t, std::string> _class_name_map;
    248  std::mutex _mtx;
    249  size_t _next_tid;
    250  std::ostream* _ostream;
    251  std::atomic<bool> _report;
    252  std::unordered_map<std::thread::id, size_t> _thread_map;
    253  };
    254  } // namespace internal
    255 
    256  extern internal::Reporter REPORTER;
    257 
    258  struct ReportGuard {
    259  explicit ReportGuard(std::ostream& os = std::cout);
    260  ~ReportGuard();
    261  };
    262 
    263 } // namespace libsemigroups
    264 #endif // LIBSEMIGROUPS_INCLUDE_REPORT_HPP_
    Definition: kbe.hpp:198
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/runner_8hpp_source.html b/runner_8hpp_source.html deleted file mode 100644 index 6aebc3f9d..000000000 --- a/runner_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/runner.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    runner.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains two classes Runner and Race for competitively running
    20 // different functions/methods in different threads, and obtaining the winner.
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_RUNNER_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_RUNNER_HPP_
    24 
    25 #include <atomic>
    26 #include <chrono>
    27 
    28 #include "report.hpp"
    29 #include "stl.hpp"
    30 
    31 namespace libsemigroups {
    32  constexpr std::chrono::nanoseconds FOREVER = std::chrono::nanoseconds::max();
    33  // TODO(now) move to constants.hpp
    34 
    35  namespace internal {
    36  class Runner {
    37  public:
    39  // Runner - constructors + destructor - public
    41 
    42  Runner();
    43  virtual ~Runner() {}
    44 
    46  // Runner - pure virtual methods - public
    48 
    49  virtual void run() = 0;
    50 
    52  // Runner - non-virtual methods - public
    54 
    55  // This method runs the algorithm for approximately the number of
    56  // nanoseconds indicated by the argument.
    57  void run_for(std::chrono::nanoseconds);
    58  template <typename TIntType>
    59  void run_for(TIntType t) {
    60  run_for(std::chrono::nanoseconds(t));
    61  }
    62  bool timed_out() const;
    63 
    64  template <typename TCallable>
    65  void run_until(TCallable const& func,
    66  std::chrono::nanoseconds check_interval
    67  = std::chrono::milliseconds(2)) {
    68  static_assert(internal::is_callable<TCallable>::value,
    69  "the template parameter TCallable must be callable");
    70  static_assert(std::is_same<typename std::result_of<TCallable()>::type,
    71  bool>::value,
    72  "the template parameter TCallable must return a bool");
    73  while (!func() && !dead() && !finished()) {
    74  run_for(check_interval);
    75  if (check_interval < std::chrono::milliseconds(1024)) {
    76  check_interval *= 2;
    77  }
    78  }
    79  }
    80  template <typename TCallable, typename TIntType>
    81  void run_until(TCallable const& func, TIntType check_interval) {
    82  run_until(func, std::chrono::nanoseconds(check_interval));
    83  }
    84 
    85  // Returns true if we should report and false otherwise
    86  bool report() const;
    87  void report_every(std::chrono::nanoseconds);
    88  template <typename TIntType>
    89  void report_every(TIntType t) {
    90  report_every(std::chrono::nanoseconds(t));
    91  }
    92  void report_why_we_stopped() const;
    93 
    94  void set_finished(bool) const noexcept;
    95  bool finished() const;
    96  void set_started(bool) const noexcept;
    97  bool started() const;
    98 
    99  void kill() noexcept;
    100  bool dead() const noexcept;
    101 
    102  bool stopped() const;
    103 
    104  protected:
    106  // Runner - non-pure virtual methods - protected
    108 
    109  // TODO(later) compile-time polymorphism?
    110  virtual bool dead_impl() const;
    111  virtual bool finished_impl() const;
    112  virtual bool started_impl() const;
    113 
    114  private:
    116  // Runner - data - private
    118 
    119  std::atomic<bool> _dead;
    120  mutable bool _finished;
    121  mutable std::chrono::high_resolution_clock::time_point _last_report;
    122  std::chrono::nanoseconds _run_for;
    123  std::chrono::nanoseconds _report_time_interval;
    124  std::chrono::high_resolution_clock::time_point _start_time;
    125  mutable bool _started;
    126  };
    127  } // namespace internal
    128 } // namespace libsemigroups
    129 #endif // LIBSEMIGROUPS_INCLUDE_RUNNER_HPP_
    Definition: kbe.hpp:198
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/rws_8h_source.html b/rws_8h_source.html deleted file mode 100644 index 00e4451d2..000000000 --- a/rws_8h_source.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - -libsemigroups: src/rws.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    rws.h
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2017 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_SRC_RWS_H_
    20 #define LIBSEMIGROUPS_SRC_RWS_H_
    21 
    22 #include <atomic>
    23 #include <list>
    24 #include <set>
    25 #include <stack>
    26 #include <string>
    27 #include <utility>
    28 #include <vector>
    29 
    30 #include "cong.h"
    31 #include "semigroups.h"
    32 
    33 namespace libsemigroups {
    34 
    44  public:
    52  std::function<bool(std::string const*, std::string const*)> func)
    53  : _func(func) {}
    54 
    57  size_t operator()(std::string const* p, std::string const* q) const {
    58  return _func(p, q);
    59  }
    60 
    63  size_t operator()(std::string const& p, std::string const& q) const {
    64  return _func(&p, &q);
    65  }
    66 
    67  private:
    68  std::function<bool(std::string const*, std::string const*)> _func;
    69  };
    70 
    73  class SHORTLEX : public ReductionOrdering {
    74  public:
    78  : ReductionOrdering([](std::string const* p, std::string const* q) {
    79  return (p->size() > q->size()
    80  || (p->size() == q->size() && *p > *q));
    81  }) {}
    82  };
    83 
    84  // The ordering used here is recursive path ordering (based on
    85  // that described in the book "Confluent String Rewriting" by Matthias
    86  // Jantzen, Defn 1.2.14, page 24).
    87  //
    88  // The ordering is as follows:
    89  // let u, v be elements of X* u >= v iff one of the following conditions is
    90  // fulfilled;
    91  // 1) u = v
    92  // OR
    93  // u = u'a, v = v'b for some a,b elements of X, u',v' elements of X* and then:
    94  // 2) a = b and u' >= v'
    95  // OR
    96  // 3) a > b and u > v'
    97  // OR
    98  // 4) b > a and u'> v
    99  //
    100  // 1 or 0 = false
    101  // 2 = true
    102  /*class RECURSIVE : public ReductionOrdering {
    103  public:
    104  RECURSIVE()
    105  : ReductionOrdering([](std::string const* Q, std::string const* P) {
    106  bool lastmoved = false;
    107  auto it_P = P->crbegin();
    108  auto it_Q = Q->crbegin();
    109  while (true) {
    110  if (it_P == P->crend()) {
    111  return (it_Q == Q->crend() ? lastmoved : true);
    112  } else if (it_Q == Q->crend()) {
    113  return false;
    114  }
    115  if (*it_P == *it_Q) {
    116  ++it_P;
    117  ++it_Q;
    118  } else if (*it_P < *it_Q) {
    119  ++it_P;
    120  lastmoved = false;
    121  } else {
    122  ++it_Q;
    123  lastmoved = true;
    124  }
    125  }
    126  }) {}
    127  };*/
    128 
    129  // TODO add more reduction orderings
    130 
    134 
    135  class RWS {
    136  // Forward declarations
    137  struct Rule;
    138  class RuleLookup;
    139  struct OverlapMeasure;
    140  friend Rule;
    141 
    142  public:
    144  typedef char rws_letter_t;
    145 
    147  typedef std::string rws_word_t;
    148 
    157  enum overlap_measure { ABC = 0, AB_BC = 1, max_AB_BC = 2 };
    158 
    165  explicit RWS(ReductionOrdering* order,
    166  std::string alphabet = STANDARD_ALPHABET)
    167  : _active_rules(),
    168  _alphabet(alphabet),
    169  _check_confluence_interval(4096),
    170  // _clear_stack_interval(0),
    171  _confluence_known(false),
    172  _inactive_rules(),
    173  _confluent(false),
    174  _max_overlap(UNBOUNDED),
    175  _max_rules(UNBOUNDED),
    176  _min_length_lhs_rule(std::numeric_limits<size_t>::max()),
    177  _order(order),
    178  _overlap_measure(nullptr),
    179  _report_next(0),
    180  _report_interval(1000),
    181  _stack(),
    182  _tmp_word1(new rws_word_t()),
    183  _tmp_word2(new rws_word_t()),
    184  _total_rules(0) {
    185  _next_rule_it1 = _active_rules.end(); // null
    186  _next_rule_it2 = _active_rules.end(); // null
    187  set_overlap_measure(overlap_measure::ABC);
    188  if (_alphabet != STANDARD_ALPHABET) {
    189  if (std::is_sorted(_alphabet.cbegin(), _alphabet.cend())) {
    190  _alphabet = STANDARD_ALPHABET;
    191  } else {
    192  for (size_t i = 0; i < _alphabet.size(); ++i) {
    193  _alphabet_map.emplace(
    194  std::make_pair(_alphabet[i], uint_to_rws_letter(i)));
    195  }
    196  }
    197  }
    198 #ifdef LIBSEMIGROUPS_STATS
    199  _max_stack_depth = 0;
    200  _max_word_length = 0;
    201  _max_active_word_length = 0;
    202  _max_active_rules = 0;
    203 #endif
    204  }
    205 
    208  RWS() : RWS(new SHORTLEX(), STANDARD_ALPHABET) {}
    209 
    213  // Apparently old versions of GCC (4.8.2) don't like explicit constructors
    214  // with single default parameters:
    215  // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60367
    216  // and so we have two constructors instead.
    217  explicit RWS(std::string alphabet) : RWS(new SHORTLEX(), alphabet) {}
    218 
    221  explicit RWS(std::vector<relation_t> const& relations) : RWS() {
    222  add_rules(relations);
    223  }
    224 
    230  RWS(ReductionOrdering* order, std::vector<relation_t> const& relations)
    231  : RWS(order) {
    232  add_rules(relations);
    233  }
    234 
    241  explicit RWS(Congruence& cong) : RWS() {
    242  add_rules(cong);
    243  }
    244 
    249  ~RWS();
    250 
    254  friend std::ostream& operator<<(std::ostream& os, RWS const& rws);
    255 
    259  bool confluent() const {
    260  std::atomic<bool> killed(false);
    261  return confluent(killed);
    262  }
    263 
    265  size_t nr_rules() const { // FIXME should this be nrrules?
    266  return _active_rules.size();
    267  }
    268 
    271  std::string* rewrite(std::string* w) const {
    272  string_to_rws_word(*w);
    273  internal_rewrite(w);
    274  rws_word_to_string(*w);
    275  return w;
    276  }
    277 
    280  std::string rewrite(std::string w) const {
    281  rewrite(&w);
    282  return w;
    283  }
    284 
    291  void knuth_bendix() {
    292  std::atomic<bool> killed(false);
    293  knuth_bendix(killed);
    294  }
    295 
    305  void knuth_bendix(std::atomic<bool>& killed);
    306 
    315  // TODO a version that also accepts killed.
    317  Timer timer;
    318  size_t max_overlap = _max_overlap;
    319  size_t check_confluence_interval = _check_confluence_interval;
    320  _max_overlap = 1;
    321  _check_confluence_interval = UNBOUNDED;
    322  std::atomic<bool> killed(false);
    323  while (!confluent()) {
    324  knuth_bendix(killed);
    325  _max_overlap++;
    326  }
    327  _max_overlap = max_overlap;
    328  _check_confluence_interval = check_confluence_interval;
    329  REPORT("elapsed time = " << timer);
    330  }
    331 
    339  void add_rule(std::string const& p, std::string const& q);
    340 
    345  void add_rules(std::vector<relation_t> const& relations);
    346 
    349  void add_rules(Congruence& cong) {
    350  add_rules(cong.relations());
    351  add_rules(cong.extra());
    352  }
    353 
    357  // TODO remove this
    358  bool rule(std::string p, std::string q) const;
    359 
    366  std::vector<std::pair<std::string, std::string>> rules() const;
    367 
    372  void set_report(bool val) const {
    373  glob_reporter.set_report(val);
    374  }
    375 
    382  void set_report_interval(size_t interval) {
    383  _report_interval = interval;
    384  }
    385 
    397  void set_check_confluence_interval(size_t interval) {
    398  if (interval > UNBOUNDED) {
    399  interval = UNBOUNDED;
    400  }
    401  _check_confluence_interval = interval;
    402  }
    403 
    404  // This is temporarily disabled, and may be deleted altogether in the
    405  // future.
    406  // void set_clear_stack_interval(size_t interval) {
    407  // _clear_stack_interval = interval;
    408  // }
    409 
    418  void set_max_overlap(size_t val) {
    419  if (val > UNBOUNDED) {
    420  val = UNBOUNDED;
    421  }
    422  _max_overlap = val;
    423  }
    424 
    431  void set_max_rules(size_t val) {
    432  _max_rules = val;
    433  }
    434 
    439  void set_overlap_measure(overlap_measure measure);
    440 
    449  bool test_less_than(word_t const& p, word_t const& q);
    450 
    459  bool test_less_than(std::string const& p, std::string const& q);
    460 
    472  bool test_less_than(std::string* p, std::string* q);
    473 
    482  bool test_equals(word_t const& p, word_t const& q);
    483 
    492  bool test_equals(std::initializer_list<size_t> const& p,
    493  std::initializer_list<size_t> const& q);
    494 
    502  bool test_equals(std::string const& p, std::string const& q);
    503 
    514  bool test_equals(std::string* p, std::string* q);
    515 
    520  static size_t const UNBOUNDED = static_cast<size_t>(-2);
    521 
    525  static inline rws_word_t* uint_to_rws_word(size_t const& a) {
    526  return new rws_word_t(1, uint_to_rws_letter(a));
    527  }
    528 
    531  static word_t* rws_word_to_word(rws_word_t const* rws_word) {
    532  word_t* w = new word_t();
    533  w->reserve(rws_word->size());
    534  for (rws_letter_t const& rws_letter : *rws_word) {
    535  w->push_back(rws_letter_to_uint(rws_letter));
    536  }
    537  return w;
    538  }
    539 
    546  static rws_word_t* word_to_rws_word(word_t const& w, rws_word_t* ww) {
    547  ww->clear();
    548  for (size_t const& a : w) {
    549  (*ww) += uint_to_rws_letter(a);
    550  }
    551  return ww;
    552  }
    553 
    559  static inline rws_word_t* word_to_rws_word(word_t const& w) {
    560  rws_word_t* ww = new rws_word_t();
    561  return word_to_rws_word(w, ww);
    562  }
    563 
    564  private:
    565  static inline size_t rws_letter_to_uint(rws_letter_t const& rws_letter) {
    566 #ifdef LIBSEMIGROUPS_DEBUG
    567  return static_cast<size_t>(rws_letter - 97);
    568 #else
    569  return static_cast<size_t>(rws_letter - 1);
    570 #endif
    571  }
    572 
    573  static inline rws_letter_t uint_to_rws_letter(size_t const& a) {
    574 #ifdef LIBSEMIGROUPS_DEBUG
    575  return static_cast<rws_letter_t>(a + 97);
    576 #else
    577  return static_cast<rws_letter_t>(a + 1);
    578 #endif
    579  }
    580 
    581  inline rws_letter_t char_to_rws_letter(char a) const {
    582  LIBSEMIGROUPS_ASSERT(_alphabet != STANDARD_ALPHABET);
    583  LIBSEMIGROUPS_ASSERT(_alphabet_map.find(a) != _alphabet_map.end());
    584  return (*_alphabet_map.find(a)).second;
    585  }
    586 
    587  inline char rws_letter_to_char(rws_letter_t a) const {
    588  LIBSEMIGROUPS_ASSERT(_alphabet != STANDARD_ALPHABET);
    589  LIBSEMIGROUPS_ASSERT(rws_letter_to_uint(a) < _alphabet.size());
    590  return _alphabet[rws_letter_to_uint(a)];
    591  }
    592 
    593  inline void string_to_rws_word(std::string& w) const {
    594  if (_alphabet == STANDARD_ALPHABET) {
    595  return;
    596  }
    597  for (auto& a : w) {
    598  a = char_to_rws_letter(a);
    599  }
    600  }
    601 
    602  inline void rws_word_to_string(rws_word_t& w) const {
    603  if (_alphabet == STANDARD_ALPHABET) {
    604  return;
    605  }
    606  for (auto& a : w) {
    607  a = rws_letter_to_char(a);
    608  }
    609  }
    610 
    611  static std::string const STANDARD_ALPHABET;
    612 
    613  void add_rule(Rule* rule);
    614  std::list<Rule const*>::iterator
    615  remove_rule(std::list<Rule const*>::iterator it);
    616 
    617  Rule* new_rule() const;
    618  Rule* new_rule(rws_word_t* lhs, rws_word_t* rhs) const;
    619  Rule* new_rule(Rule const* rule) const;
    620  Rule* new_rule(rws_word_t::const_iterator begin_lhs,
    621  rws_word_t::const_iterator end_lhs,
    622  rws_word_t::const_iterator begin_rhs,
    623  rws_word_t::const_iterator end_rhs) const;
    624 
    625  // Rewrites the word pointed to by \p w in-place according to the current
    626  // rules in the rewriting system.
    627  void internal_rewrite(rws_word_t* w) const;
    628 
    629  bool confluent(std::atomic<bool>& killed) const;
    630  void clear_stack(std::atomic<bool>& killed);
    631  void push_stack(Rule* rule);
    632  void push_stack(Rule* rule, std::atomic<bool>& killed);
    633  void overlap(Rule const* u, Rule const* v, std::atomic<bool>& killed);
    634  std::list<Rule const*> _active_rules;
    635  std::string _alphabet;
    636  std::unordered_map<char, rws_letter_t> _alphabet_map;
    637  size_t _check_confluence_interval;
    638  // size_t _clear_stack_interval;
    639  mutable std::atomic<bool> _confluence_known;
    640  mutable std::list<Rule*> _inactive_rules;
    641  mutable std::atomic<bool> _confluent;
    642  size_t _max_overlap;
    643  size_t _max_rules;
    644  size_t _min_length_lhs_rule;
    645  std::list<Rule const*>::iterator _next_rule_it1;
    646  std::list<Rule const*>::iterator _next_rule_it2;
    647  ReductionOrdering const* _order;
    648  OverlapMeasure* _overlap_measure;
    649  size_t _report_next;
    650  size_t _report_interval;
    651  std::set<RuleLookup> _set_rules;
    652  std::stack<Rule*> _stack;
    653  rws_word_t* _tmp_word1;
    654  rws_word_t* _tmp_word2;
    655  mutable size_t _total_rules;
    656 
    657 #ifdef LIBSEMIGROUPS_STATS
    658  size_t max_active_word_length();
    659  size_t _max_stack_depth;
    660  size_t _max_word_length;
    661  size_t _max_active_word_length;
    662  size_t _max_active_rules;
    663  std::unordered_set<rws_word_t> _unique_lhs_rules;
    664 #endif
    665  };
    666 
    667  // Class for rules in rewriting systems, which supports only two methods,
    668  // Rule::lhs and Rule::rhs, which return the left and right hand sides of
    669  // the rule.
    670  struct RWS::Rule {
    671  friend std::ostream& operator<<(std::ostream& os, Rule const& rule) {
    672  os << rule.rws_word_to_string(rule.lhs()) << " -> "
    673  << rule.rws_word_to_string(rule.rhs());
    674  return os;
    675  }
    676 
    677  std::string rws_word_to_string(rws_word_t const* word) const {
    678  std::string str(*word);
    679  _rws->rws_word_to_string(str);
    680  return str;
    681  }
    682 
    683  // Returns the left hand side of the rule, which is guaranteed to be
    684  // greater than its right hand side according to the reduction ordering of
    685  // the RWS used to construct this.
    686  rws_word_t const* lhs() const {
    687  return const_cast<rws_word_t const*>(_lhs);
    688  }
    689 
    690  // Returns the right hand side of the rule, which is guaranteed to be
    691  // less than its left hand side according to the reduction ordering of
    692  // the RWS used to construct this.
    693  rws_word_t const* rhs() const {
    694  return const_cast<rws_word_t const*>(_rhs);
    695  }
    696 
    697  // The Rule class does not support an assignment contructor to avoid
    698  // accidental copying.
    699  Rule& operator=(Rule const& copy) = delete;
    700 
    701  // The Rule class does not support a copy contructor to avoid
    702  // accidental copying.
    703  Rule(Rule const& copy) = delete;
    704 
    705  // Construct from RWS with new but empty rws_word_t's
    706  explicit Rule(RWS const* rws, int64_t id)
    707  : _rws(rws),
    708  _lhs(new rws_word_t()),
    709  _rhs(new rws_word_t()),
    710  _id(-1 * id) {
    711  LIBSEMIGROUPS_ASSERT(_id < 0);
    712  }
    713 
    714  // Destructor, deletes pointers used to create the rule.
    715  ~Rule() {
    716  delete _lhs;
    717  delete _rhs;
    718  }
    719 
    720  void rewrite() {
    721  LIBSEMIGROUPS_ASSERT(_id != 0);
    722  _rws->internal_rewrite(_lhs);
    723  _rws->internal_rewrite(_rhs);
    724  reorder();
    725  }
    726 
    727  void rewrite_rhs() {
    728  LIBSEMIGROUPS_ASSERT(_id != 0);
    729  _rws->internal_rewrite(_rhs);
    730  }
    731 
    732  void clear() {
    733  LIBSEMIGROUPS_ASSERT(_id != 0);
    734  _lhs->clear();
    735  _rhs->clear();
    736  }
    737 
    738  inline bool active() const {
    739  LIBSEMIGROUPS_ASSERT(_id != 0);
    740  return (_id > 0);
    741  }
    742 
    743  void deactivate() {
    744  LIBSEMIGROUPS_ASSERT(_id != 0);
    745  if (active()) {
    746  _id *= -1;
    747  }
    748  }
    749 
    750  void activate() {
    751  LIBSEMIGROUPS_ASSERT(_id != 0);
    752  if (!active()) {
    753  _id *= -1;
    754  }
    755  }
    756 
    757  void set_id(int64_t id) {
    758  LIBSEMIGROUPS_ASSERT(id > 0);
    759  LIBSEMIGROUPS_ASSERT(!active());
    760  _id = -1 * id;
    761  }
    762 
    763  int64_t id() const {
    764  LIBSEMIGROUPS_ASSERT(_id != 0);
    765  return _id;
    766  }
    767 
    768  void reorder() {
    769  if ((*(_rws->_order))(_rhs, _lhs)) {
    770  std::swap(_lhs, _rhs);
    771  }
    772  }
    773 
    774  RWS const* _rws;
    775  rws_word_t* _lhs;
    776  rws_word_t* _rhs;
    777  int64_t _id;
    778  };
    779 
    780  // Simple class wrapping a two iterators to an rws_word_t and a Rule const*
    781  class RWS::RuleLookup {
    782  public:
    783  RuleLookup() : _rule(nullptr) {}
    784 
    785  explicit RuleLookup(RWS::Rule* rule)
    786  : _first(rule->lhs()->cbegin()),
    787  _last(rule->lhs()->cend()),
    788  _rule(rule) {}
    789 
    790  RuleLookup& operator()(rws_word_t::iterator const& first,
    791  rws_word_t::iterator const& last) {
    792  _first = first;
    793  _last = last;
    794  return *this;
    795  }
    796 
    797  Rule const* rule() const {
    798  return _rule;
    799  }
    800 
    801  // This implements reverse lex comparison of this and that, which satisfies
    802  // the requirement of std::set that equivalent items be incomparable, so,
    803  // for example bcbc and abcbc are considered equivalent, but abcba and bcbc
    804  // are not.
    805  bool operator<(RuleLookup const& that) const {
    806  auto it_this = _last - 1;
    807  auto it_that = that._last - 1;
    808  while (it_this > _first && it_that > that._first
    809  && *it_this == *it_that) {
    810  --it_that;
    811  --it_this;
    812  }
    813  return *it_this < *it_that;
    814  }
    815 
    816  private:
    817  rws_word_t::const_iterator _first;
    818  rws_word_t::const_iterator _last;
    819  Rule const* _rule;
    820  };
    821 } // namespace libsemigroups
    822 #endif // LIBSEMIGROUPS_SRC_RWS_H_
    std::string * rewrite(std::string *w) const
    Rewrites the word w in-place according to the current rules in the rewriting system.
    Definition: rws.h:271
    -
    RWS(ReductionOrdering *order, std::string alphabet=STANDARD_ALPHABET)
    Constructs rewriting system with no rules and the reduction ordering order.
    Definition: rws.h:165
    -
    bool test_equals(word_t const &p, word_t const &q)
    Returns true if the reduced form of RWS::word_to_rws_word(p) equal the reduced form of RWS::word_to_r...
    Definition: rws.cc:672
    -
    RWS(Congruence &cong)
    Constructs a rewriting system from Congruence::relations and Congruence::extra applied to cong.
    Definition: rws.h:241
    -
    This class implements the shortlex reduction ordering derived from an ordering on libsemigroups::rws_...
    Definition: rws.h:73
    -
    void set_overlap_measure(overlap_measure measure)
    This method can be used to determine the way that the length of an overlap of two words in the system...
    Definition: rws.cc:171
    -
    RWS(std::string alphabet)
    Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering and using the alphab...
    Definition: rws.h:217
    -
    overlap_measure
    The values in this enum determine how a rewriting system measures the length of the overlap of two w...
    Definition: rws.h:157
    -
    void set_report_interval(size_t interval)
    Some information can be sent to std::cout during calls to RWS::knuth_bendix and RWS::knuth_bendix_by_...
    Definition: rws.h:382
    -
    std::vector< std::pair< std::string, std::string > > rules() const
    This method returns a vector consisting of the pairs of strings which represent the rules of the rewr...
    Definition: rws.cc:343
    -
    ReductionOrdering(std::function< bool(std::string const *, std::string const *)> func)
    A constructor.
    Definition: rws.h:51
    -
    void add_rule(std::string const &p, std::string const &q)
    Add a rule to the rewriting system.
    Definition: rws.cc:228
    -
    static rws_word_t * uint_to_rws_word(size_t const &a)
    This method converts an unsigned integer to the corresponding rws_word_t. For example,...
    Definition: rws.h:525
    -
    std::vector< letter_t > word_t
    Type for a word over the generators of a semigroup.
    Definition: semigroups.h:55
    -
    void set_max_rules(size_t val)
    This method sets the (approximate) maximum number of rules that the system should contain....
    Definition: rws.h:431
    -
    bool rule(std::string p, std::string q) const
    This method returns true if the strings p and q represent an active rule of the rewriting system,...
    Definition: rws.cc:364
    -
    static size_t const UNBOUNDED
    The constant value represents an UNBOUNDED quantity.
    Definition: rws.h:520
    -
    void set_max_overlap(size_t val)
    This method can be used to specify the maximum length of the overlap of two left hand sides of rules ...
    Definition: rws.h:418
    -
    size_t operator()(std::string const *p, std::string const *q) const
    Returns true if the word pointed to by p is greater than the word pointed to by q in the reduction or...
    Definition: rws.h:57
    -
    RWS(std::vector< relation_t > const &relations)
    Constructs a rewriting system with rules derived from the parameter relations, and with the SHORTLEX ...
    Definition: rws.h:221
    -
    std::vector< relation_t > const & relations()
    Returns the vector of relations used to define the semigroup over which the congruence is defined.
    Definition: cong.h:271
    -
    size_t nr_rules() const
    Returns the current number of active rules in the rewriting system.
    Definition: rws.h:265
    -
    SHORTLEX()
    Constructs a short-lex reduction ordering object derived from the order of on libsemigroups::rws_lett...
    Definition: rws.h:77
    -
    std::vector< relation_t > const & extra() const
    Returns the vector of extra relations (or equivalently, generating pairs) used to define the congruen...
    Definition: cong.h:278
    -
    RWS()
    Constructs a rewriting system with no rules, and the SHORTLEX reduction ordering.
    Definition: rws.h:208
    -
    void knuth_bendix()
    Run the Knuth-Bendix algorithm on the rewriting system.
    Definition: rws.h:291
    -
    bool test_less_than(word_t const &p, word_t const &q)
    Returns true if the reduced form of RWS::word_to_rws_word(p) is less than the reduced form of RWS::wo...
    Definition: rws.cc:705
    -
    static rws_word_t * word_to_rws_word(word_t const &w, rws_word_t *ww)
    This method converts a vector of unsigned integers to a string which represents a word in the rewriti...
    Definition: rws.h:546
    -
    bool confluent() const
    Returns true if the rewriting system is confluent and false if it is not.
    Definition: rws.h:259
    -
    Class for congruence on a semigroup or fintely presented semigroup.
    Definition: cong.h:54
    -
    ~RWS()
    A default destructor.
    Definition: rws.cc:190
    -
    char rws_letter_t
    Type for letters for rewriting systems.
    Definition: rws.h:144
    -
    void set_check_confluence_interval(size_t interval)
    The method RWS::knuth_bendix periodically checks if the system is already confluent....
    Definition: rws.h:397
    -
    Namespace for everything in the libsemigroups library.
    Definition: blocks.cc:32
    -
    void set_report(bool val) const
    Turn reporting on or off.
    Definition: rws.h:372
    -
    RWS(ReductionOrdering *order, std::vector< relation_t > const &relations)
    Constructs a rewriting system with rules derived from relations, and with the reduction ordering spec...
    Definition: rws.h:230
    -
    This class is used to represent a string rewriting system defining a finitely presented monoid or sem...
    Definition: rws.h:135
    -
    void add_rules(Congruence &cong)
    Add rules derived from Congruence::relations and Congruence::extra applied to cong.
    Definition: rws.h:349
    -
    void knuth_bendix_by_overlap_length()
    This method runs the Knuth-Bendix algorithm on the rewriting system by considering all overlaps of a ...
    Definition: rws.h:316
    -
    friend std::ostream & operator<<(std::ostream &os, RWS const &rws)
    This method allows a RWS object to be left shifted into a std::ostream, such as std::cout....
    Definition: rws.cc:211
    -
    std::string rewrite(std::string w) const
    Rewrites a copy of the word w according to the current rules in the rewriting system.
    Definition: rws.h:280
    -
    void add_rules(std::vector< relation_t > const &relations)
    Adds rules derived from relations via RWS::word_to_rws_word to the rewriting system.
    Definition: rws.cc:219
    -
    static word_t * rws_word_to_word(rws_word_t const *rws_word)
    This method converts a string in the rewriting system into a vector of unsigned integers....
    Definition: rws.h:531
    -
    static rws_word_t * word_to_rws_word(word_t const &w)
    This method converts a vector of unsigned integers to a string which represents a word in the rewriti...
    Definition: rws.h:559
    -
    size_t operator()(std::string const &p, std::string const &q) const
    Returns true if the word p is greater than the word q in the reduction ordering.
    Definition: rws.h:63
    -
    This class provides a call operator which can be used to compare libsemigroups::rws_word_t.
    Definition: rws.h:43
    -
    - - - - diff --git a/rwse_8h_source.html b/rwse_8h_source.html deleted file mode 100644 index 8e87d952b..000000000 --- a/rwse_8h_source.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -libsemigroups: src/rwse.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    rwse.h
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2016 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_SRC_RWSE_H_
    20 #define LIBSEMIGROUPS_SRC_RWSE_H_
    21 
    22 #include <algorithm>
    23 #include <stack>
    24 #include <string>
    25 #include <utility>
    26 #include <vector>
    27 
    28 #include "elements.h"
    29 #include "rws.h"
    30 
    31 namespace libsemigroups {
    32 
    37  class RWSE : public Element {
    38  using rws_word_t = RWS::rws_word_t;
    39 
    40  private:
    41  RWSE(RWS* rws, rws_word_t* w, bool reduce)
    42  : Element(Element::elm_t::RWSE), _rws(rws), _rws_word(w) {
    43  if (reduce) {
    44  _rws->rewrite(_rws_word);
    45  }
    46  }
    47 
    48  public:
    60  RWSE(RWS* rws, rws_word_t* w) : RWSE(rws, w, true) {
    61  LIBSEMIGROUPS_ASSERT(w != nullptr);
    62  }
    63 
    72  RWSE(RWS& rws, rws_word_t const& w) : RWSE(&rws, new rws_word_t(w)) {}
    73 
    77  RWSE(RWS& rws, letter_t const& a) : RWSE(&rws, RWS::uint_to_rws_word(a)) {}
    78 
    82  RWSE(RWS& rws, word_t const& w) : RWSE(&rws, RWS::word_to_rws_word(w)) {}
    83 
    89  bool operator==(Element const& that) const override {
    90  LIBSEMIGROUPS_ASSERT(_rws_word != nullptr);
    91  LIBSEMIGROUPS_ASSERT(static_cast<RWSE const&>(that)._rws_word != nullptr);
    92  return *(static_cast<RWSE const&>(that)._rws_word) == *(this->_rws_word);
    93  }
    94 
    100  // TODO should use the reduction ordering of RWS.
    101  bool operator<(const Element& that) const override;
    102 
    108  Element* really_copy(size_t increase_deg_by) const override;
    109 
    114  void copy(Element const* x) override;
    115  void swap(Element* x) override;
    116 
    120  void really_delete() override {
    121  delete _rws_word;
    122  _rws_word = nullptr;
    123  }
    124 
    133  size_t complexity() const override {
    134  return Semigroup::LIMIT_MAX;
    135  }
    136 
    143  size_t degree() const override {
    144  return 0;
    145  }
    146 
    153  Element* identity() const override {
    154  return new RWSE(_rws, new rws_word_t());
    155  }
    156 
    160  void cache_hash_value() const override {
    161  LIBSEMIGROUPS_ASSERT(_rws_word != nullptr);
    162  this->_hash_value = std::hash<rws_word_t>()(*_rws_word);
    163  }
    164 
    176  void redefine(Element const* x, Element const* y) override;
    177 
    179  rws_word_t const* get_rws_word() const {
    180  return _rws_word;
    181  }
    182 
    183  private:
    184  // TODO const!
    185  RWS* _rws;
    186  rws_word_t* _rws_word;
    187  };
    188 } // namespace libsemigroups
    189 
    190 #endif // LIBSEMIGROUPS_SRC_RWSE_H_
    std::string * rewrite(std::string *w) const
    Rewrites the word w in-place according to the current rules in the rewriting system.
    Definition: rws.h:271
    -
    void cache_hash_value() const override
    Calculates a hash value for this object which is cached.
    Definition: rwse.h:160
    -
    static index_t const LIMIT_MAX
    This variable is used to indicate the maximum possible limit that can be used with Semigroup::enumera...
    Definition: semigroups.h:870
    -
    Element(elm_t type=Element::elm_t::NOT_RWSE)
    A constructor.
    Definition: elements.h:63
    -
    std::vector< letter_t > word_t
    Type for a word over the generators of a semigroup.
    Definition: semigroups.h:55
    -
    void really_delete() override
    Deletes the underlying rws_word_t that this object wraps.
    Definition: rwse.h:120
    -
    void swap(Element *x) override
    Swap another Element with this.
    Definition: rwse.cc:54
    -
    Abstract base class for semigroup elements.
    Definition: elements.h:44
    -
    size_t degree() const override
    Returns the degree of an RWSE.
    Definition: rwse.h:143
    -
    bool operator<(const Element &that) const override
    Returns true if this is less than that and false if it is not.
    Definition: rwse.cc:25
    -
    Element * really_copy(size_t increase_deg_by) const override
    Returns a pointer to a copy of this.
    Definition: rwse.cc:38
    -
    rws_word_t const * get_rws_word() const
    Returns a pointer to the rws_word_t used to create this.
    Definition: rwse.h:179
    -
    void redefine(Element const *x, Element const *y) override
    Multiply x and y and stores the result in this.
    Definition: rwse.cc:62
    -
    Namespace for everything in the libsemigroups library.
    Definition: blocks.cc:32
    -
    void copy(Element const *x) override
    Copy x into this.
    Definition: rwse.cc:46
    -
    size_t complexity() const override
    Returns the approximate time complexity of multiplying two RWSE's.
    Definition: rwse.h:133
    -
    RWSE(RWS *rws, rws_word_t *w)
    Constructor from a rewriting system and a word.
    Definition: rwse.h:60
    -
    Element * identity() const override
    Return the identity RWSE.
    Definition: rwse.h:153
    -
    This class is used to represent a string rewriting system defining a finitely presented monoid or sem...
    Definition: rws.h:135
    -
    bool operator==(Element const &that) const override
    Returns true if this equals that.
    Definition: rwse.h:89
    -
    size_t letter_t
    Type for the index of a generator of a semigroup.
    Definition: semigroups.h:52
    -
    Subclass of Element that wraps an libsemigroups::rws_word_t.
    Definition: rwse.h:37
    -
    RWSE(RWS &rws, letter_t const &a)
    Constructor from a rewriting system and a letter.
    Definition: rwse.h:77
    -
    RWSE(RWS &rws, rws_word_t const &w)
    Constructor from a rewriting system and a word.
    Definition: rwse.h:72
    -
    RWSE(RWS &rws, word_t const &w)
    Constructor from a rewriting system and a word.
    Definition: rwse.h:82
    -
    - - - - diff --git a/schreier-sims_8hpp_source.html b/schreier-sims_8hpp_source.html deleted file mode 100644 index e15fe64db..000000000 --- a/schreier-sims_8hpp_source.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: include/schreier-sims.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    schreier-sims.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains an implementation of the Schreier-Sims algorithm, as
    20 // described in Section 4.4.2 of:
    21 //
    22 // D. Holt (with B. Eick and E. O'Brien), Handbook of computational group
    23 // theory, CRC Press, 2004.
    24 //
    25 // and as implemented in the kernel module of the Digraphs package for GAP in
    26 // C:
    27 //
    28 // https://github.com/gap-packages/Digraphs/blob/master/src/schreier-sims.c
    29 //
    30 // by Wilf A. Wilson.
    31 
    32 // TODO
    33 //
    34 // 0. check use of:
    35 // * element_type []
    36 // * const_value_type []
    37 // * reference []
    38 // * const_element_reference []
    39 // * internal_element_type []
    40 // * internal_const_element_type []
    41 // * internal_reference []
    42 // * internal_const_reference []
    43 // 1. iterator to the elements (Finn requires this)
    44 // 2. stabilizer method
    45 // 3. change base
    46 // 4. random version
    47 // 5. try it with Digraphs
    48 
    49 // THIS FILE CAN BE USED AS HEADER ONLY
    50 
    51 #ifndef LIBSEMIGROUPS_INCLUDE_SCHREIER_SIMS_HPP_
    52 #define LIBSEMIGROUPS_INCLUDE_SCHREIER_SIMS_HPP_
    53 
    54 #include <stddef.h> // for size_t
    55 
    56 #include <array> // for array
    57 #include <string> // for operator+, basic_string
    58 #include <unordered_set> // for unordered_set
    59 
    60 #include "adapters.hpp" // for action, degree, inverse
    61 #include "containers.hpp" // for internal::SquareArray, internal::SquareV...
    62 #include "libsemigroups-debug.hpp" // for LIBSEMIGROUPS_ASSERT
    63 #include "libsemigroups-exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
    64 #include "range.hpp" // for IntegralRange
    65 #include "stl.hpp" // for equal_to
    66 #include "traits.hpp" // for BruidhinnTraits
    67 #include "transf.hpp" // for Perm
    68 #include "types.hpp" // for SmallestInteger
    69 
    70 namespace libsemigroups {
    71 
    72  template <typename TElementType>
    73  using SchreierSimsTraits = BruidhinnTraits<TElementType>;
    74 
    75  template <size_t N,
    76  typename TPointType = typename SmallestInteger<N>::type,
    77  typename TElementType = typename PermHelper<N>::type,
    78  typename TDomainType = IntegralRange<TPointType, 0, N>,
    79  typename TElementEqual = internal::equal_to<TElementType>,
    80  typename TIndexType = size_t,
    81  typename TActionType
    82  = ::libsemigroups::action<TElementType, TPointType>>
    83  class SchreierSims : private SchreierSimsTraits<TElementType> {
    84  using traits = SchreierSimsTraits<TElementType>;
    85 
    86  using const_element_reference = typename traits::const_reference;
    87  using internal_element_type = typename traits::internal_value_type;
    88  using internal_const_element_type =
    89  typename traits::internal_const_value_type;
    90 
    91  struct internal_equal_to : private traits {
    92  bool operator()(internal_const_element_type x,
    93  internal_const_element_type y) const {
    94  return TElementEqual()(this->to_external_const(x),
    95  this->to_external_const(y));
    96  }
    97  };
    98 
    99  public:
    100  using point_type = TPointType;
    101  using element_type = typename traits::value_type;
    102  using domain_type = TDomainType;
    103  using index_type = TIndexType;
    104 
    105  // gcc apparently requires the extra qualification on the aliases below
    106  using action_type = TActionType;
    107  using degree_type = ::libsemigroups::degree<element_type>;
    108  using inverse_type = ::libsemigroups::inverse<element_type>;
    109  using one_type = ::libsemigroups::one<element_type>;
    110  using product_type = ::libsemigroups::product<element_type>;
    111  using swap_type = ::libsemigroups::swap<element_type>;
    112 
    113  public:
    114  SchreierSims()
    115  : _base(),
    116  _base_size(0),
    117  _domain(),
    118  _finished(false),
    119  _one(this->to_internal(one_type()(N))),
    120  _orbits(),
    121  _orbits_lookup(),
    122  _strong_gens(),
    123  _tmp_element1(this->internal_copy(_one)),
    124  _tmp_element2(this->internal_copy(_one)),
    125  _transversal(),
    126  _inversal() {
    127  init();
    128  }
    129 
    130  ~SchreierSims() {
    131  clear();
    132  this->internal_free(_one);
    133  this->internal_free(_tmp_element1);
    134  this->internal_free(_tmp_element2);
    135  }
    136 
    137  // TODO delete other constructors
    138 
    139  void add_generator(const_element_reference x) {
    140  if (!has_valid_degree(x)) {
    141  LIBSEMIGROUPS_EXCEPTION("the degree of the generator must be "
    142  << N << ", not " << degree_type()(x));
    143  } else if (!contains(x)) {
    144  _finished = false;
    145  _strong_gens.push_back(0, this->internal_copy(_tmp_element2));
    146  }
    147  }
    148 
    149  const_element_reference generator(index_type const index) {
    150  return strong_generator(0, index);
    151  }
    152 
    153  size_t nr_generators() const noexcept {
    154  return nr_strong_generators(0);
    155  }
    156 
    157  size_t nr_strong_generators(index_type const depth) const noexcept {
    158  return _strong_gens.size(depth);
    159  }
    160 
    161  const_element_reference strong_generator(index_type const depth,
    162  index_type const index) {
    163  if (index >= _strong_gens.size(depth)) {
    164  LIBSEMIGROUPS_EXCEPTION("the argument must be at most "
    165  << _strong_gens.size(depth) << ", not "
    166  << index);
    167  }
    168  return this->to_external_const(_strong_gens.at(depth, index));
    169  }
    170 
    171  bool empty() {
    172  return _strong_gens.size(0) == 0;
    173  }
    174 
    175  size_t size() {
    176  if (empty()) {
    177  return 1;
    178  }
    179  schreier_sims();
    180  size_t out = 1;
    181  for (index_type i = 0; i < _base_size; i++) {
    182  out *= _orbits.size(i);
    183  }
    184  return out;
    185  }
    186 
    187  element_type sift(const_element_reference x) {
    188  if (!has_valid_degree(x)) {
    189  LIBSEMIGROUPS_EXCEPTION("the degree of the generator must be "
    190  << N << ", not " << degree_type()(x));
    191  }
    192  element_type cpy = this->external_copy(x);
    193  swap_type()(cpy, this->to_external(_tmp_element2));
    194  internal_sift(); // changes _tmp_element2 in place
    195  swap_type()(cpy, this->to_external(_tmp_element2));
    196  return cpy;
    197  }
    198 
    199  bool contains(const_element_reference x) {
    200  if (!has_valid_degree(x)) {
    201  return false;
    202  }
    203  schreier_sims();
    204  element_type cpy = this->external_copy(x);
    205  swap_type()(cpy, this->to_external(_tmp_element2));
    206  this->external_free(cpy);
    207  internal_sift(); // changes _tmp_element2 in place
    208  return internal_equal_to()(_tmp_element2, _one);
    209  }
    210 
    211  const_element_reference identity() const {
    212  return this->to_external_const(_one);
    213  }
    214 
    215  void clear() {
    216  for (size_t depth = 0; depth < N; ++depth) {
    217  for (size_t index = 0; index < N; ++index) {
    218  if (_orbits_lookup[depth][index]) {
    219  this->internal_free(_transversal[depth][index]);
    220  this->internal_free(_inversal[depth][index]);
    221  }
    222  }
    223  }
    224  std::unordered_set<internal_element_type> deleted;
    225  for (size_t depth = 0; depth < N; ++depth) {
    226  for (size_t index = 0; index < _strong_gens.size(depth); ++index) {
    227  if (deleted.find(_strong_gens.at(depth, index)) == deleted.end()) {
    228  this->internal_free(_strong_gens.at(depth, index));
    229  deleted.insert(_strong_gens.at(depth, index));
    230  }
    231  }
    232  }
    233  _strong_gens.clear();
    234  _orbits.clear();
    235  init();
    236  }
    237 
    238  bool finished() const {
    239  return _finished;
    240  }
    241 
    242  void add_base_point(point_type const pt) {
    243  if (pt >= N) {
    244  LIBSEMIGROUPS_EXCEPTION("the new base point must be at most "
    245  << N - 1 << ", not " << size_t(pt));
    246  } else if (finished()) {
    247  LIBSEMIGROUPS_EXCEPTION("cannot add further base points");
    248  } else {
    249  for (size_t i = 0; i < _base_size; ++i) {
    250  if (_base[i] == pt) {
    251  LIBSEMIGROUPS_EXCEPTION(size_t(pt) << " is already a base point");
    252  }
    253  }
    254  }
    255  internal_add_base_point(pt);
    256  }
    257 
    258  point_type base(index_type const index) const {
    259  if (index >= _base_size) {
    260  LIBSEMIGROUPS_EXCEPTION("the index must be at most "
    261  << _base_size << ", not " << index);
    262  }
    263  return _base[index];
    264  }
    265 
    266  size_t base_size() const {
    267  return _base_size;
    268  }
    269 
    270  private:
    271  void init() {
    272  _base_size = 0;
    273  _finished = false;
    274  _orbits_lookup.fill(false);
    275  }
    276 
    277  bool has_valid_degree(const_element_reference x) const {
    278  return
    279 #ifdef LIBSEMIGROUPS_HPCOMBI
    280  std::is_same<HPCombi::Perm16, element_type>::value ||
    281 #endif
    282  degree_type()(x) == N;
    283  }
    284 
    285  void internal_add_base_point(point_type const pt) {
    286  LIBSEMIGROUPS_ASSERT(_base_size < N);
    287  _base[_base_size] = pt;
    288  _orbits.push_back(_base_size, pt);
    289  _orbits_lookup[_base_size][pt] = true;
    290  _transversal[_base_size][pt] = this->internal_copy(_one);
    291  _inversal[_base_size][pt] = this->internal_copy(_one);
    292  _base_size++;
    293  }
    294 
    295  void orbit_enumerate(index_type const depth, index_type first = 0) {
    296  LIBSEMIGROUPS_ASSERT(depth < _base_size);
    297  for (index_type i = first; i < _orbits.size(depth); i++) {
    298  for (auto it = _strong_gens.cbegin(depth);
    299  it < _strong_gens.cend(depth);
    300  ++it) {
    301  orbit_add_point(depth, *it, _orbits.at(depth, i));
    302  }
    303  }
    304  }
    305 
    306  void orbit_add_gen(index_type const depth, internal_element_type gen) {
    307  LIBSEMIGROUPS_ASSERT(depth < _base_size);
    308  // Apply the new generator to existing points in orbits[depth].
    309  index_type old_size_orbit = _orbits.size(depth);
    310  for (index_type i = 0; i < old_size_orbit; i++) {
    311  orbit_add_point(depth, gen, _orbits.at(depth, i));
    312  }
    313  orbit_enumerate(depth, old_size_orbit);
    314  }
    315 
    316  void orbit_add_point(index_type const depth,
    317  internal_element_type x,
    318  point_type const pt) {
    319  point_type img = action_type()(this->to_external_const(x), pt);
    320  if (!_orbits_lookup[depth][img]) {
    321  _orbits.push_back(depth, img);
    322  _orbits_lookup[depth][img] = true;
    323  _transversal[depth][img] = this->internal_copy(_one);
    324  product_type()(this->to_external(_transversal[depth][img]),
    325  this->to_external_const(_transversal[depth][pt]),
    326  this->to_external_const(x));
    327  _inversal[depth][img] = this->to_internal(
    328  inverse_type()(this->to_external_const(_transversal[depth][img])));
    329  }
    330  }
    331 
    332  // Changes _tmp_element2 in-place, and returns the depth reached in the
    333  // sifting.
    334  index_type internal_sift() {
    335  for (index_type depth = 0; depth < _base_size; ++depth) {
    336  point_type beta = action_type()(this->to_external_const(_tmp_element2),
    337  _base[depth]);
    338  if (!_orbits_lookup[depth][beta]) {
    339  return depth;
    340  }
    341  product_type()(this->to_external(_tmp_element1),
    342  this->to_external_const(_tmp_element2),
    343  this->to_external_const(_inversal[depth][beta]));
    344  swap_type()(this->to_external(_tmp_element2),
    345  this->to_external(_tmp_element1));
    346  }
    347  return _base_size;
    348  }
    349 
    350  void schreier_sims() {
    351  if (_finished) {
    352  return;
    353  }
    354 
    355  for (index_type j = 0; j < _strong_gens.size(0); j++) {
    356  internal_const_element_type x = _strong_gens.at(0, j);
    357  index_type k = 0;
    358  while (k < _base_size
    359  && action_type()(this->to_external_const(x), _base[k])
    360  == _base[k]) {
    361  ++k;
    362  }
    363  if (k == _base_size) { // all base points fixed
    364  point_type pt = *first_non_fixed_point(x);
    365  internal_add_base_point(pt);
    366  }
    367  }
    368 
    369  index_type first = 0;
    370  for (index_type i = 1; i < _base_size + 1; i++) {
    371  point_type beta = _base[i - 1];
    372  index_type old_first = _strong_gens.size(i);
    373  // set up the strong generators
    374  for (index_type j = first; j < _strong_gens.size(i - 1); j++) {
    375  internal_element_type x = _strong_gens.at(i - 1, j);
    376  if (beta == action_type()(this->to_external_const(x), beta)) {
    377  _strong_gens.push_back(i, x);
    378  }
    379  }
    380  first = old_first;
    381  // find the orbit of <beta> under strong_gens[i - 1]
    382  orbit_enumerate(i - 1);
    383  }
    384  for (int i = _base_size - 1; i >= 0; --i) {
    385  start:
    386  for (auto it = _orbits.cbegin(i); it < _orbits.cend(i); ++it) {
    387  point_type beta = *it;
    388  for (index_type m = 0; m < _strong_gens.size(i); m++) {
    389  product_type()(this->to_external(_tmp_element1),
    390  this->to_external_const(_transversal[i][beta]),
    391  this->to_external_const(_strong_gens.at(i, m)));
    392  point_type delta = action_type()(
    393  this->to_external_const(_strong_gens.at(i, m)), beta);
    394  LIBSEMIGROUPS_ASSERT(
    395  delta
    396  == action_type()(this->to_external_const(_tmp_element1),
    397  _base[i]));
    398  if (!internal_equal_to()(_tmp_element1, _transversal[i][delta])) {
    399  product_type()(this->to_external(_tmp_element2),
    400  this->to_external_const(_tmp_element1),
    401  this->to_external_const(_inversal[i][delta]));
    402  LIBSEMIGROUPS_ASSERT(_base[i]
    403  == action_type()(_tmp_element2, _base[i]));
    404  // internal_sift changes _tmp_element2 in-place
    405  index_type depth = internal_sift();
    406  bool propagate = false;
    407  if (depth < _base_size) {
    408  propagate = true;
    409  } else if (!internal_equal_to()(_tmp_element2, _one)) {
    410  propagate = true;
    411  internal_add_base_point(*first_non_fixed_point(_tmp_element2));
    412  }
    413  if (propagate) {
    414  LIBSEMIGROUPS_ASSERT(i + 1 <= static_cast<int>(depth));
    415  _strong_gens.push_back(i + 1,
    416  this->internal_copy(_tmp_element2));
    417  orbit_add_gen(i + 1, _tmp_element2);
    418  for (index_type l = i + 2; l <= depth; l++) {
    419  _strong_gens.push_back(l, _strong_gens.back(i + 1));
    420  orbit_add_gen(l, _tmp_element2);
    421  // add generator to orbit of base[l]
    422  }
    423  i = depth;
    424  goto start;
    425  }
    426  }
    427  }
    428  }
    429  }
    430  _finished = true;
    431  }
    432 
    433  typename domain_type::const_iterator
    434  first_non_fixed_point(internal_const_element_type x) {
    435  for (auto it = _domain.cbegin(); it < _domain.cend(); ++it) {
    436  if (*it != action_type()(this->to_external_const(x), *it)) {
    437  return it;
    438  }
    439  }
    440  // It is currently not possible to add the identity as a generator since
    441  // add_generator checks containment and every group contains its identity
    442  // element.
    443  LIBSEMIGROUPS_ASSERT(false);
    444  return _domain.cend();
    445  }
    446 
    447  std::array<point_type, N> _base;
    448  index_type _base_size;
    449  domain_type _domain;
    450  bool _finished;
    451  internal_element_type _one;
    452  internal::SquareVector<point_type, N> _orbits;
    453  internal::SquareArray<bool, N> _orbits_lookup;
    454  internal::SquareVector<internal_element_type, N> _strong_gens;
    455  internal_element_type _tmp_element1;
    456  internal_element_type _tmp_element2;
    457  internal::SquareArray<internal_element_type, N> _transversal;
    458  internal::SquareArray<internal_element_type, N> _inversal;
    459  };
    460 } // namespace libsemigroups
    461 
    462 #endif // LIBSEMIGROUPS_INCLUDE_SCHREIER_SIMS_HPP_
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    typename std::conditional< N >=0x100000000, uint64_t, typename std::conditional< N >=0x10000, uint32_t, typename std::conditional< N >=0x100, uint16_t, uint8_t >::type >::type >::type type
    The smallest (in terms of memory required) unsigned integer type which can represent N...
    Definition: types.hpp:47
    -
    This file contains function templates for adapting a user-defined type so that it can be used with li...
    -
    - - - - diff --git a/search/all_0.html b/search/all_0.html deleted file mode 100644 index 5330204c2..000000000 --- a/search/all_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_0.js b/search/all_0.js deleted file mode 100644 index 63c69237b..000000000 --- a/search/all_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['_5fvector',['_vector',['../classlibsemigroups_1_1_element_with_vector_data.html#ac17ecf3cecb90414228d273023c288f6',1,'libsemigroups::ElementWithVectorData']]] -]; diff --git a/search/all_1.html b/search/all_1.html deleted file mode 100644 index 2f4679366..000000000 --- a/search/all_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_1.js b/search/all_1.js deleted file mode 100644 index 4a8fe8d48..000000000 --- a/search/all_1.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['add_5fgenerators',['add_generators',['../classlibsemigroups_1_1_semigroup.html#a765db7123dcf60aa9917e85fe07dc757',1,'libsemigroups::Semigroup::add_generators(std::vector< Element const * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#a14d438caf33d04ada8c919575b3cf48a',1,'libsemigroups::Semigroup::add_generators(std::vector< Element * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#a18e781f1193317dd2c64b4994d60c858',1,'libsemigroups::Semigroup::add_generators(std::vector< Element const * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#aece350e933354b75f791bc0059778504',1,'libsemigroups::Semigroup::add_generators(std::vector< Element * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#ab14a8cd74a753f9bb108589727be7201',1,'libsemigroups::Semigroup::add_generators(std::initializer_list< Element * > coll)']]], - ['add_5frule',['add_rule',['../classlibsemigroups_1_1_r_w_s.html#a0877f2e282f11bc93771f82fdd70c05f',1,'libsemigroups::RWS']]], - ['add_5frules',['add_rules',['../classlibsemigroups_1_1_r_w_s.html#aae07bff2d77150fff875ffe5ec961c9f',1,'libsemigroups::RWS::add_rules(std::vector< relation_t > const &relations)'],['../classlibsemigroups_1_1_r_w_s.html#a10ad74a8d70090b8948f72136cc96a92',1,'libsemigroups::RWS::add_rules(Congruence &cong)']]], - ['at',['at',['../classlibsemigroups_1_1_element_with_vector_data.html#a80a9e5eef46ea56e2aa55b0062cda885',1,'libsemigroups::ElementWithVectorData::at()'],['../classlibsemigroups_1_1_partition.html#a53332fde2d42ed7a7796a78e9a398c56',1,'libsemigroups::Partition::at(size_t part_index) const'],['../classlibsemigroups_1_1_partition.html#ab1190cb48dc3de558d37839581543829',1,'libsemigroups::Partition::at(size_t part_index, size_t elm_nr) const'],['../classlibsemigroups_1_1_semigroup.html#a3df24ff90ff901c29fffbd5a17b9f4f7',1,'libsemigroups::Semigroup::at()']]] -]; diff --git a/search/all_10.html b/search/all_10.html deleted file mode 100644 index 170dc09c6..000000000 --- a/search/all_10.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_10.js b/search/all_10.js deleted file mode 100644 index 454a223a2..000000000 --- a/search/all_10.js +++ /dev/null @@ -1,23 +0,0 @@ -var searchData= -[ - ['rank',['rank',['../classlibsemigroups_1_1_blocks.html#a99fd0229618dd1412dd987153215d8a0',1,'libsemigroups::Blocks::rank()'],['../classlibsemigroups_1_1_bipartition.html#a29288169ff60a6ed33eee184b034571a',1,'libsemigroups::Bipartition::rank()']]], - ['really_5fcopy',['really_copy',['../classlibsemigroups_1_1_element.html#a0a1f3eccf338d58746123e8a0e5e5998',1,'libsemigroups::Element::really_copy()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a72f340f4b58c7f82c8fff7636af34657',1,'libsemigroups::ElementWithVectorData::really_copy()'],['../classlibsemigroups_1_1_transformation.html#a35bf7a0011ea723c4f242205f23786ee',1,'libsemigroups::Transformation::really_copy()'],['../classlibsemigroups_1_1_partial_perm.html#a42cfb120351a7d84fdb7eb197b6c28b3',1,'libsemigroups::PartialPerm::really_copy()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a432f2a97ddaa83b84501121407a455aa',1,'libsemigroups::MatrixOverSemiringBase::really_copy()'],['../classlibsemigroups_1_1_r_w_s_e.html#a59a9e717837f63d9faed1e7ec59ef3c7',1,'libsemigroups::RWSE::really_copy()']]], - ['really_5fdelete',['really_delete',['../classlibsemigroups_1_1_element.html#a0744b0fbe4cc4bd34b03a006731c0ab2',1,'libsemigroups::Element::really_delete()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a426b7c1e1c18388fbffe0daf2a62a3e4',1,'libsemigroups::ElementWithVectorData::really_delete()'],['../classlibsemigroups_1_1_r_w_s_e.html#a60d5764a57e1e65deaf908b4675f93b6',1,'libsemigroups::RWSE::really_delete()']]], - ['redefine',['redefine',['../classlibsemigroups_1_1_element.html#a411bfadc8f2e9def9b916fe742c11d37',1,'libsemigroups::Element::redefine(Element const *x, Element const *y)'],['../classlibsemigroups_1_1_element.html#a9705463d4f873f2b4e30d0d05a043065',1,'libsemigroups::Element::redefine(Element const *x, Element const *y, size_t const &thread_id)'],['../classlibsemigroups_1_1_transformation.html#af890d498146769967dd12eac375a51a1',1,'libsemigroups::Transformation::redefine()'],['../classlibsemigroups_1_1_partial_perm.html#a4c67e5cab8dd171eb725721709da00ff',1,'libsemigroups::PartialPerm::redefine()'],['../classlibsemigroups_1_1_bipartition.html#af697b258c43ce04b655c5a5d5948747b',1,'libsemigroups::Bipartition::redefine()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a8dc8c2ef60248c995507a2126fc641a3',1,'libsemigroups::MatrixOverSemiringBase::redefine()'],['../classlibsemigroups_1_1_boolean_mat.html#a9a1618cd6421acd618365ef9c06bbcb3',1,'libsemigroups::BooleanMat::redefine()'],['../classlibsemigroups_1_1_p_b_r.html#a3cfa8a851a14f59d76e5eaf540238101',1,'libsemigroups::PBR::redefine()'],['../classlibsemigroups_1_1_r_w_s_e.html#a71ab5e7cbbd269ef787086048c311d4a',1,'libsemigroups::RWSE::redefine()']]], - ['reductionordering',['ReductionOrdering',['../classlibsemigroups_1_1_reduction_ordering.html',1,'libsemigroups::ReductionOrdering'],['../classlibsemigroups_1_1_reduction_ordering.html#a01036d0521737a5d3f8f9e6ea9be4d8b',1,'libsemigroups::ReductionOrdering::ReductionOrdering()']]], - ['relation_5ft',['relation_t',['../namespacelibsemigroups.html#abd1267c44db1f411a1f6004cd3d15908',1,'libsemigroups']]], - ['relations',['relations',['../classlibsemigroups_1_1_congruence.html#aa16ba212d40ee46241ddaf61e1ccb9f6',1,'libsemigroups::Congruence']]], - ['reserve',['reserve',['../classlibsemigroups_1_1_semigroup.html#a0bc125204bf434124c1ca0200aec25cf',1,'libsemigroups::Semigroup']]], - ['reset_5fhash_5fvalue',['reset_hash_value',['../classlibsemigroups_1_1_element.html#a19e53333fad80c753b2a0918595b8f9e',1,'libsemigroups::Element']]], - ['reset_5fnext_5frelation',['reset_next_relation',['../classlibsemigroups_1_1_semigroup.html#ae3debdbc4c4feb1330fcea98f8ed5951',1,'libsemigroups::Semigroup']]], - ['rewrite',['rewrite',['../classlibsemigroups_1_1_r_w_s.html#a37c421016dd03c1a0a9b004b1ccc274c',1,'libsemigroups::RWS::rewrite(std::string *w) const'],['../classlibsemigroups_1_1_r_w_s.html#ade1d0559f7ab73323075868ac0c3f6d9',1,'libsemigroups::RWS::rewrite(std::string w) const']]], - ['right',['right',['../classlibsemigroups_1_1_semigroup.html#a0a8d05a3c0b9e7f27a2fe212216e60e7',1,'libsemigroups::Semigroup']]], - ['right_5fblocks',['right_blocks',['../classlibsemigroups_1_1_bipartition.html#a7610c0525f618306f733203d7bf3e899',1,'libsemigroups::Bipartition']]], - ['right_5fcayley_5fgraph_5fcopy',['right_cayley_graph_copy',['../classlibsemigroups_1_1_semigroup.html#ab72b9ac6e036a24f8d7c2dd617878cd2',1,'libsemigroups::Semigroup']]], - ['rule',['rule',['../classlibsemigroups_1_1_r_w_s.html#a3277fbd45d6913969e4378a4e8167deb',1,'libsemigroups::RWS']]], - ['rules',['rules',['../classlibsemigroups_1_1_r_w_s.html#a976158da9f3dd6d6023f5bbc849bc702',1,'libsemigroups::RWS']]], - ['rws',['RWS',['../classlibsemigroups_1_1_r_w_s.html',1,'libsemigroups::RWS'],['../classlibsemigroups_1_1_r_w_s.html#aa578bbd69ebbf35a8d7d5d289761ca24',1,'libsemigroups::RWS::RWS(ReductionOrdering *order, std::string alphabet=STANDARD_ALPHABET)'],['../classlibsemigroups_1_1_r_w_s.html#a5db49ed901143b65fb634d1a3f211b08',1,'libsemigroups::RWS::RWS()'],['../classlibsemigroups_1_1_r_w_s.html#a61eb014fd6110806ec8b5345e1a35661',1,'libsemigroups::RWS::RWS(std::string alphabet)'],['../classlibsemigroups_1_1_r_w_s.html#a1a01e5c70f95fad332f8db267b1e59b9',1,'libsemigroups::RWS::RWS(std::vector< relation_t > const &relations)'],['../classlibsemigroups_1_1_r_w_s.html#a279cdc4ed164ce8ad5807767f8f7e0c4',1,'libsemigroups::RWS::RWS(ReductionOrdering *order, std::vector< relation_t > const &relations)'],['../classlibsemigroups_1_1_r_w_s.html#aab0e01967cbd730d3121e4a891abca6f',1,'libsemigroups::RWS::RWS(Congruence &cong)']]], - ['rws_5fletter_5ft',['rws_letter_t',['../classlibsemigroups_1_1_r_w_s.html#a0d2c83900afe73c678890061871e6ebf',1,'libsemigroups::RWS']]], - ['rws_5fword_5fto_5fword',['rws_word_to_word',['../classlibsemigroups_1_1_r_w_s.html#a76b13cfa822508d87a7daf5211bb25e9',1,'libsemigroups::RWS']]], - ['rwse',['RWSE',['../classlibsemigroups_1_1_r_w_s_e.html',1,'libsemigroups::RWSE'],['../classlibsemigroups_1_1_element.html#a3e78b103837362d309f8459b1c7d7ff4a5270d822f933ea153d27851f29a4e5f3',1,'libsemigroups::Element::RWSE()'],['../classlibsemigroups_1_1_r_w_s_e.html#a2ea9e2a1d01ac3cb7f3636a367c73f0d',1,'libsemigroups::RWSE::RWSE(RWS *rws, rws_word_t *w)'],['../classlibsemigroups_1_1_r_w_s_e.html#aa7037daa47396e868f649832e117057a',1,'libsemigroups::RWSE::RWSE(RWS &rws, rws_word_t const &w)'],['../classlibsemigroups_1_1_r_w_s_e.html#abebc299bd774a6440f66c19876ff8d17',1,'libsemigroups::RWSE::RWSE(RWS &rws, letter_t const &a)'],['../classlibsemigroups_1_1_r_w_s_e.html#ad5dcb3b9cd2de039adf80ef4cc44ed14',1,'libsemigroups::RWSE::RWSE(RWS &rws, word_t const &w)']]] -]; diff --git a/search/all_11.html b/search/all_11.html deleted file mode 100644 index 10fcd0919..000000000 --- a/search/all_11.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_11.js b/search/all_11.js deleted file mode 100644 index e704859e8..000000000 --- a/search/all_11.js +++ /dev/null @@ -1,29 +0,0 @@ -var searchData= -[ - ['semigroup',['Semigroup',['../classlibsemigroups_1_1_semigroup.html',1,'libsemigroups::Semigroup'],['../classlibsemigroups_1_1_semigroup.html#ac6ae95243c984db49928c8d83b5ff94b',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element const * > const *gens)'],['../classlibsemigroups_1_1_semigroup.html#a1150d03f354e8543b9ac52c30ff052e9',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element * > const *gens)'],['../classlibsemigroups_1_1_semigroup.html#a7ed7c58707f54eb142ec899b009fdb19',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element * > *gens)'],['../classlibsemigroups_1_1_semigroup.html#aae303af31f1a254f255de05089c9d2c3',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element const * > *gens)'],['../classlibsemigroups_1_1_semigroup.html#aeea85da8d897b8127e20fe23660f58d8',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element const * > const &gens)'],['../classlibsemigroups_1_1_semigroup.html#aeb5ceff683aa9e28ef2353244592bf7a',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element * > const &gens)'],['../classlibsemigroups_1_1_semigroup.html#a73f1c89eee443de8b27216b34acfac6a',1,'libsemigroups::Semigroup::Semigroup(std::initializer_list< Element * > gens)'],['../classlibsemigroups_1_1_semigroup.html#aa0c7dfcba762a3ac9f0f0a58c268f741',1,'libsemigroups::Semigroup::Semigroup(const Semigroup &copy)']]], - ['semiring',['Semiring',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups::Semiring< T >'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a6082a07347b399a1d724adc76bfea0c9',1,'libsemigroups::MatrixOverSemiringBase::semiring()']]], - ['semiring_3c_20bool_20_3e',['Semiring< bool >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20int64_5ft_20_3e',['Semiring< int64_t >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20tvaluetype_20_3e',['Semiring< TValueType >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiringwiththreshold',['SemiringWithThreshold',['../classlibsemigroups_1_1_semiring_with_threshold.html',1,'libsemigroups::SemiringWithThreshold'],['../classlibsemigroups_1_1_semiring_with_threshold.html#a2c0ca33197b05f41e1643f129dbb995e',1,'libsemigroups::SemiringWithThreshold::SemiringWithThreshold()']]], - ['set_5fbatch_5fsize',['set_batch_size',['../classlibsemigroups_1_1_semigroup.html#a4436d9a50e5b92299765e0ea1865988d',1,'libsemigroups::Semigroup']]], - ['set_5fcheck_5fconfluence_5finterval',['set_check_confluence_interval',['../classlibsemigroups_1_1_r_w_s.html#ac7e0b5218203ed49c93058839b7dc41c',1,'libsemigroups::RWS']]], - ['set_5fmax_5foverlap',['set_max_overlap',['../classlibsemigroups_1_1_r_w_s.html#a485f896a757987f0e44b2ac99c815257',1,'libsemigroups::RWS']]], - ['set_5fmax_5frules',['set_max_rules',['../classlibsemigroups_1_1_r_w_s.html#a1b387ffa5b98bf7b3a7974e1f50476f5',1,'libsemigroups::RWS']]], - ['set_5fmax_5fthreads',['set_max_threads',['../classlibsemigroups_1_1_congruence.html#a8f7d84e7f2d52e83c5f56a0e746d9bc0',1,'libsemigroups::Congruence::set_max_threads()'],['../classlibsemigroups_1_1_semigroup.html#a535166da67baa70332e2da8f79488384',1,'libsemigroups::Semigroup::set_max_threads()']]], - ['set_5fnr_5fblocks',['set_nr_blocks',['../classlibsemigroups_1_1_bipartition.html#a0042f4033870832032ee9cd60c5de3d1',1,'libsemigroups::Bipartition']]], - ['set_5fnr_5fleft_5fblocks',['set_nr_left_blocks',['../classlibsemigroups_1_1_bipartition.html#a6d80dce0bf37499e19daac4020be9f0f',1,'libsemigroups::Bipartition']]], - ['set_5foverlap_5fmeasure',['set_overlap_measure',['../classlibsemigroups_1_1_r_w_s.html#a475db19f936de6b641c74c1186023086',1,'libsemigroups::RWS']]], - ['set_5fpack',['set_pack',['../classlibsemigroups_1_1_congruence.html#ad6d41e0ffe49c3a0e2366727d82bf085',1,'libsemigroups::Congruence']]], - ['set_5fprefill',['set_prefill',['../classlibsemigroups_1_1_congruence.html#adc3cad4c6bb2d0bdf515dea9a6ee7adb',1,'libsemigroups::Congruence']]], - ['set_5frank',['set_rank',['../classlibsemigroups_1_1_bipartition.html#aa2dd0d68f21a22cd52a896b3b45346d1',1,'libsemigroups::Bipartition']]], - ['set_5frelations',['set_relations',['../classlibsemigroups_1_1_congruence.html#aab749eb6982c0dfabccef39ac4bcc327',1,'libsemigroups::Congruence']]], - ['set_5freport',['set_report',['../classlibsemigroups_1_1_congruence.html#a7a48553f5cf964b76c2207439d50aa19',1,'libsemigroups::Congruence::set_report()'],['../classlibsemigroups_1_1_r_w_s.html#a43e27533705042bcfc67aefbeb088268',1,'libsemigroups::RWS::set_report()'],['../classlibsemigroups_1_1_semigroup.html#ad472ffd3e49a106d9e9c113a28b0e1aa',1,'libsemigroups::Semigroup::set_report()']]], - ['set_5freport_5finterval',['set_report_interval',['../classlibsemigroups_1_1_congruence.html#a8c4792c8213ab2852174faef501b3f2e',1,'libsemigroups::Congruence::set_report_interval()'],['../classlibsemigroups_1_1_r_w_s.html#a7480e806efb5fe1d6978cc32672844c7',1,'libsemigroups::RWS::set_report_interval()']]], - ['shortlex',['SHORTLEX',['../classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html',1,'libsemigroups::SHORTLEX'],['../classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html#a987d73f3331d8650f8a5ea336e5cd41c',1,'libsemigroups::SHORTLEX::SHORTLEX()']]], - ['size',['size',['../classlibsemigroups_1_1_partition.html#af2214825e28be2db4a51ff5a22a20496',1,'libsemigroups::Partition::size()'],['../classlibsemigroups_1_1_semigroup.html#ac383285cd9334393a068a66c7076c1d3',1,'libsemigroups::Semigroup::size()']]], - ['sorted_5fat',['sorted_at',['../classlibsemigroups_1_1_semigroup.html#a68a21f68502fe4c6316a0080fde49355',1,'libsemigroups::Semigroup']]], - ['sorted_5fposition',['sorted_position',['../classlibsemigroups_1_1_semigroup.html#ac391f37fffd58ffe4634ca8f182773fc',1,'libsemigroups::Semigroup']]], - ['suffix',['suffix',['../classlibsemigroups_1_1_semigroup.html#aa4eda32c7c229dd5ef1b98da1256b244',1,'libsemigroups::Semigroup']]], - ['swap',['swap',['../classlibsemigroups_1_1_element.html#a5eed806d86c86750e26ff865e7b0694c',1,'libsemigroups::Element::swap()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a35953b86b9c5d0ce070cad5ffbb735fe',1,'libsemigroups::ElementWithVectorData::swap()'],['../classlibsemigroups_1_1_r_w_s_e.html#abf0f56397774d8e04e661720a75ff79a',1,'libsemigroups::RWSE::swap()']]] -]; diff --git a/search/all_12.html b/search/all_12.html deleted file mode 100644 index 0876adf45..000000000 --- a/search/all_12.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_12.js b/search/all_12.js deleted file mode 100644 index 314560a34..000000000 --- a/search/all_12.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['test_5fequals',['test_equals',['../classlibsemigroups_1_1_congruence.html#a88e372cdf08a5fa64cf374c4f110c1ab',1,'libsemigroups::Congruence::test_equals()'],['../classlibsemigroups_1_1_r_w_s.html#ab1d2165ba89632cafd26516afc9b92e6',1,'libsemigroups::RWS::test_equals(word_t const &p, word_t const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ade2da2f20b02cea89071d23b63807336',1,'libsemigroups::RWS::test_equals(std::initializer_list< size_t > const &p, std::initializer_list< size_t > const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ae5af36b69c545bb50841e3ba298920ed',1,'libsemigroups::RWS::test_equals(std::string const &p, std::string const &q)'],['../classlibsemigroups_1_1_r_w_s.html#a305b6b531c0a18022e59d5820197e408',1,'libsemigroups::RWS::test_equals(std::string *p, std::string *q)']]], - ['test_5fless_5fthan',['test_less_than',['../classlibsemigroups_1_1_congruence.html#a0089f927db394dc009cb02c33d16957b',1,'libsemigroups::Congruence::test_less_than()'],['../classlibsemigroups_1_1_r_w_s.html#ab9c348979a879fdb0097b8fd065ccedd',1,'libsemigroups::RWS::test_less_than(word_t const &p, word_t const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ac4970eaeaec6d62257609353c12d0779',1,'libsemigroups::RWS::test_less_than(std::string const &p, std::string const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ae3e7842adaf99ffc06f4bd20e3d08379',1,'libsemigroups::RWS::test_less_than(std::string *p, std::string *q)']]], - ['test_5fmembership',['test_membership',['../classlibsemigroups_1_1_semigroup.html#a94af9fb394e6a041e87440b221c2cbde',1,'libsemigroups::Semigroup']]], - ['threshold',['threshold',['../classlibsemigroups_1_1_semiring_with_threshold.html#a68424e8b30815f5676f6a13df460c050',1,'libsemigroups::SemiringWithThreshold']]], - ['transformation',['Transformation',['../classlibsemigroups_1_1_transformation.html',1,'libsemigroups']]], - ['tropicalmaxplussemiring',['TropicalMaxPlusSemiring',['../classlibsemigroups_1_1_tropical_max_plus_semiring.html',1,'libsemigroups::TropicalMaxPlusSemiring'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#ac291bba977a8ee73e154c7f8ebd4cbe6',1,'libsemigroups::TropicalMaxPlusSemiring::TropicalMaxPlusSemiring()']]], - ['tropicalminplussemiring',['TropicalMinPlusSemiring',['../classlibsemigroups_1_1_tropical_min_plus_semiring.html',1,'libsemigroups::TropicalMinPlusSemiring'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#a91ca50d203ad3eea8cba941af246e2b5',1,'libsemigroups::TropicalMinPlusSemiring::TropicalMinPlusSemiring()']]] -]; diff --git a/search/all_13.html b/search/all_13.html deleted file mode 100644 index dc6c0496a..000000000 --- a/search/all_13.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_13.js b/search/all_13.js deleted file mode 100644 index 0a9251956..000000000 --- a/search/all_13.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['uint_5fto_5frws_5fword',['uint_to_rws_word',['../classlibsemigroups_1_1_r_w_s.html#a4dbcc24a5e687062046b0a85d0b9959d',1,'libsemigroups::RWS']]], - ['unbounded',['UNBOUNDED',['../classlibsemigroups_1_1_r_w_s.html#a5e8f76453acc060c323b80e992b3c044',1,'libsemigroups::RWS']]], - ['undefined',['UNDEFINED',['../classlibsemigroups_1_1_element.html#a5211f2c852d18b9aa83fe729851d0fe6',1,'libsemigroups::Element::UNDEFINED()'],['../classlibsemigroups_1_1_partial_transformation.html#a4344e004095a45dfcc0cfee765dd45a5',1,'libsemigroups::PartialTransformation::UNDEFINED()'],['../classlibsemigroups_1_1_semigroup.html#a035455576d317de31029cbcb99f6fda2',1,'libsemigroups::Semigroup::UNDEFINED()'],['../classlibsemigroups_1_1_semiring.html#a2a48ccff628c8cbd90e1542f48b0110a',1,'libsemigroups::Semiring::UNDEFINED()']]] -]; diff --git a/search/all_14.html b/search/all_14.html deleted file mode 100644 index 7fe46634d..000000000 --- a/search/all_14.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_14.js b/search/all_14.js deleted file mode 100644 index 59fb3eacf..000000000 --- a/search/all_14.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['vector_5fhash',['vector_hash',['../classlibsemigroups_1_1_element_with_vector_data.html#a8129a6b55198ff7210991dc4e3c6f6a9',1,'libsemigroups::ElementWithVectorData']]] -]; diff --git a/search/all_15.html b/search/all_15.html deleted file mode 100644 index c0fc0aab7..000000000 --- a/search/all_15.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_15.js b/search/all_15.js deleted file mode 100644 index a938a756e..000000000 --- a/search/all_15.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['word_5ft',['word_t',['../namespacelibsemigroups.html#a70af4e1758957fcdbd183fffda4e78c6',1,'libsemigroups']]], - ['word_5fto_5fclass_5findex',['word_to_class_index',['../classlibsemigroups_1_1_congruence.html#a7b99b8f0ae4b36071a4541a89d66b1e3',1,'libsemigroups::Congruence']]], - ['word_5fto_5felement',['word_to_element',['../classlibsemigroups_1_1_semigroup.html#a60b8731b07a29256f4e56f88258a56e9',1,'libsemigroups::Semigroup']]], - ['word_5fto_5fpos',['word_to_pos',['../classlibsemigroups_1_1_semigroup.html#a68b9b1f8b4c11f3a317d6d47f4056ec0',1,'libsemigroups::Semigroup']]], - ['word_5fto_5frws_5fword',['word_to_rws_word',['../classlibsemigroups_1_1_r_w_s.html#a0c5378745d978de1e71e4ffe760f0682',1,'libsemigroups::RWS::word_to_rws_word(word_t const &w, rws_word_t *ww)'],['../classlibsemigroups_1_1_r_w_s.html#a090c712f8edd846b469ae8ea59ff52f5',1,'libsemigroups::RWS::word_to_rws_word(word_t const &w)']]] -]; diff --git a/search/all_16.html b/search/all_16.html deleted file mode 100644 index 1490057c3..000000000 --- a/search/all_16.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_16.js b/search/all_16.js deleted file mode 100644 index d1459557f..000000000 --- a/search/all_16.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['zero',['zero',['../classlibsemigroups_1_1_semiring.html#a1a709cba3bf33c6dbcfe3a860080609f',1,'libsemigroups::Semiring::zero()'],['../classlibsemigroups_1_1_boolean_semiring.html#af11caf26a884e0dfb84df6022d4c4511',1,'libsemigroups::BooleanSemiring::zero()'],['../classlibsemigroups_1_1_integers.html#a69a4dec6764fb54566ca96538064cbc3',1,'libsemigroups::Integers::zero()'],['../classlibsemigroups_1_1_max_plus_semiring.html#aee4adfcb6028376a5254bc737d7f1d79',1,'libsemigroups::MaxPlusSemiring::zero()'],['../classlibsemigroups_1_1_min_plus_semiring.html#a5e93cbbc7549e4a23b367491db6b06c4',1,'libsemigroups::MinPlusSemiring::zero()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#a53b804252b2f806b8c3cf80eeedb5d50',1,'libsemigroups::TropicalMaxPlusSemiring::zero()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#a0aee99e3c460496b8935a398e634c849',1,'libsemigroups::TropicalMinPlusSemiring::zero()'],['../classlibsemigroups_1_1_natural_semiring.html#a207af462afe8dff0e97f1b6e04bf7d9b',1,'libsemigroups::NaturalSemiring::zero()']]] -]; diff --git a/search/all_17.html b/search/all_17.html deleted file mode 100644 index a364f6fa7..000000000 --- a/search/all_17.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_17.js b/search/all_17.js deleted file mode 100644 index 541a68a9b..000000000 --- a/search/all_17.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['_7eblocks',['~Blocks',['../classlibsemigroups_1_1_blocks.html#a68f0ebf7dad1cc30f678f3f48d162534',1,'libsemigroups::Blocks']]], - ['_7econgruence',['~Congruence',['../classlibsemigroups_1_1_congruence.html#ae621bcc207c8ca59009774b4bb632252',1,'libsemigroups::Congruence']]], - ['_7eelement',['~Element',['../classlibsemigroups_1_1_element.html#ac58bb53f6bc9f2ff727561149806a4e1',1,'libsemigroups::Element']]], - ['_7epartition',['~Partition',['../classlibsemigroups_1_1_partition.html#a98344179957c245b7170ef197d079688',1,'libsemigroups::Partition']]], - ['_7erws',['~RWS',['../classlibsemigroups_1_1_r_w_s.html#acf41ccf045d547b3f3ba196818dffdf8',1,'libsemigroups::RWS']]], - ['_7esemigroup',['~Semigroup',['../classlibsemigroups_1_1_semigroup.html#a1ad56c6cad6baba69ae4c3e1c133b428',1,'libsemigroups::Semigroup']]], - ['_7esemiring',['~Semiring',['../classlibsemigroups_1_1_semiring.html#a4817406c9d2cd96309bd94150a94642e',1,'libsemigroups::Semiring']]] -]; diff --git a/search/all_2.html b/search/all_2.html deleted file mode 100644 index 4c33d8557..000000000 --- a/search/all_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_2.js b/search/all_2.js deleted file mode 100644 index a3b9568fe..000000000 --- a/search/all_2.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['batch_5fsize',['batch_size',['../classlibsemigroups_1_1_semigroup.html#a7a52a6e228af7de9d4fa627c739df0a0',1,'libsemigroups::Semigroup']]], - ['begin',['begin',['../classlibsemigroups_1_1_element_with_vector_data.html#a9797b6b46cfd665f190729ae5760e34f',1,'libsemigroups::ElementWithVectorData::begin()'],['../classlibsemigroups_1_1_semigroup.html#a70ff1a698f5b0c8c4b4a6a0d60f56010',1,'libsemigroups::Semigroup::begin()']]], - ['bipartition',['Bipartition',['../classlibsemigroups_1_1_bipartition.html',1,'libsemigroups::Bipartition'],['../classlibsemigroups_1_1_bipartition.html#a7ccaedb0aff05eb155b55fb72a812620',1,'libsemigroups::Bipartition::Bipartition(size_t degree)'],['../classlibsemigroups_1_1_bipartition.html#a1d0738977566937801b1655061d2604f',1,'libsemigroups::Bipartition::Bipartition(std::vector< u_int32_t > *blocks)'],['../classlibsemigroups_1_1_bipartition.html#ae8f10cb7f48832247dc1d7ee1eb0e04e',1,'libsemigroups::Bipartition::Bipartition(std::vector< u_int32_t > const &blocks)']]], - ['block',['block',['../classlibsemigroups_1_1_blocks.html#a5bb2331ee7080268a052c141a15f1fce',1,'libsemigroups::Blocks']]], - ['blocks',['Blocks',['../classlibsemigroups_1_1_blocks.html',1,'libsemigroups::Blocks'],['../classlibsemigroups_1_1_blocks.html#a4609020dec37cffeaf8a6902b1655696',1,'libsemigroups::Blocks::Blocks()'],['../classlibsemigroups_1_1_blocks.html#ac15df053ba18072f4d4bf51560a23151',1,'libsemigroups::Blocks::Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup)'],['../classlibsemigroups_1_1_blocks.html#aa9024cb5627f210a5ea71df9de9725c7',1,'libsemigroups::Blocks::Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup, u_int32_t nr_blocks)'],['../classlibsemigroups_1_1_blocks.html#a87257f0555b336dc94e0f9ebeac41f67',1,'libsemigroups::Blocks::Blocks(Blocks const &copy)']]], - ['booleanmat',['BooleanMat',['../classlibsemigroups_1_1_boolean_mat.html',1,'libsemigroups::BooleanMat'],['../classlibsemigroups_1_1_boolean_mat.html#ab468b498405b8fafc7da499e6856c81a',1,'libsemigroups::BooleanMat::BooleanMat(std::vector< bool > *matrix)'],['../classlibsemigroups_1_1_boolean_mat.html#a4ab903d29ed5530d4b821cc9edcb831c',1,'libsemigroups::BooleanMat::BooleanMat(std::vector< std::vector< bool >> const &matrix)']]], - ['booleansemiring',['BooleanSemiring',['../classlibsemigroups_1_1_boolean_semiring.html',1,'libsemigroups']]] -]; diff --git a/search/all_3.html b/search/all_3.html deleted file mode 100644 index b634070bc..000000000 --- a/search/all_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_3.js b/search/all_3.js deleted file mode 100644 index e3a5a5629..000000000 --- a/search/all_3.js +++ /dev/null @@ -1,29 +0,0 @@ -var searchData= -[ - ['cache_5fhash_5fvalue',['cache_hash_value',['../classlibsemigroups_1_1_element.html#a4728a734638c82ab334607d4d0e252d9',1,'libsemigroups::Element::cache_hash_value()'],['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html#ade88206390c512f5df7d5095a15c2688',1,'libsemigroups::ElementWithVectorDataDefaultHash::cache_hash_value()'],['../classlibsemigroups_1_1_transformation.html#af6572f137e2f732bb17babf7bb1bd8e0',1,'libsemigroups::Transformation::cache_hash_value()'],['../classlibsemigroups_1_1_p_b_r.html#a95308103073c9e9003e3659d4b461270',1,'libsemigroups::PBR::cache_hash_value()'],['../classlibsemigroups_1_1_r_w_s_e.html#a67742b921e4e4305108d6d609f659edb',1,'libsemigroups::RWSE::cache_hash_value()']]], - ['cayley_5fgraph_5ft',['cayley_graph_t',['../classlibsemigroups_1_1_semigroup.html#aa9ab606c341cf7cc1635e6c167c9c6cb',1,'libsemigroups::Semigroup::cayley_graph_t()'],['../namespacelibsemigroups.html#a6bc0e4f775341a07b6d4f24043a712f1',1,'libsemigroups::cayley_graph_t()']]], - ['cbegin',['cbegin',['../classlibsemigroups_1_1_blocks.html#ab47d56e6061957d69d5be70da3e29540',1,'libsemigroups::Blocks::cbegin()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a655deeca82b1514463e8ea09f31f2099',1,'libsemigroups::ElementWithVectorData::cbegin()'],['../classlibsemigroups_1_1_semigroup.html#a96c7cea0c406421ae408a097ab27e409',1,'libsemigroups::Semigroup::cbegin()']]], - ['cbegin_5fidempotents',['cbegin_idempotents',['../classlibsemigroups_1_1_semigroup.html#af1eda880e5e04a10a51fd07612a283e3',1,'libsemigroups::Semigroup']]], - ['cbegin_5fsorted',['cbegin_sorted',['../classlibsemigroups_1_1_semigroup.html#a49911287c884133f90ca897b40d44837',1,'libsemigroups::Semigroup']]], - ['cend',['cend',['../classlibsemigroups_1_1_blocks.html#ae5639d6f774ae1eef6cb37a64f638e6e',1,'libsemigroups::Blocks::cend()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a7d3b0a94d7bd283da3ae94d00adc46cd',1,'libsemigroups::ElementWithVectorData::cend()'],['../classlibsemigroups_1_1_semigroup.html#ac7deb5843d4f292bf7f86e9eedbedcde',1,'libsemigroups::Semigroup::cend()']]], - ['cend_5fidempotents',['cend_idempotents',['../classlibsemigroups_1_1_semigroup.html#a209d23c1a6251f8cbd78034f9e70a290',1,'libsemigroups::Semigroup']]], - ['cend_5fsorted',['cend_sorted',['../classlibsemigroups_1_1_semigroup.html#a2f29d0505a515c48c4cf0e28925117ed',1,'libsemigroups::Semigroup']]], - ['class_5findex_5ft',['class_index_t',['../classlibsemigroups_1_1_congruence.html#a1c614623f5c98532fdbeaae4f32c065c',1,'libsemigroups::Congruence']]], - ['closure',['closure',['../classlibsemigroups_1_1_semigroup.html#ae0886a6e0f83043a64c70724e5fb0e2a',1,'libsemigroups::Semigroup::closure(std::vector< Element const * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#aaa7b06f11d65527be47efbd4d9af7be5',1,'libsemigroups::Semigroup::closure(std::vector< Element const * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#a4eba75a2573b70320a23200b262d9f69',1,'libsemigroups::Semigroup::closure(std::vector< Element * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#a239804cb3365c27ef457fe959cec4d42',1,'libsemigroups::Semigroup::closure(std::initializer_list< Element * > coll)']]], - ['complexity',['complexity',['../classlibsemigroups_1_1_element.html#ac7d80fabf8c999e505980ec0cf64a55a',1,'libsemigroups::Element::complexity()'],['../classlibsemigroups_1_1_partial_transformation.html#afa15923a885a868d93c61274af7ed250',1,'libsemigroups::PartialTransformation::complexity()'],['../classlibsemigroups_1_1_bipartition.html#a9c2d85b63c7cc86dcf00e00294bada0a',1,'libsemigroups::Bipartition::complexity()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a4d2657c411db437c5052cc2604d470e5',1,'libsemigroups::MatrixOverSemiringBase::complexity()'],['../classlibsemigroups_1_1_p_b_r.html#a29ca15c4dc467d79404eea9be0fffe92',1,'libsemigroups::PBR::complexity()'],['../classlibsemigroups_1_1_r_w_s_e.html#a22d26c23247724ae9f3ab3c33f7e66aa',1,'libsemigroups::RWSE::complexity()']]], - ['confluent',['confluent',['../classlibsemigroups_1_1_r_w_s.html#a372d5a21a588be7aba9a0432bc75a040',1,'libsemigroups::RWS']]], - ['congruence',['Congruence',['../classlibsemigroups_1_1_congruence.html',1,'libsemigroups::Congruence'],['../classlibsemigroups_1_1_congruence.html#a0d6db1abda027e546dfd3ce79b4c9b40',1,'libsemigroups::Congruence::Congruence(std::string type, size_t nrgens, std::vector< relation_t > const &relations, std::vector< relation_t > const &extra)'],['../classlibsemigroups_1_1_congruence.html#a24124988c5bac0ced80a90b614ec0667',1,'libsemigroups::Congruence::Congruence(std::string type, Semigroup *semigroup, std::vector< relation_t > const &genpairs)']]], - ['const_5fnr_5fblocks',['const_nr_blocks',['../classlibsemigroups_1_1_bipartition.html#a8b36c764d850162da2de3a4a346a2411',1,'libsemigroups::Bipartition']]], - ['copy',['copy',['../classlibsemigroups_1_1_element.html#a97454c369aa06190a065ff07f7b4d305',1,'libsemigroups::Element::copy()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a2526b31b7ac53ed4ad7226db4fccfc73',1,'libsemigroups::ElementWithVectorData::copy()'],['../classlibsemigroups_1_1_r_w_s_e.html#aa9d833dd8767e11db31000601434fd78',1,'libsemigroups::RWSE::copy()']]], - ['copy_5fadd_5fgenerators',['copy_add_generators',['../classlibsemigroups_1_1_semigroup.html#a0016d9101ca6f61c681e50a542646b2a',1,'libsemigroups::Semigroup::copy_add_generators(std::vector< Element const * > const *coll) const'],['../classlibsemigroups_1_1_semigroup.html#ad4e7ba93d45b459c613b7041bd6a7ffd',1,'libsemigroups::Semigroup::copy_add_generators(std::vector< Element * > const *coll) const']]], - ['copy_5fclosure',['copy_closure',['../classlibsemigroups_1_1_semigroup.html#aa35464373bef6d88e3257a0b9dedccbf',1,'libsemigroups::Semigroup::copy_closure(std::vector< Element const * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#a0c70cf4360d248053c04dd02bb538759',1,'libsemigroups::Semigroup::copy_closure(std::vector< Element * > const *gens)']]], - ['crank',['crank',['../classlibsemigroups_1_1_partial_transformation.html#a00a8fe0dae843cd662f19fa826297b02',1,'libsemigroups::PartialTransformation::crank()'],['../classlibsemigroups_1_1_partial_perm.html#a05e3d3266873a57fd8c0266127d6a11e',1,'libsemigroups::PartialPerm::crank()']]], - ['crbegin',['crbegin',['../classlibsemigroups_1_1_semigroup.html#a3273921366affe7bcb3b0657063d0c14',1,'libsemigroups::Semigroup']]], - ['crbegin_5fsorted',['crbegin_sorted',['../classlibsemigroups_1_1_semigroup.html#a60fe96554a7f139e2f8a278e87c3ff84',1,'libsemigroups::Semigroup']]], - ['crend',['crend',['../classlibsemigroups_1_1_semigroup.html#af7d74537f5cf632d5c5edfc5fbe03ed0',1,'libsemigroups::Semigroup']]], - ['crend_5fsorted',['crend_sorted',['../classlibsemigroups_1_1_semigroup.html#a3484bf180c7c7aa06af09080affbafdf',1,'libsemigroups::Semigroup']]], - ['current_5fmax_5fword_5flength',['current_max_word_length',['../classlibsemigroups_1_1_semigroup.html#ae27b64c78b82236c611c8b82018d6243',1,'libsemigroups::Semigroup']]], - ['current_5fnrrules',['current_nrrules',['../classlibsemigroups_1_1_semigroup.html#a9254472e2374d27a915bd533103c8da0',1,'libsemigroups::Semigroup']]], - ['current_5fposition',['current_position',['../classlibsemigroups_1_1_semigroup.html#ae482b74384e30cc208d01c11ea398bd1',1,'libsemigroups::Semigroup']]], - ['current_5fsize',['current_size',['../classlibsemigroups_1_1_semigroup.html#ad1994e708194877086ebd926018ebc46',1,'libsemigroups::Semigroup']]] -]; diff --git a/search/all_4.html b/search/all_4.html deleted file mode 100644 index dd062aeae..000000000 --- a/search/all_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_4.js b/search/all_4.js deleted file mode 100644 index a8d8f5324..000000000 --- a/search/all_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['degree',['degree',['../classlibsemigroups_1_1_blocks.html#a102af048c1616a2a11b05b13209825d7',1,'libsemigroups::Blocks::degree()'],['../classlibsemigroups_1_1_element.html#a737a5e72977f33f609b0e6f63032a5f2',1,'libsemigroups::Element::degree()'],['../classlibsemigroups_1_1_partial_transformation.html#a0bd8baf4e67f053f0769feb9c387b2e9',1,'libsemigroups::PartialTransformation::degree()'],['../classlibsemigroups_1_1_bipartition.html#ab5f6dcbac98a376fe2185eb84f568c08',1,'libsemigroups::Bipartition::degree()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a5bfc6d66ba97caa75bc1434bc9d251fc',1,'libsemigroups::MatrixOverSemiringBase::degree()'],['../classlibsemigroups_1_1_p_b_r.html#ac00b7be9ea91a21e0c6169cb5782151e',1,'libsemigroups::PBR::degree()'],['../classlibsemigroups_1_1_r_w_s_e.html#a2f010c018ff02159819d950b18b468e8',1,'libsemigroups::RWSE::degree()'],['../classlibsemigroups_1_1_semigroup.html#a2b72e8a7c0b68346aa40d049ab02667b',1,'libsemigroups::Semigroup::degree()']]] -]; diff --git a/search/all_5.html b/search/all_5.html deleted file mode 100644 index f0780fdd3..000000000 --- a/search/all_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_5.js b/search/all_5.js deleted file mode 100644 index d96708efa..000000000 --- a/search/all_5.js +++ /dev/null @@ -1,25 +0,0 @@ -var searchData= -[ - ['element',['Element',['../classlibsemigroups_1_1_element.html',1,'libsemigroups::Element'],['../classlibsemigroups_1_1_element.html#adf57e554749e9ff7c31ef66b1d061007',1,'libsemigroups::Element::Element()']]], - ['element_5findex_5ft',['element_index_t',['../classlibsemigroups_1_1_semigroup.html#a9dfa78f4ec2daeee9ae98dbfbaced077',1,'libsemigroups::Semigroup']]], - ['elementwithvectordata',['ElementWithVectorData',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups::ElementWithVectorData< TValueType, TSubclass >'],['../classlibsemigroups_1_1_element_with_vector_data.html#ae0905349f53e0b88ed4b513d4e43179e',1,'libsemigroups::ElementWithVectorData::ElementWithVectorData()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a48f10cb97d74321ee9d1689aede6d527',1,'libsemigroups::ElementWithVectorData::ElementWithVectorData(std::vector< TValueType > *vector)'],['../classlibsemigroups_1_1_element_with_vector_data.html#af10e2a99e40b9fcacd20c715aa4a6d5e',1,'libsemigroups::ElementWithVectorData::ElementWithVectorData(std::vector< TValueType > const &vector)']]], - ['elementwithvectordata_3c_20bool_2c_20booleanmat_20_3e',['ElementWithVectorData< bool, BooleanMat >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20int64_5ft_2c_20projectivemaxplusmatrix_20_3e',['ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20std_3a_3avector_3c_20u_5fint32_5ft_20_3e_2c_20pbr_20_3e',['ElementWithVectorData< std::vector< u_int32_t >, PBR >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20t_2c_20partialperm_3c_20t_20_3e_20_3e',['ElementWithVectorData< T, PartialPerm< T > >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20t_2c_20transformation_3c_20t_20_3e_20_3e',['ElementWithVectorData< T, Transformation< T > >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20tvaluetype_2c_20matrixoversemiring_3c_20tvaluetype_20_3e_20_3e',['ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20u_5fint32_5ft_2c_20bipartition_20_3e',['ElementWithVectorData< u_int32_t, Bipartition >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash',['ElementWithVectorDataDefaultHash',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20bool_2c_20booleanmat_20_3e',['ElementWithVectorDataDefaultHash< bool, BooleanMat >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20int64_5ft_2c_20projectivemaxplusmatrix_20_3e',['ElementWithVectorDataDefaultHash< int64_t, ProjectiveMaxPlusMatrix >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20t_2c_20partialperm_3c_20t_20_3e_20_3e',['ElementWithVectorDataDefaultHash< T, PartialPerm< T > >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20t_2c_20transformation_3c_20t_20_3e_20_3e',['ElementWithVectorDataDefaultHash< T, Transformation< T > >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20tvaluetype_2c_20matrixoversemiring_3c_20tvaluetype_20_3e_20_3e',['ElementWithVectorDataDefaultHash< TValueType, MatrixOverSemiring< TValueType > >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20u_5fint32_5ft_2c_20bipartition_20_3e',['ElementWithVectorDataDefaultHash< u_int32_t, Bipartition >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elm_5ft',['elm_t',['../classlibsemigroups_1_1_element.html#a3e78b103837362d309f8459b1c7d7ff4',1,'libsemigroups::Element']]], - ['end',['end',['../classlibsemigroups_1_1_element_with_vector_data.html#a33dc93536a69e300056a2f908040fe48',1,'libsemigroups::ElementWithVectorData::end()'],['../classlibsemigroups_1_1_semigroup.html#ad2e14f550c1437bbbcecf952f8c288a5',1,'libsemigroups::Semigroup::end()']]], - ['enumerate',['enumerate',['../classlibsemigroups_1_1_semigroup.html#a06f87daa414756f223752dbbc39af64a',1,'libsemigroups::Semigroup::enumerate(std::atomic< bool > &killed, size_t limit=LIMIT_MAX)'],['../classlibsemigroups_1_1_semigroup.html#aa10cbfb840851c3491426345697eda3f',1,'libsemigroups::Semigroup::enumerate(size_t limit=LIMIT_MAX)']]], - ['equal',['Equal',['../structlibsemigroups_1_1_element_1_1_equal.html',1,'libsemigroups::Element']]], - ['extra',['extra',['../classlibsemigroups_1_1_congruence.html#a5986461f0fff0c1f099f1cc3fa5b4006',1,'libsemigroups::Congruence']]] -]; diff --git a/search/all_6.html b/search/all_6.html deleted file mode 100644 index 39b0f555c..000000000 --- a/search/all_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_6.js b/search/all_6.js deleted file mode 100644 index 33954c02c..000000000 --- a/search/all_6.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['factorisation',['factorisation',['../classlibsemigroups_1_1_semigroup.html#a408dc3b7384564fe4dc2f1fc38756d4b',1,'libsemigroups::Semigroup::factorisation(word_t &word, element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a41c57b89206b7405dee14ddf445aba3d',1,'libsemigroups::Semigroup::factorisation(element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a85856608f1ceac60a9a712afcaf91dd1',1,'libsemigroups::Semigroup::factorisation(Element const *x)']]], - ['fast_5fproduct',['fast_product',['../classlibsemigroups_1_1_semigroup.html#ac7526b300e6a1d203e4c008897c6502a',1,'libsemigroups::Semigroup']]], - ['final_5fletter',['final_letter',['../classlibsemigroups_1_1_semigroup.html#a6e40db619cc7d1c20723111c102df746',1,'libsemigroups::Semigroup']]], - ['first_5fletter',['first_letter',['../classlibsemigroups_1_1_semigroup.html#a76a430aadd7cac7e3bc2c0c186fc3442',1,'libsemigroups::Semigroup']]], - ['force_5fkbfp',['force_kbfp',['../classlibsemigroups_1_1_congruence.html#a86117c2931d311212ffee204b6931447',1,'libsemigroups::Congruence']]], - ['force_5fkbp',['force_kbp',['../classlibsemigroups_1_1_congruence.html#af0ab1e6f67477f2e02c809290fdb8719',1,'libsemigroups::Congruence']]], - ['force_5fp',['force_p',['../classlibsemigroups_1_1_congruence.html#a43c54205d7fc9bb78de4b4d4ad1c90d5',1,'libsemigroups::Congruence']]], - ['force_5ftc',['force_tc',['../classlibsemigroups_1_1_congruence.html#a9cbab3bc96cf58789443d32de234a895',1,'libsemigroups::Congruence']]], - ['force_5ftc_5fprefill',['force_tc_prefill',['../classlibsemigroups_1_1_congruence.html#ac88fe9a292c5d07521d2781d9c57dcf0',1,'libsemigroups::Congruence']]] -]; diff --git a/search/all_7.html b/search/all_7.html deleted file mode 100644 index 9cd0196e7..000000000 --- a/search/all_7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_7.js b/search/all_7.js deleted file mode 100644 index d2541a27c..000000000 --- a/search/all_7.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['gens',['gens',['../classlibsemigroups_1_1_semigroup.html#a17a3cae4f491f61bc425a9afa3e5b0d8',1,'libsemigroups::Semigroup']]], - ['get_5frws_5fword',['get_rws_word',['../classlibsemigroups_1_1_r_w_s_e.html#a7109667a83bc9450accf41b32bfaa471',1,'libsemigroups::RWSE']]], - ['get_5ftype',['get_type',['../classlibsemigroups_1_1_element.html#acded78064b859c0994c2ce8e1e7dd1da',1,'libsemigroups::Element']]] -]; diff --git a/search/all_8.html b/search/all_8.html deleted file mode 100644 index 1e8fb9ceb..000000000 --- a/search/all_8.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_8.js b/search/all_8.js deleted file mode 100644 index 849dc4f6e..000000000 --- a/search/all_8.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['hash',['Hash',['../structlibsemigroups_1_1_element_1_1_hash.html',1,'libsemigroups::Element']]], - ['hash_5fvalue',['hash_value',['../classlibsemigroups_1_1_blocks.html#ac028cf57e3089b7d1fce2173e13a4730',1,'libsemigroups::Blocks::hash_value()'],['../classlibsemigroups_1_1_element.html#a5f0550b30e74bf8c2369ebd244e0101d',1,'libsemigroups::Element::hash_value()']]] -]; diff --git a/search/all_9.html b/search/all_9.html deleted file mode 100644 index 27df366b2..000000000 --- a/search/all_9.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_9.js b/search/all_9.js deleted file mode 100644 index b67bf7937..000000000 --- a/search/all_9.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['identity',['identity',['../classlibsemigroups_1_1_element.html#ae743eb1ec1f58c3eb0692bc375855782',1,'libsemigroups::Element::identity()'],['../classlibsemigroups_1_1_partial_transformation.html#a044ec7ba30e5feed49d22f17675df1c4',1,'libsemigroups::PartialTransformation::identity()'],['../classlibsemigroups_1_1_bipartition.html#a3aa33d602b446a3d5e604a711ee22580',1,'libsemigroups::Bipartition::identity()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a5fe6fa92374ec5ca0e323cb1d195f3f1',1,'libsemigroups::MatrixOverSemiringBase::identity()'],['../classlibsemigroups_1_1_p_b_r.html#a950ae28f8ad3e1eac7948949cb1df96a',1,'libsemigroups::PBR::identity()'],['../classlibsemigroups_1_1_r_w_s_e.html#aaceb5ece6a513cb81f9d855fab0a4e52',1,'libsemigroups::RWSE::identity()']]], - ['infty',['INFTY',['../classlibsemigroups_1_1_semiring.html#a92b3188684cc57c7436fad4e43a2ee16',1,'libsemigroups::Semiring']]], - ['integers',['Integers',['../classlibsemigroups_1_1_integers.html',1,'libsemigroups']]], - ['inverse',['inverse',['../classlibsemigroups_1_1_permutation.html#a55df7f37ecc1734494a1e28210d9bd7d',1,'libsemigroups::Permutation']]], - ['is_5fbegun',['is_begun',['../classlibsemigroups_1_1_semigroup.html#a764cce3e3e7f608cd4c73f8cf855a5b5',1,'libsemigroups::Semigroup']]], - ['is_5fdone',['is_done',['../classlibsemigroups_1_1_congruence.html#a587ff9d9c8790c99906f6125a103b467',1,'libsemigroups::Congruence::is_done()'],['../classlibsemigroups_1_1_semigroup.html#ae0fb57b49d829b61a367f002e941f9e1',1,'libsemigroups::Semigroup::is_done()']]], - ['is_5fidempotent',['is_idempotent',['../classlibsemigroups_1_1_semigroup.html#a969de4f01147cbdac6fcebe1715da19f',1,'libsemigroups::Semigroup']]], - ['is_5fobviously_5finfinite',['is_obviously_infinite',['../classlibsemigroups_1_1_congruence.html#afb2062a137745aa3749f52797797df61',1,'libsemigroups::Congruence']]], - ['is_5ftransverse_5fblock',['is_transverse_block',['../classlibsemigroups_1_1_blocks.html#a90ae2a49d2868b8fda5a720388f4ca99',1,'libsemigroups::Blocks::is_transverse_block()'],['../classlibsemigroups_1_1_bipartition.html#a092f53feb6a2746fb3a81fe5baa973d6',1,'libsemigroups::Bipartition::is_transverse_block()']]] -]; diff --git a/search/all_a.html b/search/all_a.html deleted file mode 100644 index 63f9254d8..000000000 --- a/search/all_a.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_a.js b/search/all_a.js deleted file mode 100644 index 124a309b2..000000000 --- a/search/all_a.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['knuth_5fbendix',['knuth_bendix',['../classlibsemigroups_1_1_r_w_s.html#a82efcac80e8ed153e2aa2af86ef0ab3b',1,'libsemigroups::RWS::knuth_bendix()'],['../classlibsemigroups_1_1_r_w_s.html#addd52e5edbaf219714fbc6dcdbad2206',1,'libsemigroups::RWS::knuth_bendix(std::atomic< bool > &killed)']]], - ['knuth_5fbendix_5fby_5foverlap_5flength',['knuth_bendix_by_overlap_length',['../classlibsemigroups_1_1_r_w_s.html#abeda086a19c63b8747eded6bc357bd0c',1,'libsemigroups::RWS']]] -]; diff --git a/search/all_b.html b/search/all_b.html deleted file mode 100644 index 44ae3e475..000000000 --- a/search/all_b.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_b.js b/search/all_b.js deleted file mode 100644 index aff134727..000000000 --- a/search/all_b.js +++ /dev/null @@ -1,14 +0,0 @@ -var searchData= -[ - ['libsemigroups_20_2d_20c_2b_2b_20library_20for_20semigroups_20and_20monoids_20_2d_20version_200_2e6_2e7',['libsemigroups - C++ library for semigroups and monoids - Version 0.6.7',['../index.html',1,'']]], - ['left',['left',['../classlibsemigroups_1_1_semigroup.html#ae20823e7ce21c92f412d22821e7a4c05',1,'libsemigroups::Semigroup']]], - ['left_5fblocks',['left_blocks',['../classlibsemigroups_1_1_bipartition.html#a37a71b314e8f23f133c31833d243f73f',1,'libsemigroups::Bipartition']]], - ['left_5fcayley_5fgraph_5fcopy',['left_cayley_graph_copy',['../classlibsemigroups_1_1_semigroup.html#a1fb14978c8c5a12ff021d4bc8724238d',1,'libsemigroups::Semigroup']]], - ['length_5fconst',['length_const',['../classlibsemigroups_1_1_semigroup.html#a6802258d9e52bd9514e74e62be49cd38',1,'libsemigroups::Semigroup']]], - ['length_5fnon_5fconst',['length_non_const',['../classlibsemigroups_1_1_semigroup.html#a879cad49983adfb4c682df35e5efad4e',1,'libsemigroups::Semigroup']]], - ['letter_5ft',['letter_t',['../namespacelibsemigroups.html#a38c2911ca7f82f35322c4b82e3c671e2',1,'libsemigroups']]], - ['letter_5fto_5fpos',['letter_to_pos',['../classlibsemigroups_1_1_semigroup.html#aa16f101fb96bd2b8a6f25a53cd9b3e14',1,'libsemigroups::Semigroup']]], - ['libsemigroups',['libsemigroups',['../namespacelibsemigroups.html',1,'']]], - ['limit_5fmax',['LIMIT_MAX',['../classlibsemigroups_1_1_semigroup.html#af5ac5adbe809084b0c084942347572f4',1,'libsemigroups::Semigroup']]], - ['lookup',['lookup',['../classlibsemigroups_1_1_blocks.html#a803b82f36e1d33647db8c65e7394103a',1,'libsemigroups::Blocks']]] -]; diff --git a/search/all_c.html b/search/all_c.html deleted file mode 100644 index 3de15867d..000000000 --- a/search/all_c.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_c.js b/search/all_c.js deleted file mode 100644 index ce88fb169..000000000 --- a/search/all_c.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['matrixoversemiring',['MatrixOverSemiring',['../classlibsemigroups_1_1_matrix_over_semiring.html',1,'libsemigroups']]], - ['matrixoversemiringbase',['MatrixOverSemiringBase',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups::MatrixOverSemiringBase< TValueType, TSubclass >'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a99fee19c8ce933e2473afc16924f2f3f',1,'libsemigroups::MatrixOverSemiringBase::MatrixOverSemiringBase(std::vector< TValueType > *matrix, Semiring< TValueType > const *semiring)'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a0ea7d30dcc61d160462835cffed2a2aa',1,'libsemigroups::MatrixOverSemiringBase::MatrixOverSemiringBase(std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#af72c7f10db4c290c5d21e0b3697a6eae',1,'libsemigroups::MatrixOverSemiringBase::MatrixOverSemiringBase(std::vector< TValueType > *matrix)']]], - ['matrixoversemiringbase_3c_20bool_2c_20booleanmat_20_3e',['MatrixOverSemiringBase< bool, BooleanMat >',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups']]], - ['matrixoversemiringbase_3c_20int64_5ft_2c_20projectivemaxplusmatrix_20_3e',['MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups']]], - ['matrixoversemiringbase_3c_20tvaluetype_2c_20matrixoversemiring_3c_20tvaluetype_20_3e_20_3e',['MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups']]], - ['maxplussemiring',['MaxPlusSemiring',['../classlibsemigroups_1_1_max_plus_semiring.html',1,'libsemigroups']]], - ['minimal_5ffactorisation',['minimal_factorisation',['../classlibsemigroups_1_1_semigroup.html#a778113085c6881f60f24856e1f8a9d9f',1,'libsemigroups::Semigroup::minimal_factorisation(word_t &word, element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a57243f01c2ae3ec00382b7fa01eac493',1,'libsemigroups::Semigroup::minimal_factorisation(element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a2de1f5c4422b5c1bd416123a40777f7d',1,'libsemigroups::Semigroup::minimal_factorisation(Element const *x)']]], - ['minplussemiring',['MinPlusSemiring',['../classlibsemigroups_1_1_min_plus_semiring.html',1,'libsemigroups']]], - ['minus_5finfty',['MINUS_INFTY',['../classlibsemigroups_1_1_semiring.html#a7e5c5791a1719a2d13160f17caff4249',1,'libsemigroups::Semiring']]] -]; diff --git a/search/all_d.html b/search/all_d.html deleted file mode 100644 index a2d5bd7ed..000000000 --- a/search/all_d.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_d.js b/search/all_d.js deleted file mode 100644 index 9bdc8f30c..000000000 --- a/search/all_d.js +++ /dev/null @@ -1,15 +0,0 @@ -var searchData= -[ - ['naturalsemiring',['NaturalSemiring',['../classlibsemigroups_1_1_natural_semiring.html',1,'libsemigroups::NaturalSemiring'],['../classlibsemigroups_1_1_natural_semiring.html#a28d50165b4edcaabad3c5e3377d4e309',1,'libsemigroups::NaturalSemiring::NaturalSemiring()']]], - ['next_5frelation',['next_relation',['../classlibsemigroups_1_1_semigroup.html#a255474c37d0e80f014cd9dba31e588f9',1,'libsemigroups::Semigroup']]], - ['nontrivial_5fclasses',['nontrivial_classes',['../classlibsemigroups_1_1_congruence.html#a630579855342bd38f92892e55bed8ba3',1,'libsemigroups::Congruence']]], - ['not_5frwse',['NOT_RWSE',['../classlibsemigroups_1_1_element.html#a3e78b103837362d309f8459b1c7d7ff4a622b60bc16032e42f32a648fb7c81930',1,'libsemigroups::Element']]], - ['nr_5fblocks',['nr_blocks',['../classlibsemigroups_1_1_blocks.html#a48532c2e036635ffa87cc6f17bbe00c9',1,'libsemigroups::Blocks::nr_blocks()'],['../classlibsemigroups_1_1_bipartition.html#ac9639f4eff9f17fa53b4cd5451a4e34a',1,'libsemigroups::Bipartition::nr_blocks()']]], - ['nr_5fclasses',['nr_classes',['../classlibsemigroups_1_1_congruence.html#a39613081e66416205cdcb8a49f4b7eb5',1,'libsemigroups::Congruence']]], - ['nr_5fleft_5fblocks',['nr_left_blocks',['../classlibsemigroups_1_1_bipartition.html#af75d413f4a859f87d88cb02a2388d10c',1,'libsemigroups::Bipartition']]], - ['nr_5fright_5fblocks',['nr_right_blocks',['../classlibsemigroups_1_1_bipartition.html#a1a9c3dc1dff0493d2c4f73999fc7bb09',1,'libsemigroups::Bipartition']]], - ['nr_5frules',['nr_rules',['../classlibsemigroups_1_1_r_w_s.html#a42857dac79a8289ae354daa8f3c91f86',1,'libsemigroups::RWS']]], - ['nrgens',['nrgens',['../classlibsemigroups_1_1_semigroup.html#a0bdd64f5292f19094cb58b7e747d8e2a',1,'libsemigroups::Semigroup']]], - ['nridempotents',['nridempotents',['../classlibsemigroups_1_1_semigroup.html#ab9cac1d593654e14a1fe6c9746f7eb9b',1,'libsemigroups::Semigroup']]], - ['nrrules',['nrrules',['../classlibsemigroups_1_1_semigroup.html#ab49234bc5f18016a360b5c124575023b',1,'libsemigroups::Semigroup']]] -]; diff --git a/search/all_e.html b/search/all_e.html deleted file mode 100644 index f9a056dcd..000000000 --- a/search/all_e.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_e.js b/search/all_e.js deleted file mode 100644 index 0863d0968..000000000 --- a/search/all_e.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['one',['one',['../classlibsemigroups_1_1_semiring.html#a4ac1c58a9e4de40fecd3d8193a244867',1,'libsemigroups::Semiring::one()'],['../classlibsemigroups_1_1_boolean_semiring.html#a204070674dd77394fb78805bd8074271',1,'libsemigroups::BooleanSemiring::one()'],['../classlibsemigroups_1_1_integers.html#a6a6df7012e9b55ed8d0a03983aedf290',1,'libsemigroups::Integers::one()'],['../classlibsemigroups_1_1_max_plus_semiring.html#a2ef2c57c5105ba8e3ef894c99f1a0811',1,'libsemigroups::MaxPlusSemiring::one()'],['../classlibsemigroups_1_1_min_plus_semiring.html#aebd93d884a65c4103b0205e187272f79',1,'libsemigroups::MinPlusSemiring::one()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#aa4399c630b85dccd55723f7aec5eb36d',1,'libsemigroups::TropicalMaxPlusSemiring::one()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#adf3945e2e3660adbcf035cb7f14f2167',1,'libsemigroups::TropicalMinPlusSemiring::one()'],['../classlibsemigroups_1_1_natural_semiring.html#a4a6ed2418e42075314d5b3cabb543870',1,'libsemigroups::NaturalSemiring::one()']]], - ['operator_28_29',['operator()',['../structlibsemigroups_1_1_element_1_1_equal.html#abd614c8e3afc57f36780fa8592f89683',1,'libsemigroups::Element::Equal::operator()()'],['../structlibsemigroups_1_1_element_1_1_hash.html#a08afb7161bae830004a1cf9b65937ce5',1,'libsemigroups::Element::Hash::operator()()'],['../classlibsemigroups_1_1_reduction_ordering.html#af88626b1fa2c35a83becf7fd28ec5f3b',1,'libsemigroups::ReductionOrdering::operator()(std::string const *p, std::string const *q) const'],['../classlibsemigroups_1_1_reduction_ordering.html#a8a62b3659bf1679abff7273cd9a7cae7',1,'libsemigroups::ReductionOrdering::operator()(std::string const &p, std::string const &q) const']]], - ['operator_3c',['operator<',['../classlibsemigroups_1_1_blocks.html#ac32c12a23254717892e2a331d8a26b84',1,'libsemigroups::Blocks::operator<()'],['../classlibsemigroups_1_1_element.html#afeb110ce478a2b48559dd39d840efe88',1,'libsemigroups::Element::operator<()'],['../classlibsemigroups_1_1_element_with_vector_data.html#ad67eb351c351edc9d485ce25172c931e',1,'libsemigroups::ElementWithVectorData::operator<()'],['../classlibsemigroups_1_1_partial_perm.html#a39f2e4ce35f76cb1c8680a9094bde058',1,'libsemigroups::PartialPerm::operator<()'],['../classlibsemigroups_1_1_r_w_s_e.html#a34a53e299726c8dc0c293b5778670b68',1,'libsemigroups::RWSE::operator<()']]], - ['operator_3c_3c',['operator<<',['../classlibsemigroups_1_1_r_w_s.html#a3bc8666a861824eef973c99859e5df44',1,'libsemigroups::RWS::operator<<()'],['../namespacelibsemigroups.html#aeb9b1bf517f644c176c8ecaa000bc2c2',1,'libsemigroups::operator<<()']]], - ['operator_3d',['operator=',['../classlibsemigroups_1_1_blocks.html#a0e06f4e3826207dd01baf7f7473b4f14',1,'libsemigroups::Blocks::operator=()'],['../classlibsemigroups_1_1_partition.html#a6cdadd38b772e76d3e6d8bf7b0c310cd',1,'libsemigroups::Partition::operator=()'],['../classlibsemigroups_1_1_semigroup.html#a6fabfc3c4bd4ae5711c8097563069480',1,'libsemigroups::Semigroup::operator=()']]], - ['operator_3d_3d',['operator==',['../classlibsemigroups_1_1_blocks.html#a2a92ebd88e7d58c14535fb140641eaf3',1,'libsemigroups::Blocks::operator==()'],['../classlibsemigroups_1_1_element.html#a25a0e55948c36873b57baae572ca11ef',1,'libsemigroups::Element::operator==()'],['../classlibsemigroups_1_1_element_with_vector_data.html#ac1d65b514cff79dd7f33ea0c6459c017',1,'libsemigroups::ElementWithVectorData::operator==()'],['../classlibsemigroups_1_1_r_w_s_e.html#ab2593bb56f887ad21e1c69435a20891a',1,'libsemigroups::RWSE::operator==()']]], - ['operator_5b_5d',['operator[]',['../classlibsemigroups_1_1_element_with_vector_data.html#aeba5c0adf85e0e11632e84a12b76f0b5',1,'libsemigroups::ElementWithVectorData::operator[]()'],['../classlibsemigroups_1_1_partition.html#a8d4353d5e6aad8f162f5b47fed8e3ee7',1,'libsemigroups::Partition::operator[]()'],['../classlibsemigroups_1_1_semigroup.html#a4381bc1558c1ff2bf628200710afc782',1,'libsemigroups::Semigroup::operator[]()']]], - ['overlap_5fmeasure',['overlap_measure',['../classlibsemigroups_1_1_r_w_s.html#a92f70494de02a8e9db6f8dc002f8f1c0',1,'libsemigroups::RWS']]] -]; diff --git a/search/all_f.html b/search/all_f.html deleted file mode 100644 index f6997fa5f..000000000 --- a/search/all_f.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_f.js b/search/all_f.js deleted file mode 100644 index 199f9a11c..000000000 --- a/search/all_f.js +++ /dev/null @@ -1,18 +0,0 @@ -var searchData= -[ - ['partialperm',['PartialPerm',['../classlibsemigroups_1_1_partial_perm.html',1,'libsemigroups::PartialPerm< T >'],['../classlibsemigroups_1_1_partial_perm.html#a4dee1c268b873aeaa506b833acf2e4c0',1,'libsemigroups::PartialPerm::PartialPerm()']]], - ['partialtransformation',['PartialTransformation',['../classlibsemigroups_1_1_partial_transformation.html',1,'libsemigroups']]], - ['partialtransformation_3c_20t_2c_20partialperm_3c_20t_20_3e_20_3e',['PartialTransformation< T, PartialPerm< T > >',['../classlibsemigroups_1_1_partial_transformation.html',1,'libsemigroups']]], - ['partialtransformation_3c_20t_2c_20transformation_3c_20t_20_3e_20_3e',['PartialTransformation< T, Transformation< T > >',['../classlibsemigroups_1_1_partial_transformation.html',1,'libsemigroups']]], - ['partition',['Partition',['../classlibsemigroups_1_1_partition.html',1,'libsemigroups::Partition< T >'],['../classlibsemigroups_1_1_partition.html#aeb0903ee5928f2d230159a2ff6a881e9',1,'libsemigroups::Partition::Partition(size_t nr_parts=0)'],['../classlibsemigroups_1_1_partition.html#a6de1ae95123f8b78bd022af9327924d6',1,'libsemigroups::Partition::Partition(std::vector< std::vector< T * > * > *parts)'],['../classlibsemigroups_1_1_partition.html#ad377300387c4f34e0e82b445aba17c25',1,'libsemigroups::Partition::Partition(Partition const &copy)=delete']]], - ['pbr',['PBR',['../classlibsemigroups_1_1_p_b_r.html',1,'libsemigroups']]], - ['period',['period',['../classlibsemigroups_1_1_natural_semiring.html#a8f8e52280bde1cbb9939c60c68272b0f',1,'libsemigroups::NaturalSemiring']]], - ['permutation',['Permutation',['../classlibsemigroups_1_1_permutation.html',1,'libsemigroups']]], - ['plus',['plus',['../classlibsemigroups_1_1_semiring.html#a8268dcbdb28cd3eb4b10ea78a769a9f1',1,'libsemigroups::Semiring::plus()'],['../classlibsemigroups_1_1_boolean_semiring.html#ae11b725fd37230fbc9d2e6dbce99bf1b',1,'libsemigroups::BooleanSemiring::plus()'],['../classlibsemigroups_1_1_integers.html#a3f259ae77b7fe715fac94db74c5884e2',1,'libsemigroups::Integers::plus()'],['../classlibsemigroups_1_1_max_plus_semiring.html#a46e13ae2d5b12cea03cc5b9e859d0fc8',1,'libsemigroups::MaxPlusSemiring::plus()'],['../classlibsemigroups_1_1_min_plus_semiring.html#ab15c6276236f3e879887fc528b58343e',1,'libsemigroups::MinPlusSemiring::plus()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#a810835814e261615abee7e6af4b75603',1,'libsemigroups::TropicalMaxPlusSemiring::plus()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#add232fd577e1d6896aa1dcd0ca5c296e',1,'libsemigroups::TropicalMinPlusSemiring::plus()'],['../classlibsemigroups_1_1_natural_semiring.html#aa0c4db945c1c462a189d6438d3d2a652',1,'libsemigroups::NaturalSemiring::plus()']]], - ['position',['position',['../classlibsemigroups_1_1_semigroup.html#a372ab9b712adaa5c02d6efff4e06b02e',1,'libsemigroups::Semigroup']]], - ['position_5fto_5fsorted_5fposition',['position_to_sorted_position',['../classlibsemigroups_1_1_semigroup.html#ae632fd021542e0ca7bca4118858f3cce',1,'libsemigroups::Semigroup']]], - ['prefix',['prefix',['../classlibsemigroups_1_1_semigroup.html#a824fb0c7978b18e11d3377f34babc7e1',1,'libsemigroups::Semigroup']]], - ['prod',['prod',['../classlibsemigroups_1_1_semiring.html#a0840a9334c665500c6ff3d805d0fe8fb',1,'libsemigroups::Semiring::prod()'],['../classlibsemigroups_1_1_boolean_semiring.html#a71826ae808c241009a1ee44ad13814d8',1,'libsemigroups::BooleanSemiring::prod()'],['../classlibsemigroups_1_1_integers.html#aead0cfe38d22298c69a528eee4ada5a7',1,'libsemigroups::Integers::prod()'],['../classlibsemigroups_1_1_max_plus_semiring.html#ac2b4e113e081619812f5d5c2d86c29b7',1,'libsemigroups::MaxPlusSemiring::prod()'],['../classlibsemigroups_1_1_min_plus_semiring.html#ad6a02b8b3e3aec39f9d3448a410cf9a9',1,'libsemigroups::MinPlusSemiring::prod()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#a510772e78d13e83b5f559e168d5ab825',1,'libsemigroups::TropicalMaxPlusSemiring::prod()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#ad8161abb7ac3cd79c0ed45511420f59d',1,'libsemigroups::TropicalMinPlusSemiring::prod()'],['../classlibsemigroups_1_1_natural_semiring.html#abf714093161b6ebb78bddce8bf5c8503',1,'libsemigroups::NaturalSemiring::prod()']]], - ['product_5fby_5freduction',['product_by_reduction',['../classlibsemigroups_1_1_semigroup.html#a399a8a21449e1370483abc5c237b3f74',1,'libsemigroups::Semigroup']]], - ['projectivemaxplusmatrix',['ProjectiveMaxPlusMatrix',['../classlibsemigroups_1_1_projective_max_plus_matrix.html',1,'libsemigroups::ProjectiveMaxPlusMatrix'],['../classlibsemigroups_1_1_projective_max_plus_matrix.html#a346213d53bd22a29ccbf66df4488b14e',1,'libsemigroups::ProjectiveMaxPlusMatrix::ProjectiveMaxPlusMatrix(std::vector< int64_t > *matrix, Semiring< int64_t > const *semiring)'],['../classlibsemigroups_1_1_projective_max_plus_matrix.html#a6effe78566f6a5ac36a0ea61f0e69e86',1,'libsemigroups::ProjectiveMaxPlusMatrix::ProjectiveMaxPlusMatrix(std::vector< std::vector< int64_t >> const &matrix, Semiring< int64_t > const *semiring)']]] -]; diff --git a/search/classes_0.html b/search/classes_0.html deleted file mode 100644 index b3c6ec6af..000000000 --- a/search/classes_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_0.js b/search/classes_0.js deleted file mode 100644 index d703a869a..000000000 --- a/search/classes_0.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['bipartition',['Bipartition',['../classlibsemigroups_1_1_bipartition.html',1,'libsemigroups']]], - ['blocks',['Blocks',['../classlibsemigroups_1_1_blocks.html',1,'libsemigroups']]], - ['booleanmat',['BooleanMat',['../classlibsemigroups_1_1_boolean_mat.html',1,'libsemigroups']]], - ['booleansemiring',['BooleanSemiring',['../classlibsemigroups_1_1_boolean_semiring.html',1,'libsemigroups']]] -]; diff --git a/search/classes_1.html b/search/classes_1.html deleted file mode 100644 index b744c4d15..000000000 --- a/search/classes_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_1.js b/search/classes_1.js deleted file mode 100644 index 2987820a8..000000000 --- a/search/classes_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['congruence',['Congruence',['../classlibsemigroups_1_1_congruence.html',1,'libsemigroups']]] -]; diff --git a/search/classes_2.html b/search/classes_2.html deleted file mode 100644 index 7878acb4f..000000000 --- a/search/classes_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_2.js b/search/classes_2.js deleted file mode 100644 index b131ffb00..000000000 --- a/search/classes_2.js +++ /dev/null @@ -1,20 +0,0 @@ -var searchData= -[ - ['element',['Element',['../classlibsemigroups_1_1_element.html',1,'libsemigroups']]], - ['elementwithvectordata',['ElementWithVectorData',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20bool_2c_20booleanmat_20_3e',['ElementWithVectorData< bool, BooleanMat >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20int64_5ft_2c_20projectivemaxplusmatrix_20_3e',['ElementWithVectorData< int64_t, ProjectiveMaxPlusMatrix >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20std_3a_3avector_3c_20u_5fint32_5ft_20_3e_2c_20pbr_20_3e',['ElementWithVectorData< std::vector< u_int32_t >, PBR >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20t_2c_20partialperm_3c_20t_20_3e_20_3e',['ElementWithVectorData< T, PartialPerm< T > >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20t_2c_20transformation_3c_20t_20_3e_20_3e',['ElementWithVectorData< T, Transformation< T > >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20tvaluetype_2c_20matrixoversemiring_3c_20tvaluetype_20_3e_20_3e',['ElementWithVectorData< TValueType, MatrixOverSemiring< TValueType > >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordata_3c_20u_5fint32_5ft_2c_20bipartition_20_3e',['ElementWithVectorData< u_int32_t, Bipartition >',['../classlibsemigroups_1_1_element_with_vector_data.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash',['ElementWithVectorDataDefaultHash',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20bool_2c_20booleanmat_20_3e',['ElementWithVectorDataDefaultHash< bool, BooleanMat >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20int64_5ft_2c_20projectivemaxplusmatrix_20_3e',['ElementWithVectorDataDefaultHash< int64_t, ProjectiveMaxPlusMatrix >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20t_2c_20partialperm_3c_20t_20_3e_20_3e',['ElementWithVectorDataDefaultHash< T, PartialPerm< T > >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20t_2c_20transformation_3c_20t_20_3e_20_3e',['ElementWithVectorDataDefaultHash< T, Transformation< T > >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20tvaluetype_2c_20matrixoversemiring_3c_20tvaluetype_20_3e_20_3e',['ElementWithVectorDataDefaultHash< TValueType, MatrixOverSemiring< TValueType > >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['elementwithvectordatadefaulthash_3c_20u_5fint32_5ft_2c_20bipartition_20_3e',['ElementWithVectorDataDefaultHash< u_int32_t, Bipartition >',['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html',1,'libsemigroups']]], - ['equal',['Equal',['../structlibsemigroups_1_1_element_1_1_equal.html',1,'libsemigroups::Element']]] -]; diff --git a/search/classes_3.html b/search/classes_3.html deleted file mode 100644 index c231d86f0..000000000 --- a/search/classes_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_3.js b/search/classes_3.js deleted file mode 100644 index c9cdbdb7a..000000000 --- a/search/classes_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['hash',['Hash',['../structlibsemigroups_1_1_element_1_1_hash.html',1,'libsemigroups::Element']]] -]; diff --git a/search/classes_4.html b/search/classes_4.html deleted file mode 100644 index 86dd4384f..000000000 --- a/search/classes_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_4.js b/search/classes_4.js deleted file mode 100644 index 0238d6c97..000000000 --- a/search/classes_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['integers',['Integers',['../classlibsemigroups_1_1_integers.html',1,'libsemigroups']]] -]; diff --git a/search/classes_5.html b/search/classes_5.html deleted file mode 100644 index 7aaef4df3..000000000 --- a/search/classes_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_5.js b/search/classes_5.js deleted file mode 100644 index bfdfdf611..000000000 --- a/search/classes_5.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['matrixoversemiring',['MatrixOverSemiring',['../classlibsemigroups_1_1_matrix_over_semiring.html',1,'libsemigroups']]], - ['matrixoversemiringbase',['MatrixOverSemiringBase',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups']]], - ['matrixoversemiringbase_3c_20bool_2c_20booleanmat_20_3e',['MatrixOverSemiringBase< bool, BooleanMat >',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups']]], - ['matrixoversemiringbase_3c_20int64_5ft_2c_20projectivemaxplusmatrix_20_3e',['MatrixOverSemiringBase< int64_t, ProjectiveMaxPlusMatrix >',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups']]], - ['matrixoversemiringbase_3c_20tvaluetype_2c_20matrixoversemiring_3c_20tvaluetype_20_3e_20_3e',['MatrixOverSemiringBase< TValueType, MatrixOverSemiring< TValueType > >',['../classlibsemigroups_1_1_matrix_over_semiring_base.html',1,'libsemigroups']]], - ['maxplussemiring',['MaxPlusSemiring',['../classlibsemigroups_1_1_max_plus_semiring.html',1,'libsemigroups']]], - ['minplussemiring',['MinPlusSemiring',['../classlibsemigroups_1_1_min_plus_semiring.html',1,'libsemigroups']]] -]; diff --git a/search/classes_6.html b/search/classes_6.html deleted file mode 100644 index aad7834e8..000000000 --- a/search/classes_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_6.js b/search/classes_6.js deleted file mode 100644 index 612f47655..000000000 --- a/search/classes_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['naturalsemiring',['NaturalSemiring',['../classlibsemigroups_1_1_natural_semiring.html',1,'libsemigroups']]] -]; diff --git a/search/classes_7.html b/search/classes_7.html deleted file mode 100644 index 794e3948f..000000000 --- a/search/classes_7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_7.js b/search/classes_7.js deleted file mode 100644 index 1ebf52208..000000000 --- a/search/classes_7.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['partialperm',['PartialPerm',['../classlibsemigroups_1_1_partial_perm.html',1,'libsemigroups']]], - ['partialtransformation',['PartialTransformation',['../classlibsemigroups_1_1_partial_transformation.html',1,'libsemigroups']]], - ['partialtransformation_3c_20t_2c_20partialperm_3c_20t_20_3e_20_3e',['PartialTransformation< T, PartialPerm< T > >',['../classlibsemigroups_1_1_partial_transformation.html',1,'libsemigroups']]], - ['partialtransformation_3c_20t_2c_20transformation_3c_20t_20_3e_20_3e',['PartialTransformation< T, Transformation< T > >',['../classlibsemigroups_1_1_partial_transformation.html',1,'libsemigroups']]], - ['partition',['Partition',['../classlibsemigroups_1_1_partition.html',1,'libsemigroups']]], - ['pbr',['PBR',['../classlibsemigroups_1_1_p_b_r.html',1,'libsemigroups']]], - ['permutation',['Permutation',['../classlibsemigroups_1_1_permutation.html',1,'libsemigroups']]], - ['projectivemaxplusmatrix',['ProjectiveMaxPlusMatrix',['../classlibsemigroups_1_1_projective_max_plus_matrix.html',1,'libsemigroups']]] -]; diff --git a/search/classes_8.html b/search/classes_8.html deleted file mode 100644 index 1ba60c903..000000000 --- a/search/classes_8.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_8.js b/search/classes_8.js deleted file mode 100644 index de80899bf..000000000 --- a/search/classes_8.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['reductionordering',['ReductionOrdering',['../classlibsemigroups_1_1_reduction_ordering.html',1,'libsemigroups']]], - ['rws',['RWS',['../classlibsemigroups_1_1_r_w_s.html',1,'libsemigroups']]], - ['rwse',['RWSE',['../classlibsemigroups_1_1_r_w_s_e.html',1,'libsemigroups']]] -]; diff --git a/search/classes_9.html b/search/classes_9.html deleted file mode 100644 index 565e7d7a0..000000000 --- a/search/classes_9.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_9.js b/search/classes_9.js deleted file mode 100644 index f0238b36d..000000000 --- a/search/classes_9.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['semigroup',['Semigroup',['../classlibsemigroups_1_1_semigroup.html',1,'libsemigroups']]], - ['semiring',['Semiring',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20bool_20_3e',['Semiring< bool >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20int64_5ft_20_3e',['Semiring< int64_t >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20tvaluetype_20_3e',['Semiring< TValueType >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiringwiththreshold',['SemiringWithThreshold',['../classlibsemigroups_1_1_semiring_with_threshold.html',1,'libsemigroups']]], - ['shortlex',['SHORTLEX',['../classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html',1,'libsemigroups']]] -]; diff --git a/search/classes_a.html b/search/classes_a.html deleted file mode 100644 index ca7479a3d..000000000 --- a/search/classes_a.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_a.js b/search/classes_a.js deleted file mode 100644 index cf6341502..000000000 --- a/search/classes_a.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['transformation',['Transformation',['../classlibsemigroups_1_1_transformation.html',1,'libsemigroups']]], - ['tropicalmaxplussemiring',['TropicalMaxPlusSemiring',['../classlibsemigroups_1_1_tropical_max_plus_semiring.html',1,'libsemigroups']]], - ['tropicalminplussemiring',['TropicalMinPlusSemiring',['../classlibsemigroups_1_1_tropical_min_plus_semiring.html',1,'libsemigroups']]] -]; diff --git a/search/classes_b.html b/search/classes_b.html deleted file mode 100644 index 886abdfcd..000000000 --- a/search/classes_b.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_b.js b/search/classes_b.js deleted file mode 100644 index 5ed9cc7c6..000000000 --- a/search/classes_b.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['semiring',['Semiring',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20bool_20_3e',['Semiring< bool >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20int64_5ft_20_3e',['Semiring< int64_t >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiring_3c_20tvaluetype_20_3e',['Semiring< TValueType >',['../classlibsemigroups_1_1_semiring.html',1,'libsemigroups']]], - ['semiringwiththreshold',['SemiringWithThreshold',['../classlibsemigroups_1_1_semiring_with_threshold.html',1,'libsemigroups']]], - ['shortlex',['SHORTLEX',['../classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html',1,'libsemigroups']]], - ['smallestinteger',['SmallestInteger',['../structlibsemigroups_1_1_smallest_integer.html',1,'libsemigroups']]] -]; diff --git a/search/classes_c.html b/search/classes_c.html deleted file mode 100644 index 52ec26763..000000000 --- a/search/classes_c.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_c.js b/search/classes_c.js deleted file mode 100644 index 4647bdc3d..000000000 --- a/search/classes_c.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['transf',['Transf',['../classlibsemigroups_1_1_transf.html',1,'libsemigroups']]], - ['transformation',['Transformation',['../classlibsemigroups_1_1_transformation.html',1,'libsemigroups']]], - ['tropicalmaxplussemiring',['TropicalMaxPlusSemiring',['../structlibsemigroups_1_1_tropical_max_plus_semiring.html',1,'libsemigroups']]], - ['tropicalminplussemiring',['TropicalMinPlusSemiring',['../structlibsemigroups_1_1_tropical_min_plus_semiring.html',1,'libsemigroups']]] -]; diff --git a/search/classes_d.html b/search/classes_d.html deleted file mode 100644 index 652508df3..000000000 --- a/search/classes_d.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_d.js b/search/classes_d.js deleted file mode 100644 index 934eacda6..000000000 --- a/search/classes_d.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['undefined',['UNDEFINED',['../structlibsemigroups_1_1_u_n_d_e_f_i_n_e_d.html',1,'libsemigroups']]] -]; diff --git a/search/classes_e.html b/search/classes_e.html deleted file mode 100644 index 7d4e9a563..000000000 --- a/search/classes_e.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_e.js b/search/classes_e.js deleted file mode 100644 index 5ce4b7a5d..000000000 --- a/search/classes_e.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['vec_5fbmat8_5fhash',['vec_bmat8_hash',['../structlibsemigroups_1_1vec__bmat8__hash.html',1,'libsemigroups']]] -]; diff --git a/search/close.png b/search/close.png deleted file mode 100644 index 9342d3dfe..000000000 Binary files a/search/close.png and /dev/null differ diff --git a/search/enums_0.html b/search/enums_0.html deleted file mode 100644 index 7040a9c5d..000000000 --- a/search/enums_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/enums_0.js b/search/enums_0.js deleted file mode 100644 index 24f64838e..000000000 --- a/search/enums_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['elm_5ft',['elm_t',['../classlibsemigroups_1_1_element.html#a3e78b103837362d309f8459b1c7d7ff4',1,'libsemigroups::Element']]] -]; diff --git a/search/enums_1.html b/search/enums_1.html deleted file mode 100644 index 0c65c0e09..000000000 --- a/search/enums_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/enums_1.js b/search/enums_1.js deleted file mode 100644 index 2af1a8d56..000000000 --- a/search/enums_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['overlap_5fmeasure',['overlap_measure',['../classlibsemigroups_1_1_r_w_s.html#a92f70494de02a8e9db6f8dc002f8f1c0',1,'libsemigroups::RWS']]] -]; diff --git a/search/enumvalues_0.html b/search/enumvalues_0.html deleted file mode 100644 index 78895c79b..000000000 --- a/search/enumvalues_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/enumvalues_0.js b/search/enumvalues_0.js deleted file mode 100644 index ce45b7f4b..000000000 --- a/search/enumvalues_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['not_5frwse',['NOT_RWSE',['../classlibsemigroups_1_1_element.html#a3e78b103837362d309f8459b1c7d7ff4a622b60bc16032e42f32a648fb7c81930',1,'libsemigroups::Element']]] -]; diff --git a/search/enumvalues_1.html b/search/enumvalues_1.html deleted file mode 100644 index 9b02a4b38..000000000 --- a/search/enumvalues_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/enumvalues_1.js b/search/enumvalues_1.js deleted file mode 100644 index 3b73e093b..000000000 --- a/search/enumvalues_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['rwse',['RWSE',['../classlibsemigroups_1_1_element.html#a3e78b103837362d309f8459b1c7d7ff4a5270d822f933ea153d27851f29a4e5f3',1,'libsemigroups::Element']]] -]; diff --git a/search/files_0.html b/search/files_0.html deleted file mode 100644 index 49606c82c..000000000 --- a/search/files_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_0.js b/search/files_0.js deleted file mode 100644 index a890c9169..000000000 --- a/search/files_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['adapters_2ehpp',['adapters.hpp',['../adapters_8hpp.html',1,'']]] -]; diff --git a/search/files_1.html b/search/files_1.html deleted file mode 100644 index c8871748e..000000000 --- a/search/files_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_1.js b/search/files_1.js deleted file mode 100644 index 0d1af2587..000000000 --- a/search/files_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['digraph_2ehpp',['digraph.hpp',['../digraph_8hpp.html',1,'']]] -]; diff --git a/search/files_2.html b/search/files_2.html deleted file mode 100644 index 99bdf21c8..000000000 --- a/search/files_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_2.js b/search/files_2.js deleted file mode 100644 index 5023b79bd..000000000 --- a/search/files_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['froidure_2dpin_2ehpp',['froidure-pin.hpp',['../froidure-pin_8hpp.html',1,'']]] -]; diff --git a/search/files_3.html b/search/files_3.html deleted file mode 100644 index f8e543a84..000000000 --- a/search/files_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_3.js b/search/files_3.js deleted file mode 100644 index fb6b0be7a..000000000 --- a/search/files_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['kbe_2ehpp',['kbe.hpp',['../kbe_8hpp.html',1,'']]] -]; diff --git a/search/files_4.html b/search/files_4.html deleted file mode 100644 index 2ebb46c7e..000000000 --- a/search/files_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_4.js b/search/files_4.js deleted file mode 100644 index 02a4218ea..000000000 --- a/search/files_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['libsemigroups_2ehpp',['libsemigroups.hpp',['../libsemigroups_8hpp.html',1,'']]] -]; diff --git a/search/files_5.html b/search/files_5.html deleted file mode 100644 index 268b7eb53..000000000 --- a/search/files_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_5.js b/search/files_5.js deleted file mode 100644 index 9b5672931..000000000 --- a/search/files_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['orb_2ehpp',['orb.hpp',['../orb_8hpp.html',1,'']]] -]; diff --git a/search/functions_0.html b/search/functions_0.html deleted file mode 100644 index bc73761f5..000000000 --- a/search/functions_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_0.js b/search/functions_0.js deleted file mode 100644 index 4a8fe8d48..000000000 --- a/search/functions_0.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['add_5fgenerators',['add_generators',['../classlibsemigroups_1_1_semigroup.html#a765db7123dcf60aa9917e85fe07dc757',1,'libsemigroups::Semigroup::add_generators(std::vector< Element const * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#a14d438caf33d04ada8c919575b3cf48a',1,'libsemigroups::Semigroup::add_generators(std::vector< Element * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#a18e781f1193317dd2c64b4994d60c858',1,'libsemigroups::Semigroup::add_generators(std::vector< Element const * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#aece350e933354b75f791bc0059778504',1,'libsemigroups::Semigroup::add_generators(std::vector< Element * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#ab14a8cd74a753f9bb108589727be7201',1,'libsemigroups::Semigroup::add_generators(std::initializer_list< Element * > coll)']]], - ['add_5frule',['add_rule',['../classlibsemigroups_1_1_r_w_s.html#a0877f2e282f11bc93771f82fdd70c05f',1,'libsemigroups::RWS']]], - ['add_5frules',['add_rules',['../classlibsemigroups_1_1_r_w_s.html#aae07bff2d77150fff875ffe5ec961c9f',1,'libsemigroups::RWS::add_rules(std::vector< relation_t > const &relations)'],['../classlibsemigroups_1_1_r_w_s.html#a10ad74a8d70090b8948f72136cc96a92',1,'libsemigroups::RWS::add_rules(Congruence &cong)']]], - ['at',['at',['../classlibsemigroups_1_1_element_with_vector_data.html#a80a9e5eef46ea56e2aa55b0062cda885',1,'libsemigroups::ElementWithVectorData::at()'],['../classlibsemigroups_1_1_partition.html#a53332fde2d42ed7a7796a78e9a398c56',1,'libsemigroups::Partition::at(size_t part_index) const'],['../classlibsemigroups_1_1_partition.html#ab1190cb48dc3de558d37839581543829',1,'libsemigroups::Partition::at(size_t part_index, size_t elm_nr) const'],['../classlibsemigroups_1_1_semigroup.html#a3df24ff90ff901c29fffbd5a17b9f4f7',1,'libsemigroups::Semigroup::at()']]] -]; diff --git a/search/functions_1.html b/search/functions_1.html deleted file mode 100644 index bfcf880be..000000000 --- a/search/functions_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_1.js b/search/functions_1.js deleted file mode 100644 index 2ab0ac03f..000000000 --- a/search/functions_1.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['batch_5fsize',['batch_size',['../classlibsemigroups_1_1_semigroup.html#a7a52a6e228af7de9d4fa627c739df0a0',1,'libsemigroups::Semigroup']]], - ['begin',['begin',['../classlibsemigroups_1_1_element_with_vector_data.html#a9797b6b46cfd665f190729ae5760e34f',1,'libsemigroups::ElementWithVectorData::begin()'],['../classlibsemigroups_1_1_semigroup.html#a70ff1a698f5b0c8c4b4a6a0d60f56010',1,'libsemigroups::Semigroup::begin()']]], - ['bipartition',['Bipartition',['../classlibsemigroups_1_1_bipartition.html#a7ccaedb0aff05eb155b55fb72a812620',1,'libsemigroups::Bipartition::Bipartition(size_t degree)'],['../classlibsemigroups_1_1_bipartition.html#a1d0738977566937801b1655061d2604f',1,'libsemigroups::Bipartition::Bipartition(std::vector< u_int32_t > *blocks)'],['../classlibsemigroups_1_1_bipartition.html#ae8f10cb7f48832247dc1d7ee1eb0e04e',1,'libsemigroups::Bipartition::Bipartition(std::vector< u_int32_t > const &blocks)']]], - ['block',['block',['../classlibsemigroups_1_1_blocks.html#a5bb2331ee7080268a052c141a15f1fce',1,'libsemigroups::Blocks']]], - ['blocks',['Blocks',['../classlibsemigroups_1_1_blocks.html#a4609020dec37cffeaf8a6902b1655696',1,'libsemigroups::Blocks::Blocks()'],['../classlibsemigroups_1_1_blocks.html#ac15df053ba18072f4d4bf51560a23151',1,'libsemigroups::Blocks::Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup)'],['../classlibsemigroups_1_1_blocks.html#aa9024cb5627f210a5ea71df9de9725c7',1,'libsemigroups::Blocks::Blocks(std::vector< u_int32_t > *blocks, std::vector< bool > *lookup, u_int32_t nr_blocks)'],['../classlibsemigroups_1_1_blocks.html#a87257f0555b336dc94e0f9ebeac41f67',1,'libsemigroups::Blocks::Blocks(Blocks const &copy)']]], - ['booleanmat',['BooleanMat',['../classlibsemigroups_1_1_boolean_mat.html#ab468b498405b8fafc7da499e6856c81a',1,'libsemigroups::BooleanMat::BooleanMat(std::vector< bool > *matrix)'],['../classlibsemigroups_1_1_boolean_mat.html#a4ab903d29ed5530d4b821cc9edcb831c',1,'libsemigroups::BooleanMat::BooleanMat(std::vector< std::vector< bool >> const &matrix)']]] -]; diff --git a/search/functions_10.html b/search/functions_10.html deleted file mode 100644 index d69badf9e..000000000 --- a/search/functions_10.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_10.js b/search/functions_10.js deleted file mode 100644 index 8408e8539..000000000 --- a/search/functions_10.js +++ /dev/null @@ -1,26 +0,0 @@ -var searchData= -[ - ['semigroup',['Semigroup',['../classlibsemigroups_1_1_semigroup.html#ac6ae95243c984db49928c8d83b5ff94b',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element const * > const *gens)'],['../classlibsemigroups_1_1_semigroup.html#a1150d03f354e8543b9ac52c30ff052e9',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element * > const *gens)'],['../classlibsemigroups_1_1_semigroup.html#a7ed7c58707f54eb142ec899b009fdb19',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element * > *gens)'],['../classlibsemigroups_1_1_semigroup.html#aae303af31f1a254f255de05089c9d2c3',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element const * > *gens)'],['../classlibsemigroups_1_1_semigroup.html#aeea85da8d897b8127e20fe23660f58d8',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element const * > const &gens)'],['../classlibsemigroups_1_1_semigroup.html#aeb5ceff683aa9e28ef2353244592bf7a',1,'libsemigroups::Semigroup::Semigroup(std::vector< Element * > const &gens)'],['../classlibsemigroups_1_1_semigroup.html#a73f1c89eee443de8b27216b34acfac6a',1,'libsemigroups::Semigroup::Semigroup(std::initializer_list< Element * > gens)'],['../classlibsemigroups_1_1_semigroup.html#aa0c7dfcba762a3ac9f0f0a58c268f741',1,'libsemigroups::Semigroup::Semigroup(const Semigroup &copy)']]], - ['semiring',['semiring',['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a6082a07347b399a1d724adc76bfea0c9',1,'libsemigroups::MatrixOverSemiringBase']]], - ['semiringwiththreshold',['SemiringWithThreshold',['../classlibsemigroups_1_1_semiring_with_threshold.html#a2c0ca33197b05f41e1643f129dbb995e',1,'libsemigroups::SemiringWithThreshold']]], - ['set_5fbatch_5fsize',['set_batch_size',['../classlibsemigroups_1_1_semigroup.html#a4436d9a50e5b92299765e0ea1865988d',1,'libsemigroups::Semigroup']]], - ['set_5fcheck_5fconfluence_5finterval',['set_check_confluence_interval',['../classlibsemigroups_1_1_r_w_s.html#ac7e0b5218203ed49c93058839b7dc41c',1,'libsemigroups::RWS']]], - ['set_5fmax_5foverlap',['set_max_overlap',['../classlibsemigroups_1_1_r_w_s.html#a485f896a757987f0e44b2ac99c815257',1,'libsemigroups::RWS']]], - ['set_5fmax_5frules',['set_max_rules',['../classlibsemigroups_1_1_r_w_s.html#a1b387ffa5b98bf7b3a7974e1f50476f5',1,'libsemigroups::RWS']]], - ['set_5fmax_5fthreads',['set_max_threads',['../classlibsemigroups_1_1_congruence.html#a8f7d84e7f2d52e83c5f56a0e746d9bc0',1,'libsemigroups::Congruence::set_max_threads()'],['../classlibsemigroups_1_1_semigroup.html#a535166da67baa70332e2da8f79488384',1,'libsemigroups::Semigroup::set_max_threads()']]], - ['set_5fnr_5fblocks',['set_nr_blocks',['../classlibsemigroups_1_1_bipartition.html#a0042f4033870832032ee9cd60c5de3d1',1,'libsemigroups::Bipartition']]], - ['set_5fnr_5fleft_5fblocks',['set_nr_left_blocks',['../classlibsemigroups_1_1_bipartition.html#a6d80dce0bf37499e19daac4020be9f0f',1,'libsemigroups::Bipartition']]], - ['set_5foverlap_5fmeasure',['set_overlap_measure',['../classlibsemigroups_1_1_r_w_s.html#a475db19f936de6b641c74c1186023086',1,'libsemigroups::RWS']]], - ['set_5fpack',['set_pack',['../classlibsemigroups_1_1_congruence.html#ad6d41e0ffe49c3a0e2366727d82bf085',1,'libsemigroups::Congruence']]], - ['set_5fprefill',['set_prefill',['../classlibsemigroups_1_1_congruence.html#adc3cad4c6bb2d0bdf515dea9a6ee7adb',1,'libsemigroups::Congruence']]], - ['set_5frank',['set_rank',['../classlibsemigroups_1_1_bipartition.html#aa2dd0d68f21a22cd52a896b3b45346d1',1,'libsemigroups::Bipartition']]], - ['set_5frelations',['set_relations',['../classlibsemigroups_1_1_congruence.html#aab749eb6982c0dfabccef39ac4bcc327',1,'libsemigroups::Congruence']]], - ['set_5freport',['set_report',['../classlibsemigroups_1_1_congruence.html#a7a48553f5cf964b76c2207439d50aa19',1,'libsemigroups::Congruence::set_report()'],['../classlibsemigroups_1_1_r_w_s.html#a43e27533705042bcfc67aefbeb088268',1,'libsemigroups::RWS::set_report()'],['../classlibsemigroups_1_1_semigroup.html#ad472ffd3e49a106d9e9c113a28b0e1aa',1,'libsemigroups::Semigroup::set_report()']]], - ['set_5freport_5finterval',['set_report_interval',['../classlibsemigroups_1_1_congruence.html#a8c4792c8213ab2852174faef501b3f2e',1,'libsemigroups::Congruence::set_report_interval()'],['../classlibsemigroups_1_1_r_w_s.html#a7480e806efb5fe1d6978cc32672844c7',1,'libsemigroups::RWS::set_report_interval()']]], - ['shortlex',['SHORTLEX',['../classlibsemigroups_1_1_s_h_o_r_t_l_e_x.html#a987d73f3331d8650f8a5ea336e5cd41c',1,'libsemigroups::SHORTLEX']]], - ['size',['size',['../classlibsemigroups_1_1_partition.html#af2214825e28be2db4a51ff5a22a20496',1,'libsemigroups::Partition::size()'],['../classlibsemigroups_1_1_semigroup.html#ac383285cd9334393a068a66c7076c1d3',1,'libsemigroups::Semigroup::size()']]], - ['sorted_5fat',['sorted_at',['../classlibsemigroups_1_1_semigroup.html#a68a21f68502fe4c6316a0080fde49355',1,'libsemigroups::Semigroup']]], - ['sorted_5fposition',['sorted_position',['../classlibsemigroups_1_1_semigroup.html#ac391f37fffd58ffe4634ca8f182773fc',1,'libsemigroups::Semigroup']]], - ['suffix',['suffix',['../classlibsemigroups_1_1_semigroup.html#aa4eda32c7c229dd5ef1b98da1256b244',1,'libsemigroups::Semigroup']]], - ['swap',['swap',['../classlibsemigroups_1_1_element.html#a5eed806d86c86750e26ff865e7b0694c',1,'libsemigroups::Element::swap()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a35953b86b9c5d0ce070cad5ffbb735fe',1,'libsemigroups::ElementWithVectorData::swap()'],['../classlibsemigroups_1_1_r_w_s_e.html#abf0f56397774d8e04e661720a75ff79a',1,'libsemigroups::RWSE::swap()']]] -]; diff --git a/search/functions_11.html b/search/functions_11.html deleted file mode 100644 index 2c143588e..000000000 --- a/search/functions_11.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_11.js b/search/functions_11.js deleted file mode 100644 index efee2753d..000000000 --- a/search/functions_11.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['test_5fequals',['test_equals',['../classlibsemigroups_1_1_congruence.html#a88e372cdf08a5fa64cf374c4f110c1ab',1,'libsemigroups::Congruence::test_equals()'],['../classlibsemigroups_1_1_r_w_s.html#ab1d2165ba89632cafd26516afc9b92e6',1,'libsemigroups::RWS::test_equals(word_t const &p, word_t const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ade2da2f20b02cea89071d23b63807336',1,'libsemigroups::RWS::test_equals(std::initializer_list< size_t > const &p, std::initializer_list< size_t > const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ae5af36b69c545bb50841e3ba298920ed',1,'libsemigroups::RWS::test_equals(std::string const &p, std::string const &q)'],['../classlibsemigroups_1_1_r_w_s.html#a305b6b531c0a18022e59d5820197e408',1,'libsemigroups::RWS::test_equals(std::string *p, std::string *q)']]], - ['test_5fless_5fthan',['test_less_than',['../classlibsemigroups_1_1_congruence.html#a0089f927db394dc009cb02c33d16957b',1,'libsemigroups::Congruence::test_less_than()'],['../classlibsemigroups_1_1_r_w_s.html#ab9c348979a879fdb0097b8fd065ccedd',1,'libsemigroups::RWS::test_less_than(word_t const &p, word_t const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ac4970eaeaec6d62257609353c12d0779',1,'libsemigroups::RWS::test_less_than(std::string const &p, std::string const &q)'],['../classlibsemigroups_1_1_r_w_s.html#ae3e7842adaf99ffc06f4bd20e3d08379',1,'libsemigroups::RWS::test_less_than(std::string *p, std::string *q)']]], - ['test_5fmembership',['test_membership',['../classlibsemigroups_1_1_semigroup.html#a94af9fb394e6a041e87440b221c2cbde',1,'libsemigroups::Semigroup']]], - ['threshold',['threshold',['../classlibsemigroups_1_1_semiring_with_threshold.html#a68424e8b30815f5676f6a13df460c050',1,'libsemigroups::SemiringWithThreshold']]], - ['tropicalmaxplussemiring',['TropicalMaxPlusSemiring',['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#ac291bba977a8ee73e154c7f8ebd4cbe6',1,'libsemigroups::TropicalMaxPlusSemiring']]], - ['tropicalminplussemiring',['TropicalMinPlusSemiring',['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#a91ca50d203ad3eea8cba941af246e2b5',1,'libsemigroups::TropicalMinPlusSemiring']]] -]; diff --git a/search/functions_12.html b/search/functions_12.html deleted file mode 100644 index 3235f8dcd..000000000 --- a/search/functions_12.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_12.js b/search/functions_12.js deleted file mode 100644 index deb4785f0..000000000 --- a/search/functions_12.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['uint_5fto_5frws_5fword',['uint_to_rws_word',['../classlibsemigroups_1_1_r_w_s.html#a4dbcc24a5e687062046b0a85d0b9959d',1,'libsemigroups::RWS']]] -]; diff --git a/search/functions_13.html b/search/functions_13.html deleted file mode 100644 index dce66cc4e..000000000 --- a/search/functions_13.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_13.js b/search/functions_13.js deleted file mode 100644 index 59fb3eacf..000000000 --- a/search/functions_13.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['vector_5fhash',['vector_hash',['../classlibsemigroups_1_1_element_with_vector_data.html#a8129a6b55198ff7210991dc4e3c6f6a9',1,'libsemigroups::ElementWithVectorData']]] -]; diff --git a/search/functions_14.html b/search/functions_14.html deleted file mode 100644 index 4c663fa5a..000000000 --- a/search/functions_14.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_14.js b/search/functions_14.js deleted file mode 100644 index 25709166b..000000000 --- a/search/functions_14.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['word_5fto_5fclass_5findex',['word_to_class_index',['../classlibsemigroups_1_1_congruence.html#a7b99b8f0ae4b36071a4541a89d66b1e3',1,'libsemigroups::Congruence']]], - ['word_5fto_5felement',['word_to_element',['../classlibsemigroups_1_1_semigroup.html#a60b8731b07a29256f4e56f88258a56e9',1,'libsemigroups::Semigroup']]], - ['word_5fto_5fpos',['word_to_pos',['../classlibsemigroups_1_1_semigroup.html#a68b9b1f8b4c11f3a317d6d47f4056ec0',1,'libsemigroups::Semigroup']]], - ['word_5fto_5frws_5fword',['word_to_rws_word',['../classlibsemigroups_1_1_r_w_s.html#a0c5378745d978de1e71e4ffe760f0682',1,'libsemigroups::RWS::word_to_rws_word(word_t const &w, rws_word_t *ww)'],['../classlibsemigroups_1_1_r_w_s.html#a090c712f8edd846b469ae8ea59ff52f5',1,'libsemigroups::RWS::word_to_rws_word(word_t const &w)']]] -]; diff --git a/search/functions_15.html b/search/functions_15.html deleted file mode 100644 index 071f6c4f7..000000000 --- a/search/functions_15.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_15.js b/search/functions_15.js deleted file mode 100644 index d1459557f..000000000 --- a/search/functions_15.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['zero',['zero',['../classlibsemigroups_1_1_semiring.html#a1a709cba3bf33c6dbcfe3a860080609f',1,'libsemigroups::Semiring::zero()'],['../classlibsemigroups_1_1_boolean_semiring.html#af11caf26a884e0dfb84df6022d4c4511',1,'libsemigroups::BooleanSemiring::zero()'],['../classlibsemigroups_1_1_integers.html#a69a4dec6764fb54566ca96538064cbc3',1,'libsemigroups::Integers::zero()'],['../classlibsemigroups_1_1_max_plus_semiring.html#aee4adfcb6028376a5254bc737d7f1d79',1,'libsemigroups::MaxPlusSemiring::zero()'],['../classlibsemigroups_1_1_min_plus_semiring.html#a5e93cbbc7549e4a23b367491db6b06c4',1,'libsemigroups::MinPlusSemiring::zero()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#a53b804252b2f806b8c3cf80eeedb5d50',1,'libsemigroups::TropicalMaxPlusSemiring::zero()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#a0aee99e3c460496b8935a398e634c849',1,'libsemigroups::TropicalMinPlusSemiring::zero()'],['../classlibsemigroups_1_1_natural_semiring.html#a207af462afe8dff0e97f1b6e04bf7d9b',1,'libsemigroups::NaturalSemiring::zero()']]] -]; diff --git a/search/functions_16.html b/search/functions_16.html deleted file mode 100644 index 185f97102..000000000 --- a/search/functions_16.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_16.js b/search/functions_16.js deleted file mode 100644 index 541a68a9b..000000000 --- a/search/functions_16.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['_7eblocks',['~Blocks',['../classlibsemigroups_1_1_blocks.html#a68f0ebf7dad1cc30f678f3f48d162534',1,'libsemigroups::Blocks']]], - ['_7econgruence',['~Congruence',['../classlibsemigroups_1_1_congruence.html#ae621bcc207c8ca59009774b4bb632252',1,'libsemigroups::Congruence']]], - ['_7eelement',['~Element',['../classlibsemigroups_1_1_element.html#ac58bb53f6bc9f2ff727561149806a4e1',1,'libsemigroups::Element']]], - ['_7epartition',['~Partition',['../classlibsemigroups_1_1_partition.html#a98344179957c245b7170ef197d079688',1,'libsemigroups::Partition']]], - ['_7erws',['~RWS',['../classlibsemigroups_1_1_r_w_s.html#acf41ccf045d547b3f3ba196818dffdf8',1,'libsemigroups::RWS']]], - ['_7esemigroup',['~Semigroup',['../classlibsemigroups_1_1_semigroup.html#a1ad56c6cad6baba69ae4c3e1c133b428',1,'libsemigroups::Semigroup']]], - ['_7esemiring',['~Semiring',['../classlibsemigroups_1_1_semiring.html#a4817406c9d2cd96309bd94150a94642e',1,'libsemigroups::Semiring']]] -]; diff --git a/search/functions_2.html b/search/functions_2.html deleted file mode 100644 index 2b44474ed..000000000 --- a/search/functions_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_2.js b/search/functions_2.js deleted file mode 100644 index dd2a575ed..000000000 --- a/search/functions_2.js +++ /dev/null @@ -1,27 +0,0 @@ -var searchData= -[ - ['cache_5fhash_5fvalue',['cache_hash_value',['../classlibsemigroups_1_1_element.html#a4728a734638c82ab334607d4d0e252d9',1,'libsemigroups::Element::cache_hash_value()'],['../classlibsemigroups_1_1_element_with_vector_data_default_hash.html#ade88206390c512f5df7d5095a15c2688',1,'libsemigroups::ElementWithVectorDataDefaultHash::cache_hash_value()'],['../classlibsemigroups_1_1_transformation.html#af6572f137e2f732bb17babf7bb1bd8e0',1,'libsemigroups::Transformation::cache_hash_value()'],['../classlibsemigroups_1_1_p_b_r.html#a95308103073c9e9003e3659d4b461270',1,'libsemigroups::PBR::cache_hash_value()'],['../classlibsemigroups_1_1_r_w_s_e.html#a67742b921e4e4305108d6d609f659edb',1,'libsemigroups::RWSE::cache_hash_value()']]], - ['cbegin',['cbegin',['../classlibsemigroups_1_1_blocks.html#ab47d56e6061957d69d5be70da3e29540',1,'libsemigroups::Blocks::cbegin()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a655deeca82b1514463e8ea09f31f2099',1,'libsemigroups::ElementWithVectorData::cbegin()'],['../classlibsemigroups_1_1_semigroup.html#a96c7cea0c406421ae408a097ab27e409',1,'libsemigroups::Semigroup::cbegin()']]], - ['cbegin_5fidempotents',['cbegin_idempotents',['../classlibsemigroups_1_1_semigroup.html#af1eda880e5e04a10a51fd07612a283e3',1,'libsemigroups::Semigroup']]], - ['cbegin_5fsorted',['cbegin_sorted',['../classlibsemigroups_1_1_semigroup.html#a49911287c884133f90ca897b40d44837',1,'libsemigroups::Semigroup']]], - ['cend',['cend',['../classlibsemigroups_1_1_blocks.html#ae5639d6f774ae1eef6cb37a64f638e6e',1,'libsemigroups::Blocks::cend()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a7d3b0a94d7bd283da3ae94d00adc46cd',1,'libsemigroups::ElementWithVectorData::cend()'],['../classlibsemigroups_1_1_semigroup.html#ac7deb5843d4f292bf7f86e9eedbedcde',1,'libsemigroups::Semigroup::cend()']]], - ['cend_5fidempotents',['cend_idempotents',['../classlibsemigroups_1_1_semigroup.html#a209d23c1a6251f8cbd78034f9e70a290',1,'libsemigroups::Semigroup']]], - ['cend_5fsorted',['cend_sorted',['../classlibsemigroups_1_1_semigroup.html#a2f29d0505a515c48c4cf0e28925117ed',1,'libsemigroups::Semigroup']]], - ['closure',['closure',['../classlibsemigroups_1_1_semigroup.html#ae0886a6e0f83043a64c70724e5fb0e2a',1,'libsemigroups::Semigroup::closure(std::vector< Element const * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#aaa7b06f11d65527be47efbd4d9af7be5',1,'libsemigroups::Semigroup::closure(std::vector< Element const * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#a4eba75a2573b70320a23200b262d9f69',1,'libsemigroups::Semigroup::closure(std::vector< Element * > const &coll)'],['../classlibsemigroups_1_1_semigroup.html#a239804cb3365c27ef457fe959cec4d42',1,'libsemigroups::Semigroup::closure(std::initializer_list< Element * > coll)']]], - ['complexity',['complexity',['../classlibsemigroups_1_1_element.html#ac7d80fabf8c999e505980ec0cf64a55a',1,'libsemigroups::Element::complexity()'],['../classlibsemigroups_1_1_partial_transformation.html#afa15923a885a868d93c61274af7ed250',1,'libsemigroups::PartialTransformation::complexity()'],['../classlibsemigroups_1_1_bipartition.html#a9c2d85b63c7cc86dcf00e00294bada0a',1,'libsemigroups::Bipartition::complexity()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a4d2657c411db437c5052cc2604d470e5',1,'libsemigroups::MatrixOverSemiringBase::complexity()'],['../classlibsemigroups_1_1_p_b_r.html#a29ca15c4dc467d79404eea9be0fffe92',1,'libsemigroups::PBR::complexity()'],['../classlibsemigroups_1_1_r_w_s_e.html#a22d26c23247724ae9f3ab3c33f7e66aa',1,'libsemigroups::RWSE::complexity()']]], - ['confluent',['confluent',['../classlibsemigroups_1_1_r_w_s.html#a372d5a21a588be7aba9a0432bc75a040',1,'libsemigroups::RWS']]], - ['congruence',['Congruence',['../classlibsemigroups_1_1_congruence.html#a0d6db1abda027e546dfd3ce79b4c9b40',1,'libsemigroups::Congruence::Congruence(std::string type, size_t nrgens, std::vector< relation_t > const &relations, std::vector< relation_t > const &extra)'],['../classlibsemigroups_1_1_congruence.html#a24124988c5bac0ced80a90b614ec0667',1,'libsemigroups::Congruence::Congruence(std::string type, Semigroup *semigroup, std::vector< relation_t > const &genpairs)']]], - ['const_5fnr_5fblocks',['const_nr_blocks',['../classlibsemigroups_1_1_bipartition.html#a8b36c764d850162da2de3a4a346a2411',1,'libsemigroups::Bipartition']]], - ['copy',['copy',['../classlibsemigroups_1_1_element.html#a97454c369aa06190a065ff07f7b4d305',1,'libsemigroups::Element::copy()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a2526b31b7ac53ed4ad7226db4fccfc73',1,'libsemigroups::ElementWithVectorData::copy()'],['../classlibsemigroups_1_1_r_w_s_e.html#aa9d833dd8767e11db31000601434fd78',1,'libsemigroups::RWSE::copy()']]], - ['copy_5fadd_5fgenerators',['copy_add_generators',['../classlibsemigroups_1_1_semigroup.html#a0016d9101ca6f61c681e50a542646b2a',1,'libsemigroups::Semigroup::copy_add_generators(std::vector< Element const * > const *coll) const'],['../classlibsemigroups_1_1_semigroup.html#ad4e7ba93d45b459c613b7041bd6a7ffd',1,'libsemigroups::Semigroup::copy_add_generators(std::vector< Element * > const *coll) const']]], - ['copy_5fclosure',['copy_closure',['../classlibsemigroups_1_1_semigroup.html#aa35464373bef6d88e3257a0b9dedccbf',1,'libsemigroups::Semigroup::copy_closure(std::vector< Element const * > const *coll)'],['../classlibsemigroups_1_1_semigroup.html#a0c70cf4360d248053c04dd02bb538759',1,'libsemigroups::Semigroup::copy_closure(std::vector< Element * > const *gens)']]], - ['crank',['crank',['../classlibsemigroups_1_1_partial_transformation.html#a00a8fe0dae843cd662f19fa826297b02',1,'libsemigroups::PartialTransformation::crank()'],['../classlibsemigroups_1_1_partial_perm.html#a05e3d3266873a57fd8c0266127d6a11e',1,'libsemigroups::PartialPerm::crank()']]], - ['crbegin',['crbegin',['../classlibsemigroups_1_1_semigroup.html#a3273921366affe7bcb3b0657063d0c14',1,'libsemigroups::Semigroup']]], - ['crbegin_5fsorted',['crbegin_sorted',['../classlibsemigroups_1_1_semigroup.html#a60fe96554a7f139e2f8a278e87c3ff84',1,'libsemigroups::Semigroup']]], - ['crend',['crend',['../classlibsemigroups_1_1_semigroup.html#af7d74537f5cf632d5c5edfc5fbe03ed0',1,'libsemigroups::Semigroup']]], - ['crend_5fsorted',['crend_sorted',['../classlibsemigroups_1_1_semigroup.html#a3484bf180c7c7aa06af09080affbafdf',1,'libsemigroups::Semigroup']]], - ['current_5fmax_5fword_5flength',['current_max_word_length',['../classlibsemigroups_1_1_semigroup.html#ae27b64c78b82236c611c8b82018d6243',1,'libsemigroups::Semigroup']]], - ['current_5fnrrules',['current_nrrules',['../classlibsemigroups_1_1_semigroup.html#a9254472e2374d27a915bd533103c8da0',1,'libsemigroups::Semigroup']]], - ['current_5fposition',['current_position',['../classlibsemigroups_1_1_semigroup.html#ae482b74384e30cc208d01c11ea398bd1',1,'libsemigroups::Semigroup']]], - ['current_5fsize',['current_size',['../classlibsemigroups_1_1_semigroup.html#ad1994e708194877086ebd926018ebc46',1,'libsemigroups::Semigroup']]] -]; diff --git a/search/functions_3.html b/search/functions_3.html deleted file mode 100644 index 3dca36715..000000000 --- a/search/functions_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_3.js b/search/functions_3.js deleted file mode 100644 index a8d8f5324..000000000 --- a/search/functions_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['degree',['degree',['../classlibsemigroups_1_1_blocks.html#a102af048c1616a2a11b05b13209825d7',1,'libsemigroups::Blocks::degree()'],['../classlibsemigroups_1_1_element.html#a737a5e72977f33f609b0e6f63032a5f2',1,'libsemigroups::Element::degree()'],['../classlibsemigroups_1_1_partial_transformation.html#a0bd8baf4e67f053f0769feb9c387b2e9',1,'libsemigroups::PartialTransformation::degree()'],['../classlibsemigroups_1_1_bipartition.html#ab5f6dcbac98a376fe2185eb84f568c08',1,'libsemigroups::Bipartition::degree()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a5bfc6d66ba97caa75bc1434bc9d251fc',1,'libsemigroups::MatrixOverSemiringBase::degree()'],['../classlibsemigroups_1_1_p_b_r.html#ac00b7be9ea91a21e0c6169cb5782151e',1,'libsemigroups::PBR::degree()'],['../classlibsemigroups_1_1_r_w_s_e.html#a2f010c018ff02159819d950b18b468e8',1,'libsemigroups::RWSE::degree()'],['../classlibsemigroups_1_1_semigroup.html#a2b72e8a7c0b68346aa40d049ab02667b',1,'libsemigroups::Semigroup::degree()']]] -]; diff --git a/search/functions_4.html b/search/functions_4.html deleted file mode 100644 index e713f2867..000000000 --- a/search/functions_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_4.js b/search/functions_4.js deleted file mode 100644 index 6d861335c..000000000 --- a/search/functions_4.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['element',['Element',['../classlibsemigroups_1_1_element.html#adf57e554749e9ff7c31ef66b1d061007',1,'libsemigroups::Element']]], - ['elementwithvectordata',['ElementWithVectorData',['../classlibsemigroups_1_1_element_with_vector_data.html#ae0905349f53e0b88ed4b513d4e43179e',1,'libsemigroups::ElementWithVectorData::ElementWithVectorData()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a48f10cb97d74321ee9d1689aede6d527',1,'libsemigroups::ElementWithVectorData::ElementWithVectorData(std::vector< TValueType > *vector)'],['../classlibsemigroups_1_1_element_with_vector_data.html#af10e2a99e40b9fcacd20c715aa4a6d5e',1,'libsemigroups::ElementWithVectorData::ElementWithVectorData(std::vector< TValueType > const &vector)']]], - ['end',['end',['../classlibsemigroups_1_1_element_with_vector_data.html#a33dc93536a69e300056a2f908040fe48',1,'libsemigroups::ElementWithVectorData::end()'],['../classlibsemigroups_1_1_semigroup.html#ad2e14f550c1437bbbcecf952f8c288a5',1,'libsemigroups::Semigroup::end()']]], - ['enumerate',['enumerate',['../classlibsemigroups_1_1_semigroup.html#a06f87daa414756f223752dbbc39af64a',1,'libsemigroups::Semigroup::enumerate(std::atomic< bool > &killed, size_t limit=LIMIT_MAX)'],['../classlibsemigroups_1_1_semigroup.html#aa10cbfb840851c3491426345697eda3f',1,'libsemigroups::Semigroup::enumerate(size_t limit=LIMIT_MAX)']]], - ['extra',['extra',['../classlibsemigroups_1_1_congruence.html#a5986461f0fff0c1f099f1cc3fa5b4006',1,'libsemigroups::Congruence']]] -]; diff --git a/search/functions_5.html b/search/functions_5.html deleted file mode 100644 index cfe6b17d9..000000000 --- a/search/functions_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_5.js b/search/functions_5.js deleted file mode 100644 index 33954c02c..000000000 --- a/search/functions_5.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['factorisation',['factorisation',['../classlibsemigroups_1_1_semigroup.html#a408dc3b7384564fe4dc2f1fc38756d4b',1,'libsemigroups::Semigroup::factorisation(word_t &word, element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a41c57b89206b7405dee14ddf445aba3d',1,'libsemigroups::Semigroup::factorisation(element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a85856608f1ceac60a9a712afcaf91dd1',1,'libsemigroups::Semigroup::factorisation(Element const *x)']]], - ['fast_5fproduct',['fast_product',['../classlibsemigroups_1_1_semigroup.html#ac7526b300e6a1d203e4c008897c6502a',1,'libsemigroups::Semigroup']]], - ['final_5fletter',['final_letter',['../classlibsemigroups_1_1_semigroup.html#a6e40db619cc7d1c20723111c102df746',1,'libsemigroups::Semigroup']]], - ['first_5fletter',['first_letter',['../classlibsemigroups_1_1_semigroup.html#a76a430aadd7cac7e3bc2c0c186fc3442',1,'libsemigroups::Semigroup']]], - ['force_5fkbfp',['force_kbfp',['../classlibsemigroups_1_1_congruence.html#a86117c2931d311212ffee204b6931447',1,'libsemigroups::Congruence']]], - ['force_5fkbp',['force_kbp',['../classlibsemigroups_1_1_congruence.html#af0ab1e6f67477f2e02c809290fdb8719',1,'libsemigroups::Congruence']]], - ['force_5fp',['force_p',['../classlibsemigroups_1_1_congruence.html#a43c54205d7fc9bb78de4b4d4ad1c90d5',1,'libsemigroups::Congruence']]], - ['force_5ftc',['force_tc',['../classlibsemigroups_1_1_congruence.html#a9cbab3bc96cf58789443d32de234a895',1,'libsemigroups::Congruence']]], - ['force_5ftc_5fprefill',['force_tc_prefill',['../classlibsemigroups_1_1_congruence.html#ac88fe9a292c5d07521d2781d9c57dcf0',1,'libsemigroups::Congruence']]] -]; diff --git a/search/functions_6.html b/search/functions_6.html deleted file mode 100644 index a78ec13f1..000000000 --- a/search/functions_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_6.js b/search/functions_6.js deleted file mode 100644 index d2541a27c..000000000 --- a/search/functions_6.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['gens',['gens',['../classlibsemigroups_1_1_semigroup.html#a17a3cae4f491f61bc425a9afa3e5b0d8',1,'libsemigroups::Semigroup']]], - ['get_5frws_5fword',['get_rws_word',['../classlibsemigroups_1_1_r_w_s_e.html#a7109667a83bc9450accf41b32bfaa471',1,'libsemigroups::RWSE']]], - ['get_5ftype',['get_type',['../classlibsemigroups_1_1_element.html#acded78064b859c0994c2ce8e1e7dd1da',1,'libsemigroups::Element']]] -]; diff --git a/search/functions_7.html b/search/functions_7.html deleted file mode 100644 index 7842361ff..000000000 --- a/search/functions_7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_7.js b/search/functions_7.js deleted file mode 100644 index 923a76e57..000000000 --- a/search/functions_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['hash_5fvalue',['hash_value',['../classlibsemigroups_1_1_blocks.html#ac028cf57e3089b7d1fce2173e13a4730',1,'libsemigroups::Blocks::hash_value()'],['../classlibsemigroups_1_1_element.html#a5f0550b30e74bf8c2369ebd244e0101d',1,'libsemigroups::Element::hash_value()']]] -]; diff --git a/search/functions_8.html b/search/functions_8.html deleted file mode 100644 index 48feafe56..000000000 --- a/search/functions_8.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_8.js b/search/functions_8.js deleted file mode 100644 index 92f6c75e8..000000000 --- a/search/functions_8.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['identity',['identity',['../classlibsemigroups_1_1_element.html#ae743eb1ec1f58c3eb0692bc375855782',1,'libsemigroups::Element::identity()'],['../classlibsemigroups_1_1_partial_transformation.html#a044ec7ba30e5feed49d22f17675df1c4',1,'libsemigroups::PartialTransformation::identity()'],['../classlibsemigroups_1_1_bipartition.html#a3aa33d602b446a3d5e604a711ee22580',1,'libsemigroups::Bipartition::identity()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a5fe6fa92374ec5ca0e323cb1d195f3f1',1,'libsemigroups::MatrixOverSemiringBase::identity()'],['../classlibsemigroups_1_1_p_b_r.html#a950ae28f8ad3e1eac7948949cb1df96a',1,'libsemigroups::PBR::identity()'],['../classlibsemigroups_1_1_r_w_s_e.html#aaceb5ece6a513cb81f9d855fab0a4e52',1,'libsemigroups::RWSE::identity()']]], - ['inverse',['inverse',['../classlibsemigroups_1_1_permutation.html#a55df7f37ecc1734494a1e28210d9bd7d',1,'libsemigroups::Permutation']]], - ['is_5fbegun',['is_begun',['../classlibsemigroups_1_1_semigroup.html#a764cce3e3e7f608cd4c73f8cf855a5b5',1,'libsemigroups::Semigroup']]], - ['is_5fdone',['is_done',['../classlibsemigroups_1_1_congruence.html#a587ff9d9c8790c99906f6125a103b467',1,'libsemigroups::Congruence::is_done()'],['../classlibsemigroups_1_1_semigroup.html#ae0fb57b49d829b61a367f002e941f9e1',1,'libsemigroups::Semigroup::is_done()']]], - ['is_5fidempotent',['is_idempotent',['../classlibsemigroups_1_1_semigroup.html#a969de4f01147cbdac6fcebe1715da19f',1,'libsemigroups::Semigroup']]], - ['is_5fobviously_5finfinite',['is_obviously_infinite',['../classlibsemigroups_1_1_congruence.html#afb2062a137745aa3749f52797797df61',1,'libsemigroups::Congruence']]], - ['is_5ftransverse_5fblock',['is_transverse_block',['../classlibsemigroups_1_1_blocks.html#a90ae2a49d2868b8fda5a720388f4ca99',1,'libsemigroups::Blocks::is_transverse_block()'],['../classlibsemigroups_1_1_bipartition.html#a092f53feb6a2746fb3a81fe5baa973d6',1,'libsemigroups::Bipartition::is_transverse_block()']]] -]; diff --git a/search/functions_9.html b/search/functions_9.html deleted file mode 100644 index 0f05a8ba4..000000000 --- a/search/functions_9.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_9.js b/search/functions_9.js deleted file mode 100644 index 124a309b2..000000000 --- a/search/functions_9.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['knuth_5fbendix',['knuth_bendix',['../classlibsemigroups_1_1_r_w_s.html#a82efcac80e8ed153e2aa2af86ef0ab3b',1,'libsemigroups::RWS::knuth_bendix()'],['../classlibsemigroups_1_1_r_w_s.html#addd52e5edbaf219714fbc6dcdbad2206',1,'libsemigroups::RWS::knuth_bendix(std::atomic< bool > &killed)']]], - ['knuth_5fbendix_5fby_5foverlap_5flength',['knuth_bendix_by_overlap_length',['../classlibsemigroups_1_1_r_w_s.html#abeda086a19c63b8747eded6bc357bd0c',1,'libsemigroups::RWS']]] -]; diff --git a/search/functions_a.html b/search/functions_a.html deleted file mode 100644 index 03faad22f..000000000 --- a/search/functions_a.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_a.js b/search/functions_a.js deleted file mode 100644 index dfea0608a..000000000 --- a/search/functions_a.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['left',['left',['../classlibsemigroups_1_1_semigroup.html#ae20823e7ce21c92f412d22821e7a4c05',1,'libsemigroups::Semigroup']]], - ['left_5fblocks',['left_blocks',['../classlibsemigroups_1_1_bipartition.html#a37a71b314e8f23f133c31833d243f73f',1,'libsemigroups::Bipartition']]], - ['left_5fcayley_5fgraph_5fcopy',['left_cayley_graph_copy',['../classlibsemigroups_1_1_semigroup.html#a1fb14978c8c5a12ff021d4bc8724238d',1,'libsemigroups::Semigroup']]], - ['length_5fconst',['length_const',['../classlibsemigroups_1_1_semigroup.html#a6802258d9e52bd9514e74e62be49cd38',1,'libsemigroups::Semigroup']]], - ['length_5fnon_5fconst',['length_non_const',['../classlibsemigroups_1_1_semigroup.html#a879cad49983adfb4c682df35e5efad4e',1,'libsemigroups::Semigroup']]], - ['letter_5fto_5fpos',['letter_to_pos',['../classlibsemigroups_1_1_semigroup.html#aa16f101fb96bd2b8a6f25a53cd9b3e14',1,'libsemigroups::Semigroup']]], - ['lookup',['lookup',['../classlibsemigroups_1_1_blocks.html#a803b82f36e1d33647db8c65e7394103a',1,'libsemigroups::Blocks']]] -]; diff --git a/search/functions_b.html b/search/functions_b.html deleted file mode 100644 index c690013ae..000000000 --- a/search/functions_b.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_b.js b/search/functions_b.js deleted file mode 100644 index 20d4168f2..000000000 --- a/search/functions_b.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['matrixoversemiringbase',['MatrixOverSemiringBase',['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a99fee19c8ce933e2473afc16924f2f3f',1,'libsemigroups::MatrixOverSemiringBase::MatrixOverSemiringBase(std::vector< TValueType > *matrix, Semiring< TValueType > const *semiring)'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a0ea7d30dcc61d160462835cffed2a2aa',1,'libsemigroups::MatrixOverSemiringBase::MatrixOverSemiringBase(std::vector< std::vector< TValueType >> const &matrix, Semiring< TValueType > const *semiring)'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#af72c7f10db4c290c5d21e0b3697a6eae',1,'libsemigroups::MatrixOverSemiringBase::MatrixOverSemiringBase(std::vector< TValueType > *matrix)']]], - ['minimal_5ffactorisation',['minimal_factorisation',['../classlibsemigroups_1_1_semigroup.html#a778113085c6881f60f24856e1f8a9d9f',1,'libsemigroups::Semigroup::minimal_factorisation(word_t &word, element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a57243f01c2ae3ec00382b7fa01eac493',1,'libsemigroups::Semigroup::minimal_factorisation(element_index_t pos)'],['../classlibsemigroups_1_1_semigroup.html#a2de1f5c4422b5c1bd416123a40777f7d',1,'libsemigroups::Semigroup::minimal_factorisation(Element const *x)']]] -]; diff --git a/search/functions_c.html b/search/functions_c.html deleted file mode 100644 index 3b2976a04..000000000 --- a/search/functions_c.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_c.js b/search/functions_c.js deleted file mode 100644 index 23a92101f..000000000 --- a/search/functions_c.js +++ /dev/null @@ -1,14 +0,0 @@ -var searchData= -[ - ['naturalsemiring',['NaturalSemiring',['../classlibsemigroups_1_1_natural_semiring.html#a28d50165b4edcaabad3c5e3377d4e309',1,'libsemigroups::NaturalSemiring']]], - ['next_5frelation',['next_relation',['../classlibsemigroups_1_1_semigroup.html#a255474c37d0e80f014cd9dba31e588f9',1,'libsemigroups::Semigroup']]], - ['nontrivial_5fclasses',['nontrivial_classes',['../classlibsemigroups_1_1_congruence.html#a630579855342bd38f92892e55bed8ba3',1,'libsemigroups::Congruence']]], - ['nr_5fblocks',['nr_blocks',['../classlibsemigroups_1_1_blocks.html#a48532c2e036635ffa87cc6f17bbe00c9',1,'libsemigroups::Blocks::nr_blocks()'],['../classlibsemigroups_1_1_bipartition.html#ac9639f4eff9f17fa53b4cd5451a4e34a',1,'libsemigroups::Bipartition::nr_blocks()']]], - ['nr_5fclasses',['nr_classes',['../classlibsemigroups_1_1_congruence.html#a39613081e66416205cdcb8a49f4b7eb5',1,'libsemigroups::Congruence']]], - ['nr_5fleft_5fblocks',['nr_left_blocks',['../classlibsemigroups_1_1_bipartition.html#af75d413f4a859f87d88cb02a2388d10c',1,'libsemigroups::Bipartition']]], - ['nr_5fright_5fblocks',['nr_right_blocks',['../classlibsemigroups_1_1_bipartition.html#a1a9c3dc1dff0493d2c4f73999fc7bb09',1,'libsemigroups::Bipartition']]], - ['nr_5frules',['nr_rules',['../classlibsemigroups_1_1_r_w_s.html#a42857dac79a8289ae354daa8f3c91f86',1,'libsemigroups::RWS']]], - ['nrgens',['nrgens',['../classlibsemigroups_1_1_semigroup.html#a0bdd64f5292f19094cb58b7e747d8e2a',1,'libsemigroups::Semigroup']]], - ['nridempotents',['nridempotents',['../classlibsemigroups_1_1_semigroup.html#ab9cac1d593654e14a1fe6c9746f7eb9b',1,'libsemigroups::Semigroup']]], - ['nrrules',['nrrules',['../classlibsemigroups_1_1_semigroup.html#ab49234bc5f18016a360b5c124575023b',1,'libsemigroups::Semigroup']]] -]; diff --git a/search/functions_d.html b/search/functions_d.html deleted file mode 100644 index 0c542463f..000000000 --- a/search/functions_d.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_d.js b/search/functions_d.js deleted file mode 100644 index de02f83be..000000000 --- a/search/functions_d.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['one',['one',['../classlibsemigroups_1_1_semiring.html#a4ac1c58a9e4de40fecd3d8193a244867',1,'libsemigroups::Semiring::one()'],['../classlibsemigroups_1_1_boolean_semiring.html#a204070674dd77394fb78805bd8074271',1,'libsemigroups::BooleanSemiring::one()'],['../classlibsemigroups_1_1_integers.html#a6a6df7012e9b55ed8d0a03983aedf290',1,'libsemigroups::Integers::one()'],['../classlibsemigroups_1_1_max_plus_semiring.html#a2ef2c57c5105ba8e3ef894c99f1a0811',1,'libsemigroups::MaxPlusSemiring::one()'],['../classlibsemigroups_1_1_min_plus_semiring.html#aebd93d884a65c4103b0205e187272f79',1,'libsemigroups::MinPlusSemiring::one()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#aa4399c630b85dccd55723f7aec5eb36d',1,'libsemigroups::TropicalMaxPlusSemiring::one()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#adf3945e2e3660adbcf035cb7f14f2167',1,'libsemigroups::TropicalMinPlusSemiring::one()'],['../classlibsemigroups_1_1_natural_semiring.html#a4a6ed2418e42075314d5b3cabb543870',1,'libsemigroups::NaturalSemiring::one()']]], - ['operator_28_29',['operator()',['../structlibsemigroups_1_1_element_1_1_equal.html#abd614c8e3afc57f36780fa8592f89683',1,'libsemigroups::Element::Equal::operator()()'],['../structlibsemigroups_1_1_element_1_1_hash.html#a08afb7161bae830004a1cf9b65937ce5',1,'libsemigroups::Element::Hash::operator()()'],['../classlibsemigroups_1_1_reduction_ordering.html#af88626b1fa2c35a83becf7fd28ec5f3b',1,'libsemigroups::ReductionOrdering::operator()(std::string const *p, std::string const *q) const'],['../classlibsemigroups_1_1_reduction_ordering.html#a8a62b3659bf1679abff7273cd9a7cae7',1,'libsemigroups::ReductionOrdering::operator()(std::string const &p, std::string const &q) const']]], - ['operator_3c',['operator<',['../classlibsemigroups_1_1_blocks.html#ac32c12a23254717892e2a331d8a26b84',1,'libsemigroups::Blocks::operator<()'],['../classlibsemigroups_1_1_element.html#afeb110ce478a2b48559dd39d840efe88',1,'libsemigroups::Element::operator<()'],['../classlibsemigroups_1_1_element_with_vector_data.html#ad67eb351c351edc9d485ce25172c931e',1,'libsemigroups::ElementWithVectorData::operator<()'],['../classlibsemigroups_1_1_partial_perm.html#a39f2e4ce35f76cb1c8680a9094bde058',1,'libsemigroups::PartialPerm::operator<()'],['../classlibsemigroups_1_1_r_w_s_e.html#a34a53e299726c8dc0c293b5778670b68',1,'libsemigroups::RWSE::operator<()']]], - ['operator_3c_3c',['operator<<',['../namespacelibsemigroups.html#aeb9b1bf517f644c176c8ecaa000bc2c2',1,'libsemigroups']]], - ['operator_3d',['operator=',['../classlibsemigroups_1_1_blocks.html#a0e06f4e3826207dd01baf7f7473b4f14',1,'libsemigroups::Blocks::operator=()'],['../classlibsemigroups_1_1_partition.html#a6cdadd38b772e76d3e6d8bf7b0c310cd',1,'libsemigroups::Partition::operator=()'],['../classlibsemigroups_1_1_semigroup.html#a6fabfc3c4bd4ae5711c8097563069480',1,'libsemigroups::Semigroup::operator=()']]], - ['operator_3d_3d',['operator==',['../classlibsemigroups_1_1_blocks.html#a2a92ebd88e7d58c14535fb140641eaf3',1,'libsemigroups::Blocks::operator==()'],['../classlibsemigroups_1_1_element.html#a25a0e55948c36873b57baae572ca11ef',1,'libsemigroups::Element::operator==()'],['../classlibsemigroups_1_1_element_with_vector_data.html#ac1d65b514cff79dd7f33ea0c6459c017',1,'libsemigroups::ElementWithVectorData::operator==()'],['../classlibsemigroups_1_1_r_w_s_e.html#ab2593bb56f887ad21e1c69435a20891a',1,'libsemigroups::RWSE::operator==()']]], - ['operator_5b_5d',['operator[]',['../classlibsemigroups_1_1_element_with_vector_data.html#aeba5c0adf85e0e11632e84a12b76f0b5',1,'libsemigroups::ElementWithVectorData::operator[]()'],['../classlibsemigroups_1_1_partition.html#a8d4353d5e6aad8f162f5b47fed8e3ee7',1,'libsemigroups::Partition::operator[]()'],['../classlibsemigroups_1_1_semigroup.html#a4381bc1558c1ff2bf628200710afc782',1,'libsemigroups::Semigroup::operator[]()']]] -]; diff --git a/search/functions_e.html b/search/functions_e.html deleted file mode 100644 index c1bd8701e..000000000 --- a/search/functions_e.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_e.js b/search/functions_e.js deleted file mode 100644 index e383c8541..000000000 --- a/search/functions_e.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['partialperm',['PartialPerm',['../classlibsemigroups_1_1_partial_perm.html#a4dee1c268b873aeaa506b833acf2e4c0',1,'libsemigroups::PartialPerm']]], - ['partition',['Partition',['../classlibsemigroups_1_1_partition.html#aeb0903ee5928f2d230159a2ff6a881e9',1,'libsemigroups::Partition::Partition(size_t nr_parts=0)'],['../classlibsemigroups_1_1_partition.html#a6de1ae95123f8b78bd022af9327924d6',1,'libsemigroups::Partition::Partition(std::vector< std::vector< T * > * > *parts)'],['../classlibsemigroups_1_1_partition.html#ad377300387c4f34e0e82b445aba17c25',1,'libsemigroups::Partition::Partition(Partition const &copy)=delete']]], - ['period',['period',['../classlibsemigroups_1_1_natural_semiring.html#a8f8e52280bde1cbb9939c60c68272b0f',1,'libsemigroups::NaturalSemiring']]], - ['plus',['plus',['../classlibsemigroups_1_1_semiring.html#a8268dcbdb28cd3eb4b10ea78a769a9f1',1,'libsemigroups::Semiring::plus()'],['../classlibsemigroups_1_1_boolean_semiring.html#ae11b725fd37230fbc9d2e6dbce99bf1b',1,'libsemigroups::BooleanSemiring::plus()'],['../classlibsemigroups_1_1_integers.html#a3f259ae77b7fe715fac94db74c5884e2',1,'libsemigroups::Integers::plus()'],['../classlibsemigroups_1_1_max_plus_semiring.html#a46e13ae2d5b12cea03cc5b9e859d0fc8',1,'libsemigroups::MaxPlusSemiring::plus()'],['../classlibsemigroups_1_1_min_plus_semiring.html#ab15c6276236f3e879887fc528b58343e',1,'libsemigroups::MinPlusSemiring::plus()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#a810835814e261615abee7e6af4b75603',1,'libsemigroups::TropicalMaxPlusSemiring::plus()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#add232fd577e1d6896aa1dcd0ca5c296e',1,'libsemigroups::TropicalMinPlusSemiring::plus()'],['../classlibsemigroups_1_1_natural_semiring.html#aa0c4db945c1c462a189d6438d3d2a652',1,'libsemigroups::NaturalSemiring::plus()']]], - ['position',['position',['../classlibsemigroups_1_1_semigroup.html#a372ab9b712adaa5c02d6efff4e06b02e',1,'libsemigroups::Semigroup']]], - ['position_5fto_5fsorted_5fposition',['position_to_sorted_position',['../classlibsemigroups_1_1_semigroup.html#ae632fd021542e0ca7bca4118858f3cce',1,'libsemigroups::Semigroup']]], - ['prefix',['prefix',['../classlibsemigroups_1_1_semigroup.html#a824fb0c7978b18e11d3377f34babc7e1',1,'libsemigroups::Semigroup']]], - ['prod',['prod',['../classlibsemigroups_1_1_semiring.html#a0840a9334c665500c6ff3d805d0fe8fb',1,'libsemigroups::Semiring::prod()'],['../classlibsemigroups_1_1_boolean_semiring.html#a71826ae808c241009a1ee44ad13814d8',1,'libsemigroups::BooleanSemiring::prod()'],['../classlibsemigroups_1_1_integers.html#aead0cfe38d22298c69a528eee4ada5a7',1,'libsemigroups::Integers::prod()'],['../classlibsemigroups_1_1_max_plus_semiring.html#ac2b4e113e081619812f5d5c2d86c29b7',1,'libsemigroups::MaxPlusSemiring::prod()'],['../classlibsemigroups_1_1_min_plus_semiring.html#ad6a02b8b3e3aec39f9d3448a410cf9a9',1,'libsemigroups::MinPlusSemiring::prod()'],['../classlibsemigroups_1_1_tropical_max_plus_semiring.html#a510772e78d13e83b5f559e168d5ab825',1,'libsemigroups::TropicalMaxPlusSemiring::prod()'],['../classlibsemigroups_1_1_tropical_min_plus_semiring.html#ad8161abb7ac3cd79c0ed45511420f59d',1,'libsemigroups::TropicalMinPlusSemiring::prod()'],['../classlibsemigroups_1_1_natural_semiring.html#abf714093161b6ebb78bddce8bf5c8503',1,'libsemigroups::NaturalSemiring::prod()']]], - ['product_5fby_5freduction',['product_by_reduction',['../classlibsemigroups_1_1_semigroup.html#a399a8a21449e1370483abc5c237b3f74',1,'libsemigroups::Semigroup']]], - ['projectivemaxplusmatrix',['ProjectiveMaxPlusMatrix',['../classlibsemigroups_1_1_projective_max_plus_matrix.html#a346213d53bd22a29ccbf66df4488b14e',1,'libsemigroups::ProjectiveMaxPlusMatrix::ProjectiveMaxPlusMatrix(std::vector< int64_t > *matrix, Semiring< int64_t > const *semiring)'],['../classlibsemigroups_1_1_projective_max_plus_matrix.html#a6effe78566f6a5ac36a0ea61f0e69e86',1,'libsemigroups::ProjectiveMaxPlusMatrix::ProjectiveMaxPlusMatrix(std::vector< std::vector< int64_t >> const &matrix, Semiring< int64_t > const *semiring)']]] -]; diff --git a/search/functions_f.html b/search/functions_f.html deleted file mode 100644 index 38b6e817c..000000000 --- a/search/functions_f.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_f.js b/search/functions_f.js deleted file mode 100644 index fa99c667a..000000000 --- a/search/functions_f.js +++ /dev/null @@ -1,21 +0,0 @@ -var searchData= -[ - ['rank',['rank',['../classlibsemigroups_1_1_blocks.html#a99fd0229618dd1412dd987153215d8a0',1,'libsemigroups::Blocks::rank()'],['../classlibsemigroups_1_1_bipartition.html#a29288169ff60a6ed33eee184b034571a',1,'libsemigroups::Bipartition::rank()']]], - ['really_5fcopy',['really_copy',['../classlibsemigroups_1_1_element.html#a0a1f3eccf338d58746123e8a0e5e5998',1,'libsemigroups::Element::really_copy()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a72f340f4b58c7f82c8fff7636af34657',1,'libsemigroups::ElementWithVectorData::really_copy()'],['../classlibsemigroups_1_1_transformation.html#a35bf7a0011ea723c4f242205f23786ee',1,'libsemigroups::Transformation::really_copy()'],['../classlibsemigroups_1_1_partial_perm.html#a42cfb120351a7d84fdb7eb197b6c28b3',1,'libsemigroups::PartialPerm::really_copy()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a432f2a97ddaa83b84501121407a455aa',1,'libsemigroups::MatrixOverSemiringBase::really_copy()'],['../classlibsemigroups_1_1_r_w_s_e.html#a59a9e717837f63d9faed1e7ec59ef3c7',1,'libsemigroups::RWSE::really_copy()']]], - ['really_5fdelete',['really_delete',['../classlibsemigroups_1_1_element.html#a0744b0fbe4cc4bd34b03a006731c0ab2',1,'libsemigroups::Element::really_delete()'],['../classlibsemigroups_1_1_element_with_vector_data.html#a426b7c1e1c18388fbffe0daf2a62a3e4',1,'libsemigroups::ElementWithVectorData::really_delete()'],['../classlibsemigroups_1_1_r_w_s_e.html#a60d5764a57e1e65deaf908b4675f93b6',1,'libsemigroups::RWSE::really_delete()']]], - ['redefine',['redefine',['../classlibsemigroups_1_1_element.html#a411bfadc8f2e9def9b916fe742c11d37',1,'libsemigroups::Element::redefine(Element const *x, Element const *y)'],['../classlibsemigroups_1_1_element.html#a9705463d4f873f2b4e30d0d05a043065',1,'libsemigroups::Element::redefine(Element const *x, Element const *y, size_t const &thread_id)'],['../classlibsemigroups_1_1_transformation.html#af890d498146769967dd12eac375a51a1',1,'libsemigroups::Transformation::redefine()'],['../classlibsemigroups_1_1_partial_perm.html#a4c67e5cab8dd171eb725721709da00ff',1,'libsemigroups::PartialPerm::redefine()'],['../classlibsemigroups_1_1_bipartition.html#af697b258c43ce04b655c5a5d5948747b',1,'libsemigroups::Bipartition::redefine()'],['../classlibsemigroups_1_1_matrix_over_semiring_base.html#a8dc8c2ef60248c995507a2126fc641a3',1,'libsemigroups::MatrixOverSemiringBase::redefine()'],['../classlibsemigroups_1_1_boolean_mat.html#a9a1618cd6421acd618365ef9c06bbcb3',1,'libsemigroups::BooleanMat::redefine()'],['../classlibsemigroups_1_1_p_b_r.html#a3cfa8a851a14f59d76e5eaf540238101',1,'libsemigroups::PBR::redefine()'],['../classlibsemigroups_1_1_r_w_s_e.html#a71ab5e7cbbd269ef787086048c311d4a',1,'libsemigroups::RWSE::redefine()']]], - ['reductionordering',['ReductionOrdering',['../classlibsemigroups_1_1_reduction_ordering.html#a01036d0521737a5d3f8f9e6ea9be4d8b',1,'libsemigroups::ReductionOrdering']]], - ['relations',['relations',['../classlibsemigroups_1_1_congruence.html#aa16ba212d40ee46241ddaf61e1ccb9f6',1,'libsemigroups::Congruence']]], - ['reserve',['reserve',['../classlibsemigroups_1_1_semigroup.html#a0bc125204bf434124c1ca0200aec25cf',1,'libsemigroups::Semigroup']]], - ['reset_5fhash_5fvalue',['reset_hash_value',['../classlibsemigroups_1_1_element.html#a19e53333fad80c753b2a0918595b8f9e',1,'libsemigroups::Element']]], - ['reset_5fnext_5frelation',['reset_next_relation',['../classlibsemigroups_1_1_semigroup.html#ae3debdbc4c4feb1330fcea98f8ed5951',1,'libsemigroups::Semigroup']]], - ['rewrite',['rewrite',['../classlibsemigroups_1_1_r_w_s.html#a37c421016dd03c1a0a9b004b1ccc274c',1,'libsemigroups::RWS::rewrite(std::string *w) const'],['../classlibsemigroups_1_1_r_w_s.html#ade1d0559f7ab73323075868ac0c3f6d9',1,'libsemigroups::RWS::rewrite(std::string w) const']]], - ['right',['right',['../classlibsemigroups_1_1_semigroup.html#a0a8d05a3c0b9e7f27a2fe212216e60e7',1,'libsemigroups::Semigroup']]], - ['right_5fblocks',['right_blocks',['../classlibsemigroups_1_1_bipartition.html#a7610c0525f618306f733203d7bf3e899',1,'libsemigroups::Bipartition']]], - ['right_5fcayley_5fgraph_5fcopy',['right_cayley_graph_copy',['../classlibsemigroups_1_1_semigroup.html#ab72b9ac6e036a24f8d7c2dd617878cd2',1,'libsemigroups::Semigroup']]], - ['rule',['rule',['../classlibsemigroups_1_1_r_w_s.html#a3277fbd45d6913969e4378a4e8167deb',1,'libsemigroups::RWS']]], - ['rules',['rules',['../classlibsemigroups_1_1_r_w_s.html#a976158da9f3dd6d6023f5bbc849bc702',1,'libsemigroups::RWS']]], - ['rws',['RWS',['../classlibsemigroups_1_1_r_w_s.html#aa578bbd69ebbf35a8d7d5d289761ca24',1,'libsemigroups::RWS::RWS(ReductionOrdering *order, std::string alphabet=STANDARD_ALPHABET)'],['../classlibsemigroups_1_1_r_w_s.html#a5db49ed901143b65fb634d1a3f211b08',1,'libsemigroups::RWS::RWS()'],['../classlibsemigroups_1_1_r_w_s.html#a61eb014fd6110806ec8b5345e1a35661',1,'libsemigroups::RWS::RWS(std::string alphabet)'],['../classlibsemigroups_1_1_r_w_s.html#a1a01e5c70f95fad332f8db267b1e59b9',1,'libsemigroups::RWS::RWS(std::vector< relation_t > const &relations)'],['../classlibsemigroups_1_1_r_w_s.html#a279cdc4ed164ce8ad5807767f8f7e0c4',1,'libsemigroups::RWS::RWS(ReductionOrdering *order, std::vector< relation_t > const &relations)'],['../classlibsemigroups_1_1_r_w_s.html#aab0e01967cbd730d3121e4a891abca6f',1,'libsemigroups::RWS::RWS(Congruence &cong)']]], - ['rws_5fword_5fto_5fword',['rws_word_to_word',['../classlibsemigroups_1_1_r_w_s.html#a76b13cfa822508d87a7daf5211bb25e9',1,'libsemigroups::RWS']]], - ['rwse',['RWSE',['../classlibsemigroups_1_1_r_w_s_e.html#a2ea9e2a1d01ac3cb7f3636a367c73f0d',1,'libsemigroups::RWSE::RWSE(RWS *rws, rws_word_t *w)'],['../classlibsemigroups_1_1_r_w_s_e.html#aa7037daa47396e868f649832e117057a',1,'libsemigroups::RWSE::RWSE(RWS &rws, rws_word_t const &w)'],['../classlibsemigroups_1_1_r_w_s_e.html#abebc299bd774a6440f66c19876ff8d17',1,'libsemigroups::RWSE::RWSE(RWS &rws, letter_t const &a)'],['../classlibsemigroups_1_1_r_w_s_e.html#ad5dcb3b9cd2de039adf80ef4cc44ed14',1,'libsemigroups::RWSE::RWSE(RWS &rws, word_t const &w)']]] -]; diff --git a/search/mag_sel.png b/search/mag_sel.png deleted file mode 100644 index 39c0ed52a..000000000 Binary files a/search/mag_sel.png and /dev/null differ diff --git a/search/namespaces_0.html b/search/namespaces_0.html deleted file mode 100644 index c53453791..000000000 --- a/search/namespaces_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/namespaces_0.js b/search/namespaces_0.js deleted file mode 100644 index cc01a6581..000000000 --- a/search/namespaces_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['libsemigroups',['libsemigroups',['../namespacelibsemigroups.html',1,'']]] -]; diff --git a/search/nomatches.html b/search/nomatches.html deleted file mode 100644 index 437732089..000000000 --- a/search/nomatches.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -
    -
    No Matches
    -
    - - diff --git a/search/pages_0.html b/search/pages_0.html deleted file mode 100644 index 3d06b0521..000000000 --- a/search/pages_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/pages_0.js b/search/pages_0.js deleted file mode 100644 index 1f7e4374e..000000000 --- a/search/pages_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['libsemigroups_20_2d_20c_2b_2b_20library_20for_20semigroups_20and_20monoids_20_2d_20version_200_2e6_2e7',['libsemigroups - C++ library for semigroups and monoids - Version 0.6.7',['../index.html',1,'']]] -]; diff --git a/search/related_0.html b/search/related_0.html deleted file mode 100644 index 8ee34ff8c..000000000 --- a/search/related_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/related_0.js b/search/related_0.js deleted file mode 100644 index 9923ad40a..000000000 --- a/search/related_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['operator_3c_3c',['operator<<',['../classlibsemigroups_1_1_r_w_s.html#a3bc8666a861824eef973c99859e5df44',1,'libsemigroups::RWS']]] -]; diff --git a/search/search.css b/search/search.css deleted file mode 100644 index 3cf9df94a..000000000 --- a/search/search.css +++ /dev/null @@ -1,271 +0,0 @@ -/*---------------- Search Box */ - -#FSearchBox { - float: left; -} - -#MSearchBox { - white-space : nowrap; - float: none; - margin-top: 8px; - right: 0px; - width: 170px; - height: 24px; - z-index: 102; -} - -#MSearchBox .left -{ - display:block; - position:absolute; - left:10px; - width:20px; - height:19px; - background:url('search_l.png') no-repeat; - background-position:right; -} - -#MSearchSelect { - display:block; - position:absolute; - width:20px; - height:19px; -} - -.left #MSearchSelect { - left:4px; -} - -.right #MSearchSelect { - right:5px; -} - -#MSearchField { - display:block; - position:absolute; - height:19px; - background:url('search_m.png') repeat-x; - border:none; - width:115px; - margin-left:20px; - padding-left:4px; - color: #909090; - outline: none; - font: 9pt Arial, Verdana, sans-serif; - -webkit-border-radius: 0px; -} - -#FSearchBox #MSearchField { - margin-left:15px; -} - -#MSearchBox .right { - display:block; - position:absolute; - right:10px; - top:8px; - width:20px; - height:19px; - background:url('search_r.png') no-repeat; - background-position:left; -} - -#MSearchClose { - display: none; - position: absolute; - top: 4px; - background : none; - border: none; - margin: 0px 4px 0px 0px; - padding: 0px 0px; - outline: none; -} - -.left #MSearchClose { - left: 6px; -} - -.right #MSearchClose { - right: 2px; -} - -.MSearchBoxActive #MSearchField { - color: #000000; -} - -/*---------------- Search filter selection */ - -#MSearchSelectWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #90A5CE; - background-color: #F9FAFC; - z-index: 10001; - padding-top: 4px; - padding-bottom: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -.SelectItem { - font: 8pt Arial, Verdana, sans-serif; - padding-left: 2px; - padding-right: 12px; - border: 0px; -} - -span.SelectionMark { - margin-right: 4px; - font-family: monospace; - outline-style: none; - text-decoration: none; -} - -a.SelectItem { - display: block; - outline-style: none; - color: #000000; - text-decoration: none; - padding-left: 6px; - padding-right: 12px; -} - -a.SelectItem:focus, -a.SelectItem:active { - color: #000000; - outline-style: none; - text-decoration: none; -} - -a.SelectItem:hover { - color: #FFFFFF; - background-color: #3D578C; - outline-style: none; - text-decoration: none; - cursor: pointer; - display: block; -} - -/*---------------- Search results window */ - -iframe#MSearchResults { - width: 60ex; - height: 15em; -} - -#MSearchResultsWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #000; - background-color: #EEF1F7; - z-index:10000; -} - -/* ----------------------------------- */ - - -#SRIndex { - clear:both; - padding-bottom: 15px; -} - -.SREntry { - font-size: 10pt; - padding-left: 1ex; -} - -.SRPage .SREntry { - font-size: 8pt; - padding: 1px 5px; -} - -body.SRPage { - margin: 5px 2px; -} - -.SRChildren { - padding-left: 3ex; padding-bottom: .5em -} - -.SRPage .SRChildren { - display: none; -} - -.SRSymbol { - font-weight: bold; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRScope { - display: block; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRSymbol:focus, a.SRSymbol:active, -a.SRScope:focus, a.SRScope:active { - text-decoration: underline; -} - -span.SRScope { - padding-left: 4px; -} - -.SRPage .SRStatus { - padding: 2px 5px; - font-size: 8pt; - font-style: italic; -} - -.SRResult { - display: none; -} - -DIV.searchresults { - margin-left: 10px; - margin-right: 10px; -} - -/*---------------- External search page results */ - -.searchresult { - background-color: #F0F3F8; -} - -.pages b { - color: white; - padding: 5px 5px 3px 5px; - background-image: url("../tab_a.png"); - background-repeat: repeat-x; - text-shadow: 0 1px 1px #000000; -} - -.pages { - line-height: 17px; - margin-left: 4px; - text-decoration: none; -} - -.hl { - font-weight: bold; -} - -#searchresults { - margin-bottom: 20px; -} - -.searchpages { - margin-top: 10px; -} - diff --git a/search/search.js b/search/search.js deleted file mode 100644 index a554ab9cb..000000000 --- a/search/search.js +++ /dev/null @@ -1,814 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -function convertToId(search) -{ - var result = ''; - for (i=0;i do a search - { - this.Search(); - } - } - - this.OnSearchSelectKey = function(evt) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) // Up - { - this.searchIndex--; - this.OnSelectItem(this.searchIndex); - } - else if (e.keyCode==13 || e.keyCode==27) - { - this.OnSelectItem(this.searchIndex); - this.CloseSelectionWindow(); - this.DOMSearchField().focus(); - } - return false; - } - - // --------- Actions - - // Closes the results window. - this.CloseResultsWindow = function() - { - this.DOMPopupSearchResultsWindow().style.display = 'none'; - this.DOMSearchClose().style.display = 'none'; - this.Activate(false); - } - - this.CloseSelectionWindow = function() - { - this.DOMSearchSelectWindow().style.display = 'none'; - } - - // Performs a search. - this.Search = function() - { - this.keyTimeout = 0; - - // strip leading whitespace - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - - var code = searchValue.toLowerCase().charCodeAt(0); - var idxChar = searchValue.substr(0, 1).toLowerCase(); - if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair - { - idxChar = searchValue.substr(0, 2); - } - - var resultsPage; - var resultsPageWithSearch; - var hasResultsPage; - - var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); - if (idx!=-1) - { - var hexCode=idx.toString(16); - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; - resultsPageWithSearch = resultsPage+'?'+escape(searchValue); - hasResultsPage = true; - } - else // nothing available for this search term - { - resultsPage = this.resultsPath + '/nomatches.html'; - resultsPageWithSearch = resultsPage; - hasResultsPage = false; - } - - window.frames.MSearchResults.location = resultsPageWithSearch; - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - - if (domPopupSearchResultsWindow.style.display!='block') - { - var domSearchBox = this.DOMSearchBox(); - this.DOMSearchClose().style.display = 'inline'; - if (this.insideFrame) - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - domPopupSearchResultsWindow.style.position = 'relative'; - domPopupSearchResultsWindow.style.display = 'block'; - var width = document.body.clientWidth - 8; // the -8 is for IE :-( - domPopupSearchResultsWindow.style.width = width + 'px'; - domPopupSearchResults.style.width = width + 'px'; - } - else - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; - var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; - domPopupSearchResultsWindow.style.display = 'block'; - left -= domPopupSearchResults.offsetWidth; - domPopupSearchResultsWindow.style.top = top + 'px'; - domPopupSearchResultsWindow.style.left = left + 'px'; - } - } - - this.lastSearchValue = searchValue; - this.lastResultsPage = resultsPage; - } - - // -------- Activation Functions - - // Activates or deactivates the search panel, resetting things to - // their default values if necessary. - this.Activate = function(isActive) - { - if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) - { - this.DOMSearchBox().className = 'MSearchBoxActive'; - - var searchField = this.DOMSearchField(); - - if (searchField.value == this.searchLabel) // clear "Search" term upon entry - { - searchField.value = ''; - this.searchActive = true; - } - } - else if (!isActive) // directly remove the panel - { - this.DOMSearchBox().className = 'MSearchBoxInactive'; - this.DOMSearchField().value = this.searchLabel; - this.searchActive = false; - this.lastSearchValue = '' - this.lastResultsPage = ''; - } - } -} - -// ----------------------------------------------------------------------- - -// The class that handles everything on the search results page. -function SearchResults(name) -{ - // The number of matches from the last run of . - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) - { - var parentElement = document.getElementById(id); - var element = parentElement.firstChild; - - while (element && element!=parentElement) - { - if (element.nodeName == 'DIV' && element.className == 'SRChildren') - { - return element; - } - - if (element.nodeName == 'DIV' && element.hasChildNodes()) - { - element = element.firstChild; - } - else if (element.nextSibling) - { - element = element.nextSibling; - } - else - { - do - { - element = element.parentNode; - } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) - { - element = element.nextSibling; - } - } - } - } - - this.Toggle = function(id) - { - var element = this.FindChildElement(id); - if (element) - { - if (element.style.display == 'block') - { - element.style.display = 'none'; - } - else - { - element.style.display = 'block'; - } - } - } - - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) - { - if (!search) // get search word from URL - { - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) - { - row.style.display = 'block'; - matches++; - } - else - { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) // no results - { - document.getElementById("NoMatches").style.display='block'; - } - else // at least one result - { - document.getElementById("NoMatches").style.display='none'; - } - this.lastMatchCount = matches; - return true; - } - - // return the first item with index index or higher that is visible - this.NavNext = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index++; - } - return focusItem; - } - - this.NavPrev = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index--; - } - return focusItem; - } - - this.ProcessKeys = function(e) - { - if (e.type == "keydown") - { - this.repeatOn = false; - this.lastKey = e.keyCode; - } - else if (e.type == "keypress") - { - if (!this.repeatOn) - { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } - else if (e.type == "keyup") - { - this.lastKey = 0; - this.repeatOn = false; - } - return this.lastKey!=0; - } - - this.Nav = function(evt,itemIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - var newIndex = itemIndex-1; - var focusItem = this.NavPrev(newIndex); - if (focusItem) - { - var child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') // children visible - { - var n=0; - var tmpElem; - while (1) // search for last child - { - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) - { - focusItem = tmpElem; - } - else // found it! - { - break; - } - n++; - } - } - } - if (focusItem) - { - focusItem.focus(); - } - else // return focus to search field - { - parent.document.getElementById("MSearchField").focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = itemIndex+1; - var focusItem; - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') // children visible - { - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } - else if (this.lastKey==39) // Right - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } - else if (this.lastKey==37) // Left - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } - - this.NavChild = function(evt,itemIndex,childIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - if (childIndex>0) - { - var newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } - else // already at first child, jump to parent - { - document.getElementById('Item'+itemIndex).focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = childIndex+1; - var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) // last child, jump to parent next parent - { - elem = this.NavNext(itemIndex+1); - } - if (elem) - { - elem.focus(); - } - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } -} - -function setKeyActions(elem,action) -{ - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); -} - -function setClassAttr(elem,attr) -{ - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); -} - -function createResults() -{ - var results = document.getElementById("SRResults"); - for (var e=0; e - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/typedefs_0.js b/search/typedefs_0.js deleted file mode 100644 index 66aa326af..000000000 --- a/search/typedefs_0.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['cayley_5fgraph_5ft',['cayley_graph_t',['../classlibsemigroups_1_1_semigroup.html#aa9ab606c341cf7cc1635e6c167c9c6cb',1,'libsemigroups::Semigroup::cayley_graph_t()'],['../namespacelibsemigroups.html#a6bc0e4f775341a07b6d4f24043a712f1',1,'libsemigroups::cayley_graph_t()']]], - ['class_5findex_5ft',['class_index_t',['../classlibsemigroups_1_1_congruence.html#a1c614623f5c98532fdbeaae4f32c065c',1,'libsemigroups::Congruence']]] -]; diff --git a/search/typedefs_1.html b/search/typedefs_1.html deleted file mode 100644 index c8a026857..000000000 --- a/search/typedefs_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/typedefs_1.js b/search/typedefs_1.js deleted file mode 100644 index 884b72ef8..000000000 --- a/search/typedefs_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['element_5findex_5ft',['element_index_t',['../classlibsemigroups_1_1_semigroup.html#a9dfa78f4ec2daeee9ae98dbfbaced077',1,'libsemigroups::Semigroup']]] -]; diff --git a/search/typedefs_2.html b/search/typedefs_2.html deleted file mode 100644 index 86a91955e..000000000 --- a/search/typedefs_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/typedefs_2.js b/search/typedefs_2.js deleted file mode 100644 index f6c413880..000000000 --- a/search/typedefs_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['letter_5ft',['letter_t',['../namespacelibsemigroups.html#a38c2911ca7f82f35322c4b82e3c671e2',1,'libsemigroups']]] -]; diff --git a/search/typedefs_3.html b/search/typedefs_3.html deleted file mode 100644 index 2f8138845..000000000 --- a/search/typedefs_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/typedefs_3.js b/search/typedefs_3.js deleted file mode 100644 index 9b54e7970..000000000 --- a/search/typedefs_3.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['relation_5ft',['relation_t',['../namespacelibsemigroups.html#abd1267c44db1f411a1f6004cd3d15908',1,'libsemigroups']]], - ['rws_5fletter_5ft',['rws_letter_t',['../classlibsemigroups_1_1_r_w_s.html#a0d2c83900afe73c678890061871e6ebf',1,'libsemigroups::RWS']]] -]; diff --git a/search/typedefs_4.html b/search/typedefs_4.html deleted file mode 100644 index ac1372ac9..000000000 --- a/search/typedefs_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/typedefs_4.js b/search/typedefs_4.js deleted file mode 100644 index 0566774b8..000000000 --- a/search/typedefs_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['word_5ft',['word_t',['../namespacelibsemigroups.html#a70af4e1758957fcdbd183fffda4e78c6',1,'libsemigroups']]] -]; diff --git a/search/typedefs_5.html b/search/typedefs_5.html deleted file mode 100644 index 94db6d21e..000000000 --- a/search/typedefs_5.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/typedefs_5.js b/search/typedefs_5.js deleted file mode 100644 index 24b90be94..000000000 --- a/search/typedefs_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['type',['type',['../structlibsemigroups_1_1_smallest_integer.html#af063958cee4200f301cba027fafa4dff',1,'libsemigroups::SmallestInteger']]] -]; diff --git a/search/typedefs_6.html b/search/typedefs_6.html deleted file mode 100644 index bda8ea1c5..000000000 --- a/search/typedefs_6.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/typedefs_6.js b/search/typedefs_6.js deleted file mode 100644 index 5e155d24f..000000000 --- a/search/typedefs_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['word_5ftype',['word_type',['../namespacelibsemigroups.html#a676fa302ec473b5bef941c85cbdb3842',1,'libsemigroups']]] -]; diff --git a/search/variables_0.html b/search/variables_0.html deleted file mode 100644 index 12104bcb5..000000000 --- a/search/variables_0.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_0.js b/search/variables_0.js deleted file mode 100644 index 63c69237b..000000000 --- a/search/variables_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['_5fvector',['_vector',['../classlibsemigroups_1_1_element_with_vector_data.html#ac17ecf3cecb90414228d273023c288f6',1,'libsemigroups::ElementWithVectorData']]] -]; diff --git a/search/variables_1.html b/search/variables_1.html deleted file mode 100644 index b784017a1..000000000 --- a/search/variables_1.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_1.js b/search/variables_1.js deleted file mode 100644 index bf4f4b350..000000000 --- a/search/variables_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['infty',['INFTY',['../classlibsemigroups_1_1_semiring.html#a92b3188684cc57c7436fad4e43a2ee16',1,'libsemigroups::Semiring']]] -]; diff --git a/search/variables_2.html b/search/variables_2.html deleted file mode 100644 index 0cb98d305..000000000 --- a/search/variables_2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_2.js b/search/variables_2.js deleted file mode 100644 index 36f4f84e3..000000000 --- a/search/variables_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['limit_5fmax',['LIMIT_MAX',['../classlibsemigroups_1_1_semigroup.html#af5ac5adbe809084b0c084942347572f4',1,'libsemigroups::Semigroup']]] -]; diff --git a/search/variables_3.html b/search/variables_3.html deleted file mode 100644 index 1e83bf5a9..000000000 --- a/search/variables_3.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_3.js b/search/variables_3.js deleted file mode 100644 index 45e1b4261..000000000 --- a/search/variables_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['minus_5finfty',['MINUS_INFTY',['../classlibsemigroups_1_1_semiring.html#a7e5c5791a1719a2d13160f17caff4249',1,'libsemigroups::Semiring']]] -]; diff --git a/search/variables_4.html b/search/variables_4.html deleted file mode 100644 index 39883bd60..000000000 --- a/search/variables_4.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_4.js b/search/variables_4.js deleted file mode 100644 index 0bba6ecba..000000000 --- a/search/variables_4.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['unbounded',['UNBOUNDED',['../classlibsemigroups_1_1_r_w_s.html#a5e8f76453acc060c323b80e992b3c044',1,'libsemigroups::RWS']]], - ['undefined',['UNDEFINED',['../classlibsemigroups_1_1_element.html#a5211f2c852d18b9aa83fe729851d0fe6',1,'libsemigroups::Element::UNDEFINED()'],['../classlibsemigroups_1_1_partial_transformation.html#a4344e004095a45dfcc0cfee765dd45a5',1,'libsemigroups::PartialTransformation::UNDEFINED()'],['../classlibsemigroups_1_1_semigroup.html#a035455576d317de31029cbcb99f6fda2',1,'libsemigroups::Semigroup::UNDEFINED()'],['../classlibsemigroups_1_1_semiring.html#a2a48ccff628c8cbd90e1542f48b0110a',1,'libsemigroups::Semiring::UNDEFINED()']]] -]; diff --git a/search/variables_5.html b/search/variables_5.html deleted file mode 100644 index d53e665b9..000000000 --- a/search/variables_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_5.js b/search/variables_5.js deleted file mode 100644 index 8e31f2f70..000000000 --- a/search/variables_5.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['undefined',['UNDEFINED',['../classlibsemigroups_1_1_element.html#a5211f2c852d18b9aa83fe729851d0fe6',1,'libsemigroups::Element::UNDEFINED()'],['../classlibsemigroups_1_1_partial_transformation.html#a06a1f5f3f20b3570d0841aac32bceca6',1,'libsemigroups::PartialTransformation::UNDEFINED()'],['../classlibsemigroups_1_1_semigroup.html#aac61b2bd6ef49a7659c3dca9e1f205cf',1,'libsemigroups::Semigroup::UNDEFINED()'],['../classlibsemigroups_1_1_semiring.html#aa0fef12f42625b7aa2986d9225baf9e8',1,'libsemigroups::Semiring::UNDEFINED()']]] -]; diff --git a/semigroups_8h_source.html b/semigroups_8h_source.html deleted file mode 100644 index 3240f1b04..000000000 --- a/semigroups_8h_source.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - -libsemigroups: src/semigroups.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    semigroups.h
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2016 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_SRC_SEMIGROUPS_H_
    20 #define LIBSEMIGROUPS_SRC_SEMIGROUPS_H_
    21 
    22 #include <algorithm>
    23 #include <mutex>
    24 #include <string>
    25 #include <thread>
    26 #include <unordered_map>
    27 #include <utility>
    28 #include <vector>
    29 
    30 #include "elements.h"
    31 #include "libsemigroups-debug.h"
    32 #include "recvec.h"
    33 #include "report.h"
    34 
    35 #if (defined(__GNUC__) && __GNUC__ < 5 \
    36  && !(defined(__clang__) || defined(__INTEL_COMPILER)))
    37 #pragma message( \
    38  "GCC version >=5.0 is recommended, some features may not work correctly")
    39 #endif
    40 
    42 namespace libsemigroups {
    43 
    44  class RWSE;
    45 
    46  // This object is used for printing information during a computation. The
    47  // reason it is global is that we must be able to report from different
    48  // threads running concurrently.
    49  extern Reporter glob_reporter;
    50 
    52  typedef size_t letter_t;
    53 
    55  typedef std::vector<letter_t> word_t;
    56 
    58  typedef std::pair<word_t, word_t> relation_t;
    59 
    68  class Semigroup {
    69  typedef RecVec<bool> flags_t;
    70 
    71  // Type used for indexing elements in a Semigroup, use this when not
    72  // specifically referring to a position in _elements. It should be possible
    73  // to change this type and everything will just work, provided the size of
    74  // the semigroup is less than the maximum value of this type of integer.
    75  typedef size_t index_t;
    76 
    77  // The elements of a semigroup are stored in _elements, but because of the
    78  // way add_generators/closure work, it might not be the case that all the
    79  // words of a given length are contiguous in _elements. Hence we require a
    80  // means of finding the next element of a given length. In
    81  // _enumerate_order, the first K_1 values are element_index_t's
    82  // equal to the positions in _elements of the words of length 1,
    83  // the next K_2 values are the element_index_t's equal to the positions in
    84  // _elements of the words of length 2, and so on.
    85  //
    86  // This typedef is used to distinguish variables that refer to positions in
    87  // _elements (element_index_t) from those that refer to positions in
    88  // _enumerate_order (enumerate_index_t).
    89  typedef index_t enumerate_index_t;
    90 
    91  public:
    95  typedef index_t element_index_t;
    96 
    98  typedef RecVec<element_index_t> cayley_graph_t;
    99 
    100  public:
    107  Semigroup& operator=(Semigroup const& semigroup) = delete;
    108 
    128  explicit Semigroup(std::vector<Element const*> const* gens);
    129 
    135  explicit Semigroup(std::vector<Element*> const* gens)
    136  : Semigroup(
    137  reinterpret_cast<std::vector<Element const*> const*>(gens)) {}
    138 
    143  explicit Semigroup(std::vector<Element*>* gens)
    144  : Semigroup(const_cast<std::vector<Element*> const*>(gens)) {}
    145 
    151  explicit Semigroup(std::vector<Element const*>* gens)
    152  : Semigroup(const_cast<std::vector<Element const*> const*>(gens)) {}
    153 
    157  explicit Semigroup(std::vector<Element const*> const& gens);
    158 
    163  explicit Semigroup(std::vector<Element*> const& gens)
    164  : Semigroup(
    165  reinterpret_cast<std::vector<Element const*> const&>(gens)) {}
    166 
    171  explicit Semigroup(std::initializer_list<Element*> gens)
    172  : Semigroup(static_cast<std::vector<Element*>>(gens)) {}
    173 
    179  Semigroup(const Semigroup& copy);
    180 
    181  private:
    182  // Partial copy.
    183  // \p copy a semigroup
    184  // \p coll a collection of additional generators
    185  //
    186  // This is a constructor for a semigroup generated by the generators of the
    187  // Semigroup copy and the (possibly) additional generators coll.
    188  //
    189  // The relevant parts of the data structure of copy are copied and
    190  // \c this will be corrupt unless add_generators or closure is called
    191  // subsequently. This is why this method is private.
    192  //
    193  // The same effect can be obtained by copying copy using the copy
    194  // constructor and then calling add_generators or closure. However,
    195  // this constructor avoids copying those parts of the data structure of
    196  // copy that add_generators invalidates anyway. If copy has not been
    197  // enumerated at all, then these two routes for adding more generators are
    198  // equivalent.
    199  Semigroup(Semigroup const& copy, std::vector<Element const*> const* coll);
    200 
    201  public:
    203  ~Semigroup();
    204 
    215  element_index_t word_to_pos(word_t const& w) const;
    216 
    226  Element* word_to_element(word_t const& w) const;
    227 
    235  size_t current_max_word_length() const {
    236  if (is_done()) {
    237  return _lenindex.size() - 2;
    238  } else if (_nr > _lenindex.back()) {
    239  return _lenindex.size();
    240  } else {
    241  return _lenindex.size() - 1;
    242  }
    243  }
    244 
    246  size_t degree() const {
    247  return _degree;
    248  }
    249 
    251  size_t nrgens() const {
    252  return _gens.size();
    253  }
    254 
    256  Element const* gens(letter_t pos) const {
    257  LIBSEMIGROUPS_ASSERT(pos < _gens.size());
    258  return _gens[pos];
    259  }
    260 
    266  bool is_done() const {
    267  return (_pos >= _nr);
    268  }
    269 
    272  bool is_begun() const {
    273  LIBSEMIGROUPS_ASSERT(_lenindex.size() > 1);
    274  return (_pos >= _lenindex[1]);
    275  }
    276 
    289  if (x->degree() != _degree) {
    290  return UNDEFINED;
    291  }
    292 
    293  auto it = _map.find(x);
    294  return (it == _map.end() ? UNDEFINED : it->second);
    295  }
    296 
    302  size_t current_size() const {
    303  return _elements.size();
    304  }
    305 
    311  size_t current_nrrules() const {
    312  return _nrrules;
    313  }
    314 
    321  LIBSEMIGROUPS_ASSERT(pos < _nr);
    322  return _prefix[pos];
    323  }
    324 
    331  LIBSEMIGROUPS_ASSERT(pos < _nr);
    332  return _suffix[pos];
    333  }
    334 
    348  LIBSEMIGROUPS_ASSERT(pos < _nr);
    349  return _first[pos];
    350  }
    351 
    365  LIBSEMIGROUPS_ASSERT(pos < _nr);
    366  return _final[pos];
    367  }
    368 
    371  size_t batch_size() const {
    372  return _batch_size;
    373  }
    374 
    380  size_t length_const(element_index_t pos) const {
    381  LIBSEMIGROUPS_ASSERT(pos < _nr);
    382  return _length[pos];
    383  }
    384 
    390  if (pos >= _nr) {
    391  enumerate();
    392  }
    393  return length_const(pos);
    394  }
    395 
    405  element_index_t j) const;
    406 
    427 
    439  LIBSEMIGROUPS_ASSERT(i < _nrgens);
    440  return _letter_to_pos[i];
    441  }
    442 
    448  size_t nridempotents();
    449 
    455  bool is_idempotent(element_index_t pos);
    456 
    461  size_t nrrules() {
    462  enumerate();
    463  return _nrrules;
    464  }
    465 
    477  // FIXME Make _batch_size mutable and this const
    478  void set_batch_size(size_t batch_size) {
    479  _batch_size = batch_size;
    480  }
    481 
    490  void reserve(size_t n);
    491 
    493  size_t size() {
    494  enumerate();
    495  return _elements.size();
    496  }
    497 
    505  bool test_membership(Element const* x) {
    506  return (position(x) != UNDEFINED);
    507  }
    508 
    518  element_index_t position(Element const* x);
    519 
    524 
    529 
    536  Element const* at(element_index_t pos);
    537 
    542  Element const* operator[](element_index_t pos) const {
    543  return _elements[pos];
    544  }
    545 
    550  Element const* sorted_at(element_index_t pos);
    551 
    557  enumerate();
    558  return _right.get(i, j);
    559  }
    560 
    565  enumerate();
    566  return new cayley_graph_t(_right);
    567  }
    568 
    574  enumerate();
    575  return _left.get(i, j);
    576  }
    577 
    582  enumerate();
    583  return new cayley_graph_t(_left);
    584  }
    585 
    598 
    606 
    613 
    621  minimal_factorisation(word, pos);
    622  }
    623 
    632  return minimal_factorisation(pos);
    633  }
    634 
    640  word_t* factorisation(Element const* x);
    641 
    649  _relation_pos = UNDEFINED;
    650  _relation_gen = 0;
    651  }
    652 
    684  void next_relation(word_t& relation);
    685 
    707  void enumerate(std::atomic<bool>& killed, size_t limit = LIMIT_MAX);
    708 
    713  void enumerate(size_t limit = LIMIT_MAX) {
    714  std::atomic<bool> killed(false);
    715  enumerate(killed, limit);
    716  }
    717 
    747  void add_generators(std::vector<Element const*> const* coll);
    748 
    752  void add_generators(std::vector<Element*> const* coll) {
    754  reinterpret_cast<std::vector<Element const*> const*>(coll));
    755  }
    756 
    760  void add_generators(std::vector<Element const*> const& coll);
    761 
    765  void add_generators(std::vector<Element*> const& coll) {
    767  reinterpret_cast<std::vector<Element const*> const&>(coll));
    768  }
    769 
    773  void add_generators(std::initializer_list<Element*> coll) {
    774  add_generators(static_cast<std::vector<Element*>>(coll));
    775  }
    776 
    787  Semigroup*
    788  copy_add_generators(std::vector<Element const*> const* coll) const;
    789 
    793  Semigroup* copy_add_generators(std::vector<Element*> const* coll) const {
    794  return copy_add_generators(
    795  reinterpret_cast<std::vector<Element const*> const*>(coll));
    796  }
    797 
    818  void closure(std::vector<Element const*> const* coll);
    819 
    824  void closure(std::vector<Element const*> const& coll);
    825 
    830  void closure(std::vector<Element*> const& coll) {
    831  closure(reinterpret_cast<std::vector<Element const*> const&>(coll));
    832  }
    833 
    838  void closure(std::initializer_list<Element*> coll) {
    839  closure(static_cast<std::vector<Element*>>(coll));
    840  }
    841 
    852  Semigroup* copy_closure(std::vector<Element const*> const* coll);
    853 
    858  Semigroup* copy_closure(std::vector<Element*> const* gens) {
    859  return copy_closure(
    860  reinterpret_cast<std::vector<Element const*> const*>(gens));
    861  }
    862 
    866  static index_t const UNDEFINED;
    867 
    870  static index_t const LIMIT_MAX;
    871 
    873  //
    876  void set_report(bool val) const {
    877  glob_reporter.set_report(val);
    878  }
    879 
    887  void set_max_threads(size_t nr_threads) {
    888  unsigned int n
    889  = static_cast<unsigned int>(nr_threads == 0 ? 1 : nr_threads);
    890  _max_threads = std::min(n, std::thread::hardware_concurrency());
    891  }
    892 
    893  private:
    894  template <typename T, class C> class iterator_base {
    895  public:
    896  typedef typename std::vector<Element const*>::size_type size_type;
    897  typedef typename std::vector<T>::difference_type difference_type;
    898  typedef typename std::vector<Element const*>::value_type value_type;
    899  typedef typename std::vector<Element const*>::const_reference reference;
    900  typedef typename std::vector<Element const*>::const_pointer pointer;
    901  typedef std::random_access_iterator_tag iterator_category;
    902 
    903  explicit iterator_base(typename std::vector<T>::const_iterator it_vec)
    904  : _it_vec(it_vec) {}
    905 
    906  iterator_base(iterator_base const& that) : iterator_base(that._it_vec) {}
    907 
    908  iterator_base& operator=(iterator_base const& that) {
    909  _it_vec = that._it_vec;
    910  return *this;
    911  }
    912 
    913  virtual ~iterator_base() {}
    914 
    915  bool operator==(iterator_base const& that) const {
    916  return _it_vec == that._it_vec;
    917  }
    918 
    919  bool operator!=(iterator_base const& that) const {
    920  return _it_vec != that._it_vec;
    921  }
    922 
    923  bool operator<(iterator_base const& that) const {
    924  return _it_vec < that._it_vec;
    925  }
    926 
    927  bool operator>(iterator_base const& that) const {
    928  return _it_vec > that._it_vec;
    929  }
    930 
    931  bool operator<=(iterator_base const& that) const {
    932  return operator<(that) || operator==(that);
    933  }
    934 
    935  bool operator>=(iterator_base const& that) const {
    936  return operator>(that) || operator==(that);
    937  }
    938 
    939  // postfix
    940  iterator_base operator++(int) {
    941  iterator_base tmp(*this);
    942  iterator_base::operator++();
    943  return tmp;
    944  }
    945 
    946  iterator_base operator--(int) {
    947  iterator_base tmp(*this);
    948  iterator_base::operator--();
    949  return tmp;
    950  }
    951 
    952  iterator_base operator+(size_type val) const {
    953  iterator_base out(*this);
    954  return out += val;
    955  }
    956 
    957  friend iterator_base operator+(size_type val, iterator_base const& it) {
    958  return it + val;
    959  }
    960 
    961  iterator_base operator-(size_type val) const {
    962  iterator_base out(*this);
    963  return out -= val;
    964  }
    965 
    966  reference operator[](size_type pos) const {
    967  return *(*this + pos);
    968  }
    969 
    970  iterator_base& operator++() { // prefix
    971  ++_it_vec;
    972  return *this;
    973  }
    974 
    975  iterator_base& operator--() {
    976  --_it_vec;
    977  return *this;
    978  }
    979 
    980  iterator_base& operator+=(size_type val) {
    981  _it_vec += val;
    982  return *this;
    983  }
    984 
    985  iterator_base& operator-=(size_type val) {
    986  _it_vec -= val;
    987  return *this;
    988  }
    989 
    990  difference_type operator-(iterator_base that) const {
    991  return _it_vec - that._it_vec;
    992  }
    993 
    994  reference operator*() const {
    995  return _methods.indirection(_it_vec);
    996  }
    997 
    998  pointer operator->() const {
    999  return _methods.addressof(_it_vec);
    1000  }
    1001 
    1002  protected:
    1003  typename std::vector<T>::const_iterator _it_vec;
    1004  static C const _methods;
    1005  }; // iterator_base definition ends
    1006 
    1007  struct IteratorMethods {
    1008  IteratorMethods() {}
    1009  typename std::vector<Element const*>::const_reference indirection(
    1010  typename std::vector<Element const*>::const_iterator it) const {
    1011  return *it;
    1012  }
    1013  typename std::vector<Element const*>::const_pointer
    1014  addressof(typename std::vector<Element const*>::const_iterator it) const {
    1015  return &(*it);
    1016  }
    1017  };
    1018 
    1019  struct IteratorMethodsPairFirst {
    1020  IteratorMethodsPairFirst() {}
    1021  typename std::vector<Element const*>::const_reference indirection(
    1022  typename std::vector<std::pair<Element const*, element_index_t>>::
    1023  const_iterator it) const {
    1024  return (*it).first;
    1025  }
    1026 
    1027  typename std::vector<Element const*>::const_pointer
    1028  addressof(typename std::vector<
    1029  std::pair<Element const*, element_index_t>>::const_iterator it)
    1030  const {
    1031  return &((*it).first);
    1032  }
    1033  };
    1034 
    1035  typedef iterator_base<Element const*, IteratorMethods> const_iterator;
    1036  typedef iterator_base<std::pair<Element const*, element_index_t>,
    1037  IteratorMethodsPairFirst>
    1038  const_iterator_pair_first;
    1039  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
    1040  typedef std::reverse_iterator<const_iterator_pair_first>
    1041  const_reverse_iterator_pair_first;
    1042 
    1043  typedef const_iterator_pair_first const_iterator_sorted;
    1044  typedef const_iterator_pair_first const_iterator_idempotents;
    1045  typedef const_reverse_iterator_pair_first const_reverse_iterator_sorted;
    1046  typedef const_reverse_iterator_pair_first
    1047  const_reverse_iterator_idempotents;
    1048 
    1049  public:
    1057  const_iterator cbegin() const {
    1058  return const_iterator(_elements.cbegin());
    1059  }
    1060 
    1068  const_iterator begin() const {
    1069  return cbegin();
    1070  }
    1071 
    1079  const_iterator cend() const {
    1080  return const_iterator(_elements.cend());
    1081  }
    1082 
    1090  const_iterator end() const {
    1091  return cend();
    1092  }
    1093 
    1101  const_reverse_iterator crbegin() const {
    1102  return const_reverse_iterator(cend());
    1103  }
    1104 
    1112  const_reverse_iterator crend() const {
    1113  return const_reverse_iterator(cbegin());
    1114  }
    1115 
    1122  const_iterator_sorted cbegin_sorted() {
    1123  init_sorted();
    1124  return const_iterator_pair_first(_sorted.cbegin());
    1125  }
    1126 
    1133  const_iterator_sorted cend_sorted() {
    1134  init_sorted();
    1135  return const_iterator_pair_first(_sorted.cend());
    1136  }
    1137 
    1144  const_reverse_iterator_sorted crbegin_sorted() {
    1145  init_sorted();
    1146  return const_reverse_iterator_pair_first(cend_sorted());
    1147  }
    1148 
    1155  const_reverse_iterator_sorted crend_sorted() {
    1156  init_sorted();
    1157  return const_reverse_iterator_pair_first(cbegin_sorted());
    1158  }
    1159 
    1169  const_iterator_idempotents cbegin_idempotents() {
    1170  init_idempotents();
    1171  return const_iterator_pair_first(_idempotents.cbegin());
    1172  }
    1173 
    1179  const_iterator_idempotents cend_idempotents() {
    1180  init_idempotents();
    1181  return const_iterator_pair_first(_idempotents.cend());
    1182  }
    1183 
    1184  private:
    1185  // Expand the data structures in the semigroup with space for nr elements
    1186  void inline expand(index_t nr) {
    1187  _left.add_rows(nr);
    1188  _reduced.add_rows(nr);
    1189  _right.add_rows(nr);
    1190  }
    1191 
    1192  // Check if an element is the identity, x should be in the position pos
    1193  // of _elements.
    1194  void inline is_one(Element const* x, element_index_t pos) {
    1195  if (!_found_one && *x == *_id) {
    1196  _pos_one = pos;
    1197  _found_one = true;
    1198  }
    1199  }
    1200 
    1201  void copy_gens();
    1202 
    1203  void inline closure_update(element_index_t i,
    1204  letter_t j,
    1205  letter_t b,
    1206  element_index_t s,
    1207  index_t old_nr,
    1208  size_t const& thread_id);
    1209 
    1210  // Initialise the data member _sorted. We store a list of pairs consisting
    1211  // of an Element* and element_index_t which is sorted on the first entry
    1212  // using the operator< of the Element class. The second component is then
    1213  // inverted (as a permutation) so that we can then find the position of an
    1214  // element in the sorted list of elements.
    1215  void init_sorted();
    1216 
    1217  typedef std::pair<Element const*, element_index_t> idempotent_value_t;
    1218 
    1219  // Find the idempotents and store their pointers and positions in a
    1220  // std::pair of type idempotent_value_t.
    1221  void init_idempotents();
    1222 
    1223  // Find the idempotents in the range [first, last) and store
    1224  // the corresponding std::pair of type idempotent_value_t in the 4th
    1225  // parameter. The parameter threshold is the point, calculated in
    1226  // init_idempotents, at which it is better to simply multiply elements
    1227  // rather than trace in the left/right Cayley graph.
    1228  void idempotents(enumerate_index_t const first,
    1229  enumerate_index_t const last,
    1230  enumerate_index_t const threshold,
    1231  std::vector<idempotent_value_t>& idempotents);
    1232 
    1233  size_t _batch_size;
    1234  element_index_t _degree;
    1235  std::vector<std::pair<letter_t, letter_t>> _duplicate_gens;
    1236  std::vector<Element const*> _elements;
    1237  std::vector<element_index_t> _enumerate_order;
    1238  std::vector<letter_t> _final;
    1239  std::vector<letter_t> _first;
    1240  bool _found_one;
    1241  std::vector<Element const*> _gens;
    1242  Element const* _id;
    1243  std::vector<idempotent_value_t> _idempotents;
    1244  bool _idempotents_found;
    1245  std::vector<uint8_t> _is_idempotent;
    1246  cayley_graph_t _left;
    1247  std::vector<index_t> _length;
    1248  std::vector<enumerate_index_t> _lenindex;
    1249  std::vector<element_index_t> _letter_to_pos;
    1250  std::unordered_map<Element const*,
    1252  Element::Hash,
    1253  Element::Equal>
    1254  _map;
    1255  size_t _max_threads;
    1256  std::mutex _mtx;
    1257  index_t _nr;
    1258  letter_t _nrgens;
    1259  size_t _nrrules;
    1260  enumerate_index_t _pos;
    1261  element_index_t _pos_one;
    1262  std::vector<element_index_t> _prefix;
    1263  flags_t _reduced;
    1264  letter_t _relation_gen;
    1265  enumerate_index_t _relation_pos;
    1266  cayley_graph_t _right;
    1267  std::vector<std::pair<Element const*, element_index_t>> _sorted;
    1268  std::vector<element_index_t> _suffix;
    1269  Element* _tmp_product;
    1270  size_t _wordlen;
    1271 
    1272  static std::vector<element_index_t> _tmp_inverter;
    1273  static std::vector<bool> _old_new;
    1274 #ifdef LIBSEMIGROUPS_STATS
    1275  size_t _nr_products;
    1276 #endif
    1277  };
    1278 
    1282 
    1283  template <typename T, typename C>
    1284  C const Semigroup::iterator_base<T, C>::_methods;
    1285 } // namespace libsemigroups
    1286 
    1287 #endif // LIBSEMIGROUPS_SRC_SEMIGROUPS_H_
    Semigroup::cayley_graph_t cayley_graph_t
    This is just for backwards compatibility and should disappear at some point.
    Definition: semigroups.h:1281
    -
    element_index_t position_to_sorted_position(element_index_t pos)
    Returns the position of this->at(pos) in the sorted array of elements of the semigroup,...
    Definition: semigroups.cc:397
    -
    void minimal_factorisation(word_t &word, element_index_t pos)
    Changes word in-place to contain a minimal word with respect to the short-lex ordering in the generat...
    Definition: semigroups.cc:461
    -
    static index_t const LIMIT_MAX
    This variable is used to indicate the maximum possible limit that can be used with Semigroup::enumera...
    Definition: semigroups.h:870
    -
    bool is_begun() const
    Returns true if no elements other than the generators have been enumerated so far and false otherwise...
    Definition: semigroups.h:272
    -
    Semigroup(std::initializer_list< Element * > gens)
    Construct from generators.
    Definition: semigroups.h:171
    -
    cayley_graph_t * right_cayley_graph_copy()
    Returns a copy of the right Cayley graph of the semigroup.
    Definition: semigroups.h:564
    -
    size_t current_nrrules() const
    Returns the number of relations in the presentation for the semigroup that have been found so far.
    Definition: semigroups.h:311
    -
    void closure(std::initializer_list< Element * > coll)
    Add copies of the non-redundant generators in coll to the generators of this.
    Definition: semigroups.h:838
    -
    void reset_next_relation()
    This method resets Semigroup::next_relation so that when it is next called the resulting relation is ...
    Definition: semigroups.h:648
    -
    void add_generators(std::vector< Element * > const &coll)
    Add copies of the generators coll to the generators of this.
    Definition: semigroups.h:765
    -
    Semigroup * copy_add_generators(std::vector< Element * > const *coll) const
    Returns a new semigroup generated by this and coll.
    Definition: semigroups.h:793
    -
    virtual size_t degree() const =0
    Returns the degree of an Element.
    -
    const_reverse_iterator_sorted crend_sorted()
    Returns a const iterator pointing to one before the first element of the semigroup when the elements ...
    Definition: semigroups.h:1155
    -
    Semigroup(std::vector< Element * > const *gens)
    Construct from generators.
    Definition: semigroups.h:135
    -
    element_index_t right(element_index_t i, letter_t j)
    Returns the index of the product of the element in position i with the generator with index j.
    Definition: semigroups.h:556
    -
    element_index_t product_by_reduction(element_index_t i, element_index_t j) const
    Returns the position in this of the product of this->at(i) and this->at(j) by following a path in the...
    Definition: semigroups.cc:332
    -
    void set_batch_size(size_t batch_size)
    Set a new value for the batch size.
    Definition: semigroups.h:478
    -
    void enumerate(size_t limit=LIMIT_MAX)
    Enumerate the semigroup until limit elements are found.
    Definition: semigroups.h:713
    -
    Element const * sorted_at(element_index_t pos)
    Returns the element of the semigroup in position pos of the sorted array of elements,...
    Definition: semigroups.cc:419
    -
    std::vector< letter_t > word_t
    Type for a word over the generators of a semigroup.
    Definition: semigroups.h:55
    -
    void closure(std::vector< Element const * > const *coll)
    Add copies of the non-redundant generators in coll to the generators of this.
    Definition: semigroups.cc:687
    -
    const_reverse_iterator_sorted crbegin_sorted()
    Returns a const iterator pointing to the last element of the semigroup when the elements are sorted b...
    Definition: semigroups.h:1144
    -
    const_iterator begin() const
    Returns a const iterator pointing to the first element of the semigroup.
    Definition: semigroups.h:1068
    -
    Abstract base class for semigroup elements.
    Definition: elements.h:44
    -
    size_t length_non_const(element_index_t pos)
    Returns the length of the element in position pos of the semigroup.
    Definition: semigroups.h:389
    -
    const_iterator cend() const
    Returns a const iterator pointing to one past the last currently known element of the semigroup.
    Definition: semigroups.h:1079
    -
    size_t current_size() const
    Returns the number of elements in the semigroup that have been enumerated so far.
    Definition: semigroups.h:302
    -
    element_index_t letter_to_pos(letter_t i) const
    Returns the position in this of the generator with index i.
    Definition: semigroups.h:438
    -
    element_index_t sorted_position(Element const *x)
    Returns the position of x in the sorted array of elements of the semigroup, or Semigroup::UNDEFINED i...
    Definition: semigroups.cc:406
    -
    const_reverse_iterator crbegin() const
    Returns a const reverse iterator pointing to the last currently known element of the semigroup.
    Definition: semigroups.h:1101
    -
    Semigroup * copy_closure(std::vector< Element * > const *gens)
    Returns a new semigroup generated by this and copies of the non-redundant elements of coll.
    Definition: semigroups.h:858
    -
    const_iterator_idempotents cbegin_idempotents()
    Returns a const iterator pointing at the first idempotent in the semigroup.
    Definition: semigroups.h:1169
    -
    Element const * operator[](element_index_t pos) const
    Returns the element of the semigroup in position pos.
    Definition: semigroups.h:542
    -
    void enumerate(std::atomic< bool > &killed, size_t limit=LIMIT_MAX)
    Enumerate the semigroup until limit elements are found or killed is true.
    Definition: semigroups.cc:523
    -
    const_iterator_sorted cend_sorted()
    Returns a const iterator pointing to one past the last element of the semigroup when the elements are...
    Definition: semigroups.h:1133
    -
    element_index_t fast_product(element_index_t i, element_index_t j) const
    Returns the position in this of the product of this->at(i) and this->at(j).
    Definition: semigroups.cc:352
    -
    Element const * at(element_index_t pos)
    Returns the element of the semigroup in position pos, or a nullptr if there is no such element.
    Definition: semigroups.cc:410
    -
    letter_t first_letter(element_index_t pos) const
    Returns the first letter of the element in position pos.
    Definition: semigroups.h:347
    -
    void set_report(bool val) const
    Turn reporting on or off.
    Definition: semigroups.h:876
    -
    element_index_t position(Element const *x)
    Returns the position of x in this, or Semigroup::UNDEFINED if x is not an element of this.
    Definition: semigroups.cc:378
    -
    Semigroup * copy_closure(std::vector< Element const * > const *coll)
    Returns a new semigroup generated by this and copies of the non-redundant elements of coll.
    Definition: semigroups.cc:667
    -
    word_t * factorisation(element_index_t pos)
    Returns a pointer to a libsemigroups::word_t which evaluates to the Element in position pos of this.
    Definition: semigroups.h:631
    -
    element_index_t left(element_index_t i, letter_t j)
    Returns the index of the product of the generator with index j and the element in position i.
    Definition: semigroups.h:573
    -
    size_t length_const(element_index_t pos) const
    Returns the length of the element in position pos of the semigroup.
    Definition: semigroups.h:380
    -
    const_iterator_idempotents cend_idempotents()
    Returns a const iterator referring to past the end of the last idempotent in the semigroup.
    Definition: semigroups.h:1179
    -
    size_t nrrules()
    Returns the total number of relations in the presentation defining the semigroup.
    Definition: semigroups.h:461
    -
    const_reverse_iterator crend() const
    Returns a const reverse iterator pointing to one before the first element of the semigroup.
    Definition: semigroups.h:1112
    -
    size_t degree() const
    Returns the degree of any (and all) Element's in the semigroup.
    Definition: semigroups.h:246
    -
    void set_max_threads(size_t nr_threads)
    Set the maximum number of threads that any method of an instance of Semigroup can use.
    Definition: semigroups.h:887
    -
    Semigroup & operator=(Semigroup const &semigroup)=delete
    Deleted.
    -
    void add_generators(std::vector< Element * > const *coll)
    Add copies of the generators coll to the generators of this.
    Definition: semigroups.h:752
    -
    Namespace for everything in the libsemigroups library.
    Definition: blocks.cc:32
    -
    const_iterator end() const
    Returns a const iterator pointing to one past the last currently known element of the semigroup.
    Definition: semigroups.h:1090
    -
    bool is_done() const
    Returns true if the semigroup is fully enumerated and false if not.
    Definition: semigroups.h:266
    -
    bool is_idempotent(element_index_t pos)
    Returns true if the element in position pos is an idempotent and false if it is not.
    Definition: semigroups.cc:370
    -
    void reserve(size_t n)
    Requests that the capacity (i.e. number of elements) of the semigroup be at least enough to contain n...
    Definition: semigroups.cc:279
    -
    RecVec< element_index_t > cayley_graph_t
    Type for a left or right Cayley graph of a semigroup.
    Definition: semigroups.h:98
    -
    element_index_t word_to_pos(word_t const &w) const
    Returns the position in the semigroup corresponding to the element represented by the word w.
    Definition: semigroups.cc:302
    -
    Semigroup(std::vector< Element const * > const *gens)
    Construct from generators.
    Definition: semigroups.cc:38
    -
    Semigroup(std::vector< Element * > const &gens)
    Construct from generators.
    Definition: semigroups.h:163
    -
    Semigroup * copy_add_generators(std::vector< Element const * > const *coll) const
    Returns a new semigroup generated by this and coll.
    Definition: semigroups.cc:702
    -
    Semigroup(std::vector< Element const * > *gens)
    Construct from generators.
    Definition: semigroups.h:151
    -
    void closure(std::vector< Element * > const &coll)
    Add copies of the non-redundant generators in coll to the generators of this.
    Definition: semigroups.h:830
    -
    void add_generators(std::initializer_list< Element * > coll)
    Add copies of the generators coll to the generators of this.
    Definition: semigroups.h:773
    -
    letter_t final_letter(element_index_t pos) const
    Returns the last letter of the element in position pos.
    Definition: semigroups.h:364
    -
    element_index_t current_position(Element const *x) const
    Returns the position of the element x in the semigroup if it is already known to belong to the semigr...
    Definition: semigroups.h:288
    -
    void add_generators(std::vector< Element const * > const *coll)
    Add copies of the generators coll to the generators of this.
    Definition: semigroups.cc:718
    -
    size_t size()
    Returns the size of the semigroup.
    Definition: semigroups.h:493
    -
    static index_t const UNDEFINED
    This variable is used to indicate that a value is undefined, such as, for example,...
    Definition: semigroups.h:866
    -
    size_t current_max_word_length() const
    Returns the maximum length of a word in the generators so far computed.
    Definition: semigroups.h:235
    -
    Class for semigroups generated by instances of Element.
    Definition: semigroups.h:68
    -
    size_t letter_t
    Type for the index of a generator of a semigroup.
    Definition: semigroups.h:52
    -
    size_t nridempotents()
    Returns the total number of idempotents in the semigroup.
    Definition: semigroups.cc:365
    -
    std::pair< word_t, word_t > relation_t
    Type for a pair of word_t (a relation) of a semigroup.
    Definition: semigroups.h:58
    -
    void factorisation(word_t &word, element_index_t pos)
    Changes word in-place to contain a word in the generators equal to the pos element of the semigroup.
    Definition: semigroups.h:620
    -
    Element * word_to_element(word_t const &w) const
    Returns a pointer to the element of this represented by the word w.
    Definition: semigroups.cc:315
    -
    ~Semigroup()
    A default destructor.
    Definition: semigroups.cc:264
    -
    size_t batch_size() const
    Returns the current value of the batch size. This is the minimum number of elements enumerated in any...
    Definition: semigroups.h:371
    -
    bool test_membership(Element const *x)
    Returns true if x is an element of this and false if it is not.
    Definition: semigroups.h:505
    -
    const_iterator_sorted cbegin_sorted()
    Returns a const iterator pointing to the first element of the semigroup when the elements are sorted ...
    Definition: semigroups.h:1122
    -
    cayley_graph_t * left_cayley_graph_copy()
    Returns a copy of the left Cayley graph of the semigroup.
    Definition: semigroups.h:581
    -
    const_iterator cbegin() const
    Returns a const iterator pointing to the first element of the semigroup.
    Definition: semigroups.h:1057
    -
    Element const * gens(letter_t pos) const
    Return a pointer to the generator with index pos.
    Definition: semigroups.h:256
    -
    Semigroup(std::vector< Element * > *gens)
    Construct from generators.
    Definition: semigroups.h:143
    -
    index_t element_index_t
    Type for the position of an element in an instance of Semigroup. The size of the semigroup being enum...
    Definition: semigroups.h:95
    -
    element_index_t suffix(element_index_t pos) const
    Returns the position of the suffix of the element x in position pos (of the semigroup) of length one ...
    Definition: semigroups.h:330
    -
    size_t nrgens() const
    Returns the number of generators of the semigroup.
    Definition: semigroups.h:251
    -
    void next_relation(word_t &relation)
    This method changes relation in-place to contain the next relation of the presentation defining this.
    Definition: semigroups.cc:475
    -
    element_index_t prefix(element_index_t pos) const
    Returns the position of the prefix of the element x in position pos (of the semigroup) of length one ...
    Definition: semigroups.h:320
    -
    - - - - diff --git a/semiring_8h_source.html b/semiring_8h_source.html deleted file mode 100644 index 6a72b43c0..000000000 --- a/semiring_8h_source.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - -libsemigroups: src/semiring.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    semiring.h
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2016 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_SRC_SEMIRING_H_
    20 #define LIBSEMIGROUPS_SRC_SEMIRING_H_
    21 
    22 #include <limits.h>
    23 
    24 #include <algorithm>
    25 #include <cstdint>
    26 
    27 #include "libsemigroups-debug.h"
    28 
    29 namespace libsemigroups {
    30 
    48  template <typename T> class Semiring {
    49  public:
    51  static const T UNDEFINED;
    52 
    54  static const T MINUS_INFTY;
    55 
    57  static const T INFTY;
    58 
    60  virtual ~Semiring() {}
    61 
    63  virtual T one() const = 0;
    64 
    66  virtual T zero() const = 0;
    67 
    69  virtual T plus(T x, T y) const = 0;
    70 
    72  virtual T prod(T x, T y) const = 0;
    73  };
    74 
    75  template <typename T>
    76  const T Semiring<T>::UNDEFINED = std::numeric_limits<T>::max();
    77 
    78  template <typename T>
    79  const T Semiring<T>::MINUS_INFTY = std::numeric_limits<T>::min();
    80 
    81  template <typename T>
    82  const T Semiring<T>::INFTY = std::numeric_limits<T>::max();
    83 
    85  class BooleanSemiring : public Semiring<bool> {
    86  public:
    87  BooleanSemiring() : Semiring() {}
    88 
    90  bool one() const override {
    91  return true;
    92  }
    93 
    95  bool zero() const override {
    96  return false;
    97  }
    98 
    100  bool prod(bool x, bool y) const override {
    101  return x && y;
    102  }
    103 
    105  bool plus(bool x, bool y) const override {
    106  return x || y;
    107  }
    108  };
    109 
    111  class Integers : public Semiring<int64_t> {
    112  public:
    113  Integers() : Semiring<int64_t>() {}
    114 
    116  int64_t one() const override {
    117  return 1;
    118  }
    119 
    121  int64_t zero() const override {
    122  return 0;
    123  }
    124 
    126  int64_t prod(int64_t x, int64_t y) const override {
    127  return x * y;
    128  }
    129 
    131  int64_t plus(int64_t x, int64_t y) const override {
    132  return x + y;
    133  }
    134  };
    135 
    139  class MaxPlusSemiring : public Semiring<int64_t> {
    140  public:
    142 
    144  int64_t one() const override {
    145  return 0;
    146  }
    147 
    149  int64_t zero() const override {
    150  return MINUS_INFTY;
    151  }
    152 
    155  int64_t prod(int64_t x, int64_t y) const override {
    156  if (x == MINUS_INFTY || y == MINUS_INFTY) {
    157  return MINUS_INFTY;
    158  }
    159  return x + y;
    160  }
    161 
    163  int64_t plus(int64_t x, int64_t y) const override {
    164  return std::max(x, y);
    165  }
    166  };
    167 
    171  class MinPlusSemiring : public Semiring<int64_t> {
    172  public:
    174 
    176  int64_t one() const override {
    177  return 0;
    178  }
    179 
    181  int64_t zero() const override {
    182  return INFTY;
    183  }
    184 
    188  int64_t prod(int64_t x, int64_t y) const override {
    189  if (x == INFTY || y == INFTY) {
    190  return INFTY;
    191  }
    192  return x + y;
    193  }
    194 
    196  int64_t plus(int64_t x, int64_t y) const override {
    197  return std::min(x, y);
    198  }
    199  };
    200 
    203  class SemiringWithThreshold : public Semiring<int64_t> {
    204  public:
    210  : Semiring<int64_t>(), _threshold(threshold) {}
    211 
    213  int64_t threshold() const {
    214  return _threshold;
    215  }
    216 
    217  private:
    218  int64_t _threshold;
    219  };
    220 
    226  public:
    232 
    233  // Returns the integer 0.
    234  int64_t one() const override {
    235  return 0;
    236  }
    237 
    239  int64_t zero() const override {
    240  return MINUS_INFTY;
    241  }
    242 
    247  int64_t prod(int64_t x, int64_t y) const override {
    248  LIBSEMIGROUPS_ASSERT((x >= 0 && x <= this->threshold())
    250  LIBSEMIGROUPS_ASSERT((y >= 0 && y <= this->threshold())
    252  if (x == MINUS_INFTY || y == MINUS_INFTY) {
    253  return MINUS_INFTY;
    254  }
    255  return std::min(x + y, threshold());
    256  }
    257 
    260  int64_t plus(int64_t x, int64_t y) const override {
    261  LIBSEMIGROUPS_ASSERT((x >= 0 && x <= this->threshold())
    263  LIBSEMIGROUPS_ASSERT((y >= 0 && y <= this->threshold())
    265  return std::max(x, y);
    266  }
    267  };
    268 
    274  public:
    280 
    282  int64_t one() const override {
    283  return 0;
    284  }
    285 
    287  int64_t zero() const override {
    288  return INFTY;
    289  }
    290 
    294  int64_t prod(int64_t x, int64_t y) const override {
    295  LIBSEMIGROUPS_ASSERT((x >= 0 && x <= this->threshold())
    296  || x == Semiring<int64_t>::INFTY);
    297  LIBSEMIGROUPS_ASSERT((y >= 0 && y <= this->threshold())
    298  || y == Semiring<int64_t>::INFTY);
    299  if (x == INFTY || y == INFTY) {
    300  return INFTY;
    301  }
    302  return std::min(x + y, threshold());
    303  }
    304 
    308  int64_t plus(int64_t x, int64_t y) const override {
    309  LIBSEMIGROUPS_ASSERT((x >= 0 && x <= this->threshold())
    310  || x == Semiring<int64_t>::INFTY);
    311  LIBSEMIGROUPS_ASSERT((y >= 0 && y <= this->threshold())
    312  || y == Semiring<int64_t>::INFTY);
    313  if (x == INFTY && y == INFTY) {
    314  return INFTY;
    315  }
    316  return std::min(x, y);
    317  }
    318  };
    319 
    325  public:
    336  NaturalSemiring(int64_t t, int64_t p)
    337  : SemiringWithThreshold(t), _period(p) {
    338  LIBSEMIGROUPS_ASSERT(_period > 0);
    339  LIBSEMIGROUPS_ASSERT(this->threshold() >= 0);
    340  }
    341 
    343  int64_t one() const override {
    344  return 1;
    345  }
    346 
    348  int64_t zero() const override {
    349  return 0;
    350  }
    351 
    354  int64_t prod(int64_t x, int64_t y) const override {
    355  LIBSEMIGROUPS_ASSERT(x >= 0 && x <= _period + this->threshold() - 1);
    356  LIBSEMIGROUPS_ASSERT(y >= 0 && y <= _period + this->threshold() - 1);
    357  return thresholdperiod(x * y);
    358  }
    359 
    362  int64_t plus(int64_t x, int64_t y) const override {
    363  LIBSEMIGROUPS_ASSERT(x >= 0 && x <= _period + this->threshold() - 1);
    364  LIBSEMIGROUPS_ASSERT(y >= 0 && y <= _period + this->threshold() - 1);
    365  return thresholdperiod(x + y);
    366  }
    367 
    369  int64_t period() const {
    370  return _period;
    371  }
    372 
    373  private:
    374  int64_t thresholdperiod(int64_t x) const {
    375  int64_t threshold = this->threshold();
    376  if (x > threshold) {
    377  return threshold + (x - threshold) % _period;
    378  }
    379  return x;
    380  }
    381 
    382  int64_t _period;
    383  };
    384 } // namespace libsemigroups
    385 
    386 #endif // LIBSEMIGROUPS_SRC_SEMIRING_H_
    static const T INFTY
    Value representing .
    Definition: semiring.h:57
    -
    virtual T prod(T x, T y) const =0
    Returns the product of x and y.
    -
    The tropical max-plus semiring consists of the integers for some value (called the threshold of the...
    Definition: semiring.h:225
    -
    The usual ring of integers.
    Definition: semiring.h:111
    -
    int64_t zero() const override
    Returns the Semiring<int64_t>::INFTY.
    Definition: semiring.h:287
    -
    int64_t zero() const override
    Returns Semiring<int64_t>::INFTY.
    Definition: semiring.h:181
    -
    The usual Boolean semiring.
    Definition: semiring.h:85
    -
    This class its subclasses provide very basic functionality for creating semirings.
    Definition: semiring.h:48
    -
    int64_t zero() const override
    Returns the integer 0.
    Definition: semiring.h:121
    -
    int64_t plus(int64_t x, int64_t y) const override
    Returns x + y modulo the congruence where and are the threshold and period of the semiring,...
    Definition: semiring.h:362
    -
    int64_t prod(int64_t x, int64_t y) const override
    Returns x * y modulo the congruence where and are the threshold and period of the semiring,...
    Definition: semiring.h:354
    -
    int64_t plus(int64_t x, int64_t y) const override
    Returns the maximum of x and y.
    Definition: semiring.h:163
    -
    int64_t plus(int64_t x, int64_t y) const override
    Returns Semiring<int64_t>::INFTY if either of x and y is Semiring<int64_t>::INFTY,...
    Definition: semiring.h:308
    -
    int64_t threshold() const
    Returns the threshold of a semiring with threshold.
    Definition: semiring.h:213
    -
    virtual ~Semiring()
    A default destructor.
    Definition: semiring.h:60
    -
    int64_t plus(int64_t x, int64_t y) const override
    Returns the sum .
    Definition: semiring.h:131
    -
    The min-plus semiring consists of the integers together with infinity with operations min and plus....
    Definition: semiring.h:171
    -
    virtual T plus(T x, T y) const =0
    Returns the sum of x and y.
    -
    int64_t zero() const override
    Returns the Semiring<int64_t>::MINUS_INFTY.
    Definition: semiring.h:239
    -
    int64_t prod(int64_t x, int64_t y) const override
    Returns Semiring<int64_t>::INFTY if x or y equals Semiring<int64_t>::INFTY, otherwise return the mini...
    Definition: semiring.h:294
    -
    TropicalMaxPlusSemiring(int64_t threshold)
    Construct from threshold.
    Definition: semiring.h:230
    -
    bool prod(bool x, bool y) const override
    Returns the product .
    Definition: semiring.h:100
    -
    TropicalMinPlusSemiring(int64_t threshold)
    Construct from threshold.
    Definition: semiring.h:278
    -
    bool plus(bool x, bool y) const override
    Returns the sum .
    Definition: semiring.h:105
    -
    Namespace for everything in the libsemigroups library.
    Definition: blocks.cc:32
    -
    int64_t prod(int64_t x, int64_t y) const override
    Returns Semiring<int64_t>::MINUS_INFTY if x or y equals Semiring<int64_t>::MINUS_INFTY,...
    Definition: semiring.h:155
    -
    int64_t one() const override
    Return the integer 1.
    Definition: semiring.h:343
    -
    bool zero() const override
    Returns the integer 0.
    Definition: semiring.h:95
    -
    int64_t one() const override
    Returns the integer 1.
    Definition: semiring.h:116
    -
    static const T MINUS_INFTY
    Value representing .
    Definition: semiring.h:54
    -
    int64_t one() const override
    Returns the integer 0.
    Definition: semiring.h:282
    -
    int64_t period() const
    Returns the period of the semiring.
    Definition: semiring.h:369
    -
    int64_t plus(int64_t x, int64_t y) const override
    Returns the minimum of x and y.
    Definition: semiring.h:196
    -
    int64_t zero() const override
    Return the integer 0.
    Definition: semiring.h:348
    -
    static const T UNDEFINED
    Value representing an undefined quantity.
    Definition: semiring.h:51
    -
    int64_t plus(int64_t x, int64_t y) const override
    Returns the minimum of (the maximum of x and y) and the threshold of the semiring.
    Definition: semiring.h:260
    -
    int64_t prod(int64_t x, int64_t y) const override
    Returns the product .
    Definition: semiring.h:126
    -
    SemiringWithThreshold(int64_t threshold)
    A class for semirings with a threshold.
    Definition: semiring.h:209
    -
    int64_t zero() const override
    Returns Semiring<int64_t>::MINUS_INFTY.
    Definition: semiring.h:149
    -
    int64_t one() const override
    Returns the integer 0.
    Definition: semiring.h:176
    -
    int64_t prod(int64_t x, int64_t y) const override
    Returns Semiring<int64_t>::MINUS_INFTY if x or y equals Semiring<int64_t>::MINUS_INFTY,...
    Definition: semiring.h:247
    -
    virtual T zero() const =0
    Returns the additive identity, or zero, of the semiring.
    -
    int64_t prod(int64_t x, int64_t y) const override
    Returns Semiring<int64_t>::INFTY if x or y equals Semiring<int64_t>::INFTY, otherwise returns x + y.
    Definition: semiring.h:188
    -
    This class implements the semiring consisting of for some threshold and period with operations add...
    Definition: semiring.h:324
    -
    This abstract class provides common methods for its subclasses TropicalMaxPlusSemiring,...
    Definition: semiring.h:203
    -
    NaturalSemiring(int64_t t, int64_t p)
    Construct from threshold and period.
    Definition: semiring.h:336
    -
    virtual T one() const =0
    Returns the multiplicative identity, or one, of the semiring.
    -
    int64_t one() const override
    Returns the multiplicative identity, or one, of the semiring.
    Definition: semiring.h:234
    -
    The tropical min-plus semiring consists of the integers for some value (called the threshold of the...
    Definition: semiring.h:273
    -
    int64_t one() const override
    Returns the integer 0.
    Definition: semiring.h:144
    -
    bool one() const override
    Returns the integer 1.
    Definition: semiring.h:90
    -
    The max-plus semiring consists of the integers together with negative infinity with operations max an...
    Definition: semiring.h:139
    -
    - - - - diff --git a/semiring_8hpp_source.html b/semiring_8hpp_source.html deleted file mode 100644 index 69923e89b..000000000 --- a/semiring_8hpp_source.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -libsemigroups: include/semiring.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    semiring.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2016 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_INCLUDE_SEMIRING_HPP_
    20 #define LIBSEMIGROUPS_INCLUDE_SEMIRING_HPP_
    21 
    22 #include <cinttypes> // for int64_t
    23 
    24 namespace libsemigroups {
    25 
    43  template <typename T>
    44  class Semiring {
    45  public:
    47  virtual ~Semiring() {}
    48 
    50  virtual T one() const = 0;
    51 
    53  virtual T zero() const = 0;
    54 
    56  virtual T plus(T, T) const = 0;
    57 
    59  virtual T prod(T, T) const = 0;
    60 
    66  virtual bool contains(T) const {
    67  return true;
    68  }
    69  };
    70 
    72  struct BooleanSemiring : public Semiring<bool> {
    74  bool one() const override;
    75  bool zero() const override;
    76  bool prod(bool, bool) const override;
    77  bool plus(bool, bool) const override;
    78  };
    79 
    81  struct Integers : public Semiring<int64_t> {
    82  Integers();
    83  int64_t one() const override;
    84  int64_t zero() const override;
    85  int64_t prod(int64_t, int64_t) const override;
    86  int64_t plus(int64_t, int64_t) const override;
    87  };
    88 
    92  struct MaxPlusSemiring : public Semiring<int64_t> {
    95  int64_t one() const override;
    97  int64_t zero() const override;
    100  int64_t prod(int64_t, int64_t) const override;
    102  int64_t plus(int64_t, int64_t) const override;
    103  };
    104 
    108  struct MinPlusSemiring : public Semiring<int64_t> {
    109  MinPlusSemiring();
    110 
    112  int64_t one() const override;
    113 
    115  int64_t zero() const override;
    116 
    119  int64_t prod(int64_t, int64_t) const override;
    120 
    122  int64_t plus(int64_t, int64_t) const override;
    123  };
    124 
    127  class SemiringWithThreshold : public Semiring<int64_t> {
    128  public:
    133  explicit SemiringWithThreshold(int64_t);
    134 
    136  int64_t threshold() const;
    137 
    138  private:
    139  int64_t _threshold;
    140  };
    141 
    150  explicit TropicalMaxPlusSemiring(int64_t);
    151 
    153  int64_t one() const override;
    154 
    156  int64_t zero() const override;
    157 
    161  int64_t prod(int64_t, int64_t) const override;
    162 
    165  int64_t plus(int64_t, int64_t) const override;
    166 
    167  bool contains(int64_t) const override;
    168  };
    169 
    178  explicit TropicalMinPlusSemiring(int64_t);
    179 
    181  int64_t one() const override;
    182 
    184  int64_t zero() const override;
    185 
    189  int64_t prod(int64_t, int64_t) const override;
    190 
    192  int64_t plus(int64_t, int64_t) const override;
    193  bool contains(int64_t) const override;
    194  };
    195 
    201  public:
    212  NaturalSemiring(int64_t, int64_t);
    213 
    215  int64_t one() const override;
    216 
    218  int64_t zero() const override;
    219 
    222  int64_t prod(int64_t, int64_t) const override;
    223 
    226  int64_t plus(int64_t, int64_t) const override;
    227 
    229  int64_t period() const;
    230 
    231  bool contains(int64_t) const override;
    232 
    233  private:
    234  int64_t thresholdperiod(int64_t x) const;
    235  int64_t _period;
    236  };
    237 } // namespace libsemigroups
    238 
    239 #endif // LIBSEMIGROUPS_INCLUDE_SEMIRING_HPP_
    int64_t prod(int64_t, int64_t) const override
    Returns POSITIVE_INFINITY if either parameter equals POSITIVE_INFINITY, otherwise returns the usual i...
    -
    int64_t plus(int64_t, int64_t) const override
    Returns the sum, in the semiring, of the parameters.
    -
    int64_t one() const override
    Returns the integer 0.
    -
    The tropical min-plus semiring consists of the integers for some value (called the threshold of the...
    Definition: semiring.hpp:174
    -
    SemiringWithThreshold(int64_t)
    A class for semirings with a threshold.
    -
    TropicalMinPlusSemiring(int64_t)
    Construct from threshold.
    -
    The min-plus semiring consists of the integers together with infinity with operations min and plus...
    Definition: semiring.hpp:108
    -
    This class its subclasses provide very basic functionality for creating semirings.
    Definition: element.hpp:54
    -
    int64_t plus(int64_t, int64_t) const override
    Returns x + y modulo the congruence where and are the threshold and period of the semiring...
    -
    The max-plus semiring consists of the integers together with negative infinity with operations max an...
    Definition: semiring.hpp:92
    -
    The tropical max-plus semiring consists of the integers for some value (called the threshold of the...
    Definition: semiring.hpp:146
    -
    NaturalSemiring(int64_t, int64_t)
    Construct from threshold and period.
    -
    bool contains(int64_t) const override
    Returns true if this contain the argument.
    -
    int64_t one() const override
    Returns the multiplicative identity, or one, of the semiring.
    -
    bool one() const override
    Returns the multiplicative identity, or one, of the semiring.
    -
    int64_t prod(int64_t, int64_t) const override
    Returns the product, in the semiring, of the parameters.
    -
    int64_t zero() const override
    Returns NEGATIVE_INFINITY.
    -
    The usual ring of integers.
    Definition: semiring.hpp:81
    -
    TropicalMaxPlusSemiring(int64_t)
    Construct from threshold.
    -
    int64_t threshold() const
    Returns the threshold of a semiring with threshold.
    -
    int64_t zero() const override
    Returns POSITIVE_INFINITY.
    -
    virtual ~Semiring()
    A default destructor.
    Definition: semiring.hpp:47
    -
    int64_t prod(int64_t, int64_t) const override
    Returns POSITIVE_INFINITY if either parameter equals POSITIVE_INFINITY, otherwise return the minimum ...
    -
    bool plus(bool, bool) const override
    Returns the sum, in the semiring, of the parameters.
    -
    int64_t plus(int64_t, int64_t) const override
    Returns the minimum of the parameters.
    -
    bool prod(bool, bool) const override
    Returns the product, in the semiring, of the parameters.
    -
    int64_t zero() const override
    Returns POSITIVE_INFINITY.
    -
    virtual bool contains(T) const
    Returns true if this contain the argument.
    Definition: semiring.hpp:66
    -
    bool zero() const override
    Returns the additive identity, or zero, of the semiring.
    -
    The usual Boolean semiring.
    Definition: semiring.hpp:72
    -
    int64_t plus(int64_t, int64_t) const override
    Returns the maximum of the parameters.
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    int64_t plus(int64_t, int64_t) const override
    Returns the minimum of the parameters.
    -
    int64_t plus(int64_t, int64_t) const override
    Returns the minimum of (the maximum of x and y) and the threshold of the semiring.
    -
    virtual T prod(T, T) const =0
    Returns the product, in the semiring, of the parameters.
    -
    int64_t prod(int64_t, int64_t) const override
    Returns NEGATIVE_INFINITY if either parameter equals NEGATIVE_INFINITY, otherwise returns the usual i...
    -
    int64_t one() const override
    Returns the integer 0.
    -
    int64_t one() const override
    Return the integer 1.
    -
    int64_t one() const override
    Returns the integer 0.
    -
    int64_t zero() const override
    Returns the additive identity, or zero, of the semiring.
    -
    int64_t period() const
    Returns the period of the semiring.
    -
    int64_t zero() const override
    Return the integer 0.
    -
    virtual T plus(T, T) const =0
    Returns the sum, in the semiring, of the parameters.
    -
    int64_t prod(int64_t, int64_t) const override
    Returns x * y modulo the congruence where and are the threshold and period of the semiring...
    -
    int64_t prod(int64_t, int64_t) const override
    Returns NEGATIVE_INFINITY if either parameter equal NEGATIVE_INFINITY, otherwise returns the minimum ...
    -
    int64_t zero() const override
    Returns the NEGATIVE_INFINITY.
    -
    virtual T zero() const =0
    Returns the additive identity, or zero, of the semiring.
    -
    This class implements the semiring consisting of for some threshold and period with operations add...
    Definition: semiring.hpp:200
    -
    This abstract class provides common methods for its subclasses TropicalMaxPlusSemiring, TropicalMinPlusSemiring, and NaturalSemiring.
    Definition: semiring.hpp:127
    -
    virtual T one() const =0
    Returns the multiplicative identity, or one, of the semiring.
    -
    bool contains(int64_t) const override
    Returns true if this contain the argument.
    -
    int64_t one() const override
    Returns the integer 0.
    -
    bool contains(int64_t) const override
    Returns true if this contain the argument.
    -
    - - - - diff --git a/splitbar.png b/splitbar.png deleted file mode 100644 index fe895f2c5..000000000 Binary files a/splitbar.png and /dev/null differ diff --git a/stl_8hpp_source.html b/stl_8hpp_source.html deleted file mode 100644 index 8a3874d3e..000000000 --- a/stl_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/stl.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    stl.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains some functionality missing in some implementations of the
    20 // stl, or to augment the stl implementations.
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_STL_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_STL_HPP_
    24 
    25 #include <functional>
    26 #include <memory>
    27 #include <ostream>
    28 #include <sstream>
    29 #include <type_traits>
    30 #include <vector>
    31 
    32 namespace libsemigroups {
    33  namespace internal {
    34  template <typename TValueType, typename = void>
    35  struct hash {
    36  size_t operator()(TValueType const& x) const {
    37  return std::hash<TValueType>()(x);
    38  }
    39  };
    40 
    41  template <typename TValueType, typename = void>
    42  struct equal_to {
    43  size_t operator()(TValueType const& x, TValueType const& y) const {
    44  return std::equal_to<TValueType>()(x, y);
    45  }
    46  };
    47 
    48  // Forward declaration
    49  template <typename T>
    50  std::string to_string(const T& n);
    51 
    52  // A << method for vectors
    53  template <typename T>
    54  std::ostream& operator<<(std::ostream& os, std::vector<T> const& vec) {
    55  os << "{";
    56  for (auto it = vec.cbegin(); it < vec.cend() - 1; ++it) {
    57  os << to_string(*it) << ", ";
    58  }
    59  os << to_string(*(vec.cend() - 1)) << "}";
    60  return os;
    61  }
    62 
    63  // A << method for pairs
    64  template <typename T, typename S>
    65  std::ostream& operator<<(std::ostream& os, std::pair<T, S> const& pair) {
    66  os << "{" << to_string(pair.first) << ", " << to_string(pair.second)
    67  << "}";
    68  return os;
    69  }
    70 
    76  template <typename T>
    77  std::string to_string(T const& n) {
    78  std::ostringstream stm;
    79  stm << n;
    80  return stm.str();
    81  }
    82 
    83  // C++11 is missing make_unique. The following implementation is from Item
    84  // 21 in "Effective Modern C++" by Scott Meyers.
    85  template <typename T, typename... Ts>
    86  std::unique_ptr<T> make_unique(Ts&&... params) {
    87  return std::unique_ptr<T>(new T(std::forward<Ts>(params)...));
    88  }
    89 
    90  // Since std::is_invocable is only introduced in C++17, we use this
    91  // from: https://stackoverflow.com/q/15393938/
    92  // Only works if there are no overloads of operator() in type T.
    93  template <typename T, typename = void>
    94  struct is_callable : std::is_function<T> {};
    95 
    96  template <typename T>
    97  struct is_callable<
    98  T,
    99  typename std::enable_if<
    100  std::is_same<decltype(void(&T::operator())), void>::value>::type>
    101  : std::true_type {};
    102  } // namespace internal
    103 } // namespace libsemigroups
    104 
    105 namespace std {
    106  template <typename TValueType, size_t N>
    107  struct hash<std::array<TValueType, N>> {
    108  size_t operator()(std::array<TValueType, N> const& ar) const {
    109  size_t seed = 0;
    110  for (auto const& x : ar) {
    111  seed ^= std::hash<TValueType>{}(x) + 0x9e3779b9 + (seed << 6)
    112  + (seed >> 2);
    113  }
    114  return seed;
    115  }
    116  };
    117 
    118  template <typename TValueType>
    119  struct hash<std::vector<TValueType>> {
    120  size_t operator()(std::vector<TValueType> const& vec) const {
    121  size_t seed = 0;
    122  for (auto const& x : vec) {
    123  seed ^= std::hash<TValueType>{}(x) + 0x9e3779b9 + (seed << 6)
    124  + (seed >> 2);
    125  }
    126  return seed;
    127  }
    128  };
    129 } // namespace std
    130 #endif // LIBSEMIGROUPS_INCLUDE_STL_HPP_
    Definition: kbe.hpp:198
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/string_8hpp_source.html b/string_8hpp_source.html deleted file mode 100644 index 03f14217b..000000000 --- a/string_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/string.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    string.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_INCLUDE_STRING_HPP_
    20 #define LIBSEMIGROUPS_INCLUDE_STRING_HPP_
    21 
    22 #include <string>
    23 
    24 namespace libsemigroups {
    25  namespace internal {
    27  // Internal functions for handling strings
    29 
    30  // Replace [it1_begin .. it1_begin + (it2_end - it2_begin)] by
    31  // [it2_begin .. it2_end], no checks performed.
    32  static inline void string_replace(std::string::iterator it1_begin,
    33  std::string::const_iterator it2_begin,
    34  std::string::const_iterator it2_end) {
    35  while (it2_begin < it2_end) {
    36  *it1_begin = *it2_begin;
    37  ++it1_begin;
    38  ++it2_begin;
    39  }
    40  }
    41 
    42  // Returns true if [first_prefix, last_prefix) is a prefix of [first_word,
    43  // last_word).
    44  static inline bool
    45  is_prefix(std::string::const_iterator const& first_word,
    46  std::string::const_iterator const& last_word,
    47  std::string::const_iterator const& first_prefix,
    48  std::string::const_iterator const& last_prefix) {
    49  LIBSEMIGROUPS_ASSERT(first_word <= last_word);
    50  // We don't care if first_prefix > last_prefix
    51  if (last_prefix - first_prefix > last_word - first_word) {
    52  return false;
    53  }
    54  // Check if [first_prefix, last_prefix) equals [first_word, first_word +
    55  // (last_suffix - first_suffix))
    56  return std::equal(first_prefix, last_prefix, first_word);
    57  }
    58 
    59  static inline std::pair<std::string::const_iterator,
    60  std::string::const_iterator>
    61  maximum_common_prefix(std::string::const_iterator first_word1,
    62  std::string::const_iterator const& last_word1,
    63  std::string::const_iterator first_word2,
    64  std::string::const_iterator const& last_word2) {
    65  while (*first_word1 == *first_word2 && first_word1 < last_word1
    66  && first_word2 < last_word2) {
    67  ++first_word1;
    68  ++first_word2;
    69  }
    70  return std::make_pair(first_word1, first_word2);
    71  }
    72 
    73 #ifdef LIBSEMIGROUPS_DEBUG
    74  // Returns true if [first_suffix, last_suffix) is a suffix of [first_word,
    75  // last_word).
    76  static inline bool
    77  is_suffix(std::string::const_iterator const& first_word,
    78  std::string::const_iterator const& last_word,
    79  std::string::const_iterator const& first_suffix,
    80  std::string::const_iterator const& last_suffix) {
    81  LIBSEMIGROUPS_ASSERT(first_word <= last_word);
    82  // We don't care if first_suffix > last_suffix
    83  if (last_suffix - first_suffix > last_word - first_word) {
    84  return false;
    85  }
    86 
    87  // Check if [first_suffix, last_suffix) equals [last_word - (last_suffix -
    88  // first_suffix), end_word).
    89  // The following seems faster than calling std::equal.
    90  auto it_suffix = last_suffix - 1;
    91  auto it_word = last_word - 1;
    92  while ((it_suffix > first_suffix) && (*it_suffix == *it_word)) {
    93  --it_suffix;
    94  --it_word;
    95  }
    96  return *it_suffix == *it_word;
    97  }
    98 #endif
    99  } // namespace internal
    100 } // namespace libsemigroups
    101 #endif // LIBSEMIGROUPS_INCLUDE_STRING_HPP_
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/structlibsemigroups_1_1_boolean_semiring-members.html b/structlibsemigroups_1_1_boolean_semiring-members.html deleted file mode 100644 index 7ca8bf56f..000000000 --- a/structlibsemigroups_1_1_boolean_semiring-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::BooleanSemiring Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::BooleanSemiring, including all inherited members.

    - - - - - - - - -
    BooleanSemiring() (defined in libsemigroups::BooleanSemiring)libsemigroups::BooleanSemiring
    contains(bool) constlibsemigroups::Semiring< bool >inlinevirtual
    one() const overridelibsemigroups::BooleanSemiringvirtual
    plus(bool, bool) const overridelibsemigroups::BooleanSemiringvirtual
    prod(bool, bool) const overridelibsemigroups::BooleanSemiringvirtual
    zero() const overridelibsemigroups::BooleanSemiringvirtual
    ~Semiring()libsemigroups::Semiring< bool >inlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_boolean_semiring.html b/structlibsemigroups_1_1_boolean_semiring.html deleted file mode 100644 index 01d572383..000000000 --- a/structlibsemigroups_1_1_boolean_semiring.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::BooleanSemiring Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::BooleanSemiring Struct Reference
    -
    -
    - -

    The usual Boolean semiring. - More...

    - -

    #include <semiring.hpp>

    -
    -Inheritance diagram for libsemigroups::BooleanSemiring:
    -
    -
    Inheritance graph
    - - - -
    [legend]
    -
    -Collaboration diagram for libsemigroups::BooleanSemiring:
    -
    -
    Collaboration graph
    - - - -
    [legend]
    - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

    bool one () const override
     Returns the multiplicative identity, or one, of the semiring. More...
     
    bool plus (bool, bool) const override
     Returns the sum, in the semiring, of the parameters. More...
     
    bool prod (bool, bool) const override
     Returns the product, in the semiring, of the parameters. More...
     
    bool zero () const override
     Returns the additive identity, or zero, of the semiring. More...
     
    - Public Member Functions inherited from libsemigroups::Semiring< bool >
    virtual ~Semiring ()
     A default destructor. More...
     
    virtual bool contains (bool) const
     Returns true if this contain the argument. More...
     
    -

    Detailed Description

    -

    The usual Boolean semiring.

    -

    Member Function Documentation

    - -

    ◆ one()

    - -
    -
    - - - - - -
    - - - - - - - -
    bool libsemigroups::BooleanSemiring::one () const
    -
    -overridevirtual
    -
    - -

    Returns the multiplicative identity, or one, of the semiring.

    - -

    Implements libsemigroups::Semiring< bool >.

    - -
    -
    - -

    ◆ plus()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    bool libsemigroups::BooleanSemiring::plus (bool ,
    bool  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the sum, in the semiring, of the parameters.

    - -

    Implements libsemigroups::Semiring< bool >.

    - -
    -
    - -

    ◆ prod()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    bool libsemigroups::BooleanSemiring::prod (bool ,
    bool  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the product, in the semiring, of the parameters.

    - -

    Implements libsemigroups::Semiring< bool >.

    - -
    -
    - -

    ◆ zero()

    - -
    -
    - - - - - -
    - - - - - - - -
    bool libsemigroups::BooleanSemiring::zero () const
    -
    -overridevirtual
    -
    - -

    Returns the additive identity, or zero, of the semiring.

    - -

    Implements libsemigroups::Semiring< bool >.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_boolean_semiring__coll__graph.map b/structlibsemigroups_1_1_boolean_semiring__coll__graph.map deleted file mode 100644 index 6841f16c4..000000000 --- a/structlibsemigroups_1_1_boolean_semiring__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_boolean_semiring__coll__graph.md5 b/structlibsemigroups_1_1_boolean_semiring__coll__graph.md5 deleted file mode 100644 index ecf335029..000000000 --- a/structlibsemigroups_1_1_boolean_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -c43ea1a67bc7f91e689f9f72dc9bdf48 \ No newline at end of file diff --git a/structlibsemigroups_1_1_boolean_semiring__coll__graph.png b/structlibsemigroups_1_1_boolean_semiring__coll__graph.png deleted file mode 100644 index 6613a651f..000000000 Binary files a/structlibsemigroups_1_1_boolean_semiring__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_boolean_semiring__inherit__graph.map b/structlibsemigroups_1_1_boolean_semiring__inherit__graph.map deleted file mode 100644 index 6841f16c4..000000000 --- a/structlibsemigroups_1_1_boolean_semiring__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_boolean_semiring__inherit__graph.md5 b/structlibsemigroups_1_1_boolean_semiring__inherit__graph.md5 deleted file mode 100644 index b38791d59..000000000 --- a/structlibsemigroups_1_1_boolean_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -5d17980f30ac2f49235b6f2dc6915bd9 \ No newline at end of file diff --git a/structlibsemigroups_1_1_boolean_semiring__inherit__graph.png b/structlibsemigroups_1_1_boolean_semiring__inherit__graph.png deleted file mode 100644 index 6613a651f..000000000 Binary files a/structlibsemigroups_1_1_boolean_semiring__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_element_1_1_equal-members.html b/structlibsemigroups_1_1_element_1_1_equal-members.html deleted file mode 100644 index 4eee8445d..000000000 --- a/structlibsemigroups_1_1_element_1_1_equal-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::Element::Equal Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::Element::Equal, including all inherited members.

    - - -
    operator()(Element const *x, Element const *y) constlibsemigroups::Element::Equalinline
    - - - - diff --git a/structlibsemigroups_1_1_element_1_1_equal.html b/structlibsemigroups_1_1_element_1_1_equal.html deleted file mode 100644 index f3bda708a..000000000 --- a/structlibsemigroups_1_1_element_1_1_equal.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Element::Equal Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::Element::Equal Struct Reference
    -
    -
    - -

    Provides a call operator for comparing Elements via pointers. - More...

    - -

    #include <elements.h>

    - - - - - -

    -Public Member Functions

    bool operator() (Element const *x, Element const *y) const
     Returns true if x and y point to equal Element's. More...
     
    -

    Detailed Description

    -

    Provides a call operator for comparing Elements via pointers.

    -

    This struct provides a call operator for comparing const Element pointers (by comparing the Element objects they point to). This is used by various methods of the Semigroup class.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    bool libsemigroups::Element::Equal::operator() (Element const * x,
    Element const * y 
    ) const
    -
    -inline
    -
    - -

    Returns true if x and y point to equal Element's.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_element_1_1_hash-members.html b/structlibsemigroups_1_1_element_1_1_hash-members.html deleted file mode 100644 index e08051a5d..000000000 --- a/structlibsemigroups_1_1_element_1_1_hash-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::Element::Hash Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::Element::Hash, including all inherited members.

    - - -
    operator()(Element const *x) constlibsemigroups::Element::Hashinline
    - - - - diff --git a/structlibsemigroups_1_1_element_1_1_hash.html b/structlibsemigroups_1_1_element_1_1_hash.html deleted file mode 100644 index 93cb464ea..000000000 --- a/structlibsemigroups_1_1_element_1_1_hash.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Element::Hash Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::Element::Hash Struct Reference
    -
    -
    - -

    Provides a call operator returning a hash value for an Element via a pointer. - More...

    - -

    #include <elements.h>

    - - - - - -

    -Public Member Functions

    size_t operator() (Element const *x) const
     Returns the value of Element::hash_value applied to the Element pointed to by x. More...
     
    -

    Detailed Description

    -

    Provides a call operator returning a hash value for an Element via a pointer.

    -

    This struct provides a call operator for obtaining a hash value for the Element from a const Element pointer. This is used by various methods of the Semigroup class.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    - - - - - -
    - - - - - - - - -
    size_t libsemigroups::Element::Hash::operator() (Element const * x) const
    -
    -inline
    -
    - -

    Returns the value of Element::hash_value applied to the Element pointed to by x.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_integers-members.html b/structlibsemigroups_1_1_integers-members.html deleted file mode 100644 index 5f82da95b..000000000 --- a/structlibsemigroups_1_1_integers-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::Integers Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::Integers, including all inherited members.

    - - - - - - - - -
    contains(int64_t) constlibsemigroups::Semiring< int64_t >inlinevirtual
    Integers() (defined in libsemigroups::Integers)libsemigroups::Integers
    one() const overridelibsemigroups::Integersvirtual
    plus(int64_t, int64_t) const overridelibsemigroups::Integersvirtual
    prod(int64_t, int64_t) const overridelibsemigroups::Integersvirtual
    zero() const overridelibsemigroups::Integersvirtual
    ~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_integers.html b/structlibsemigroups_1_1_integers.html deleted file mode 100644 index 685ab982b..000000000 --- a/structlibsemigroups_1_1_integers.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Integers Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::Integers Struct Reference
    -
    -
    - -

    The usual ring of integers. - More...

    - -

    #include <semiring.hpp>

    -
    -Inheritance diagram for libsemigroups::Integers:
    -
    -
    Inheritance graph
    - - - -
    [legend]
    -
    -Collaboration diagram for libsemigroups::Integers:
    -
    -
    Collaboration graph
    - - - -
    [legend]
    - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

    int64_t one () const override
     Returns the multiplicative identity, or one, of the semiring. More...
     
    int64_t plus (int64_t, int64_t) const override
     Returns the sum, in the semiring, of the parameters. More...
     
    int64_t prod (int64_t, int64_t) const override
     Returns the product, in the semiring, of the parameters. More...
     
    int64_t zero () const override
     Returns the additive identity, or zero, of the semiring. More...
     
    - Public Member Functions inherited from libsemigroups::Semiring< int64_t >
    virtual ~Semiring ()
     A default destructor. More...
     
    virtual bool contains (int64_t) const
     Returns true if this contain the argument. More...
     
    -

    Detailed Description

    -

    The usual ring of integers.

    -

    Member Function Documentation

    - -

    ◆ one()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::Integers::one () const
    -
    -overridevirtual
    -
    - -

    Returns the multiplicative identity, or one, of the semiring.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ plus()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::Integers::plus (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the sum, in the semiring, of the parameters.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ prod()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::Integers::prod (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the product, in the semiring, of the parameters.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ zero()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::Integers::zero () const
    -
    -overridevirtual
    -
    - -

    Returns the additive identity, or zero, of the semiring.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_integers__coll__graph.map b/structlibsemigroups_1_1_integers__coll__graph.map deleted file mode 100644 index 152e109df..000000000 --- a/structlibsemigroups_1_1_integers__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_integers__coll__graph.md5 b/structlibsemigroups_1_1_integers__coll__graph.md5 deleted file mode 100644 index 1396da1f8..000000000 --- a/structlibsemigroups_1_1_integers__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -dadcb81b34bc3aa29fc3dc14b9f1d9a1 \ No newline at end of file diff --git a/structlibsemigroups_1_1_integers__coll__graph.png b/structlibsemigroups_1_1_integers__coll__graph.png deleted file mode 100644 index e282538b1..000000000 Binary files a/structlibsemigroups_1_1_integers__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_integers__inherit__graph.map b/structlibsemigroups_1_1_integers__inherit__graph.map deleted file mode 100644 index 152e109df..000000000 --- a/structlibsemigroups_1_1_integers__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_integers__inherit__graph.md5 b/structlibsemigroups_1_1_integers__inherit__graph.md5 deleted file mode 100644 index e4252f5cd..000000000 --- a/structlibsemigroups_1_1_integers__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -0a4bab90c1590905cf78b9c43755fd2b \ No newline at end of file diff --git a/structlibsemigroups_1_1_integers__inherit__graph.png b/structlibsemigroups_1_1_integers__inherit__graph.png deleted file mode 100644 index e282538b1..000000000 Binary files a/structlibsemigroups_1_1_integers__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_max_plus_semiring-members.html b/structlibsemigroups_1_1_max_plus_semiring-members.html deleted file mode 100644 index ef86d9c1d..000000000 --- a/structlibsemigroups_1_1_max_plus_semiring-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::MaxPlusSemiring Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::MaxPlusSemiring, including all inherited members.

    - - - - - - - - -
    contains(int64_t) constlibsemigroups::Semiring< int64_t >inlinevirtual
    MaxPlusSemiring() (defined in libsemigroups::MaxPlusSemiring)libsemigroups::MaxPlusSemiring
    one() const overridelibsemigroups::MaxPlusSemiringvirtual
    plus(int64_t, int64_t) const overridelibsemigroups::MaxPlusSemiringvirtual
    prod(int64_t, int64_t) const overridelibsemigroups::MaxPlusSemiringvirtual
    zero() const overridelibsemigroups::MaxPlusSemiringvirtual
    ~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_max_plus_semiring.html b/structlibsemigroups_1_1_max_plus_semiring.html deleted file mode 100644 index b983ab404..000000000 --- a/structlibsemigroups_1_1_max_plus_semiring.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::MaxPlusSemiring Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::MaxPlusSemiring Struct Reference
    -
    -
    - -

    The max-plus semiring consists of the integers together with negative infinity with operations max and plus. Negative infinity is represented by NEGATIVE_INFINITY. - More...

    - -

    #include <semiring.hpp>

    -
    -Inheritance diagram for libsemigroups::MaxPlusSemiring:
    -
    -
    Inheritance graph
    - - - -
    [legend]
    -
    -Collaboration diagram for libsemigroups::MaxPlusSemiring:
    -
    -
    Collaboration graph
    - - - -
    [legend]
    - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

    int64_t one () const override
     Returns the integer 0. More...
     
    int64_t plus (int64_t, int64_t) const override
     Returns the maximum of the parameters. More...
     
    int64_t prod (int64_t, int64_t) const override
     Returns NEGATIVE_INFINITY if either parameter equals NEGATIVE_INFINITY, otherwise returns the usual integer sum of the parameters. More...
     
    int64_t zero () const override
     Returns NEGATIVE_INFINITY. More...
     
    - Public Member Functions inherited from libsemigroups::Semiring< int64_t >
    virtual ~Semiring ()
     A default destructor. More...
     
    virtual bool contains (int64_t) const
     Returns true if this contain the argument. More...
     
    -

    Detailed Description

    -

    The max-plus semiring consists of the integers together with negative infinity with operations max and plus. Negative infinity is represented by NEGATIVE_INFINITY.

    -

    Member Function Documentation

    - -

    ◆ one()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::MaxPlusSemiring::one () const
    -
    -overridevirtual
    -
    - -

    Returns the integer 0.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ plus()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::MaxPlusSemiring::plus (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the maximum of the parameters.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ prod()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::MaxPlusSemiring::prod (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns NEGATIVE_INFINITY if either parameter equals NEGATIVE_INFINITY, otherwise returns the usual integer sum of the parameters.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ zero()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::MaxPlusSemiring::zero () const
    -
    -overridevirtual
    -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_max_plus_semiring__coll__graph.map b/structlibsemigroups_1_1_max_plus_semiring__coll__graph.map deleted file mode 100644 index 5af3adda1..000000000 --- a/structlibsemigroups_1_1_max_plus_semiring__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_max_plus_semiring__coll__graph.md5 b/structlibsemigroups_1_1_max_plus_semiring__coll__graph.md5 deleted file mode 100644 index 67497ebd5..000000000 --- a/structlibsemigroups_1_1_max_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8eaa792fcd17598927d644d01f2719b4 \ No newline at end of file diff --git a/structlibsemigroups_1_1_max_plus_semiring__coll__graph.png b/structlibsemigroups_1_1_max_plus_semiring__coll__graph.png deleted file mode 100644 index 1fbe5d7c3..000000000 Binary files a/structlibsemigroups_1_1_max_plus_semiring__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.map b/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.map deleted file mode 100644 index 5af3adda1..000000000 --- a/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.md5 b/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.md5 deleted file mode 100644 index fea2879f9..000000000 --- a/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -b2c46279fd3e95988d494b54577c7dbe \ No newline at end of file diff --git a/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.png b/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.png deleted file mode 100644 index 1fbe5d7c3..000000000 Binary files a/structlibsemigroups_1_1_max_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_min_plus_semiring-members.html b/structlibsemigroups_1_1_min_plus_semiring-members.html deleted file mode 100644 index 893d7c614..000000000 --- a/structlibsemigroups_1_1_min_plus_semiring-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::MinPlusSemiring Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::MinPlusSemiring, including all inherited members.

    - - - - - - - - -
    contains(int64_t) constlibsemigroups::Semiring< int64_t >inlinevirtual
    MinPlusSemiring() (defined in libsemigroups::MinPlusSemiring)libsemigroups::MinPlusSemiring
    one() const overridelibsemigroups::MinPlusSemiringvirtual
    plus(int64_t, int64_t) const overridelibsemigroups::MinPlusSemiringvirtual
    prod(int64_t, int64_t) const overridelibsemigroups::MinPlusSemiringvirtual
    zero() const overridelibsemigroups::MinPlusSemiringvirtual
    ~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_min_plus_semiring.html b/structlibsemigroups_1_1_min_plus_semiring.html deleted file mode 100644 index 12e356086..000000000 --- a/structlibsemigroups_1_1_min_plus_semiring.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::MinPlusSemiring Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::MinPlusSemiring Struct Reference
    -
    -
    - -

    The min-plus semiring consists of the integers together with infinity with operations min and plus. Infinity is represented by POSITIVE_INFINITY. - More...

    - -

    #include <semiring.hpp>

    -
    -Inheritance diagram for libsemigroups::MinPlusSemiring:
    -
    -
    Inheritance graph
    - - - -
    [legend]
    -
    -Collaboration diagram for libsemigroups::MinPlusSemiring:
    -
    -
    Collaboration graph
    - - - -
    [legend]
    - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

    int64_t one () const override
     Returns the integer 0. More...
     
    int64_t plus (int64_t, int64_t) const override
     Returns the minimum of the parameters. More...
     
    int64_t prod (int64_t, int64_t) const override
     Returns POSITIVE_INFINITY if either parameter equals POSITIVE_INFINITY, otherwise returns the usual integer sum of the parameters. More...
     
    int64_t zero () const override
     Returns POSITIVE_INFINITY. More...
     
    - Public Member Functions inherited from libsemigroups::Semiring< int64_t >
    virtual ~Semiring ()
     A default destructor. More...
     
    virtual bool contains (int64_t) const
     Returns true if this contain the argument. More...
     
    -

    Detailed Description

    -

    The min-plus semiring consists of the integers together with infinity with operations min and plus. Infinity is represented by POSITIVE_INFINITY.

    -

    Member Function Documentation

    - -

    ◆ one()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::MinPlusSemiring::one () const
    -
    -overridevirtual
    -
    - -

    Returns the integer 0.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ plus()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::MinPlusSemiring::plus (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the minimum of the parameters.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ prod()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::MinPlusSemiring::prod (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns POSITIVE_INFINITY if either parameter equals POSITIVE_INFINITY, otherwise returns the usual integer sum of the parameters.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ zero()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::MinPlusSemiring::zero () const
    -
    -overridevirtual
    -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_min_plus_semiring__coll__graph.map b/structlibsemigroups_1_1_min_plus_semiring__coll__graph.map deleted file mode 100644 index deb2c573c..000000000 --- a/structlibsemigroups_1_1_min_plus_semiring__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_min_plus_semiring__coll__graph.md5 b/structlibsemigroups_1_1_min_plus_semiring__coll__graph.md5 deleted file mode 100644 index ce9d565bc..000000000 --- a/structlibsemigroups_1_1_min_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -cfbd65f422792185cf62c2f688f936b2 \ No newline at end of file diff --git a/structlibsemigroups_1_1_min_plus_semiring__coll__graph.png b/structlibsemigroups_1_1_min_plus_semiring__coll__graph.png deleted file mode 100644 index e0ec00fa6..000000000 Binary files a/structlibsemigroups_1_1_min_plus_semiring__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.map b/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.map deleted file mode 100644 index deb2c573c..000000000 --- a/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.md5 b/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.md5 deleted file mode 100644 index e72c5f8ed..000000000 --- a/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ae479962409f6bc4f1f11d6a6df0d3d4 \ No newline at end of file diff --git a/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.png b/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.png deleted file mode 100644 index e0ec00fa6..000000000 Binary files a/structlibsemigroups_1_1_min_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_n_e_g_a_t_i_v_e___i_n_f_i_n_i_t_y-members.html b/structlibsemigroups_1_1_n_e_g_a_t_i_v_e___i_n_f_i_n_i_t_y-members.html deleted file mode 100644 index c6610755b..000000000 --- a/structlibsemigroups_1_1_n_e_g_a_t_i_v_e___i_n_f_i_n_i_t_y-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::NEGATIVE_INFINITY Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::NEGATIVE_INFINITY, including all inherited members.

    - - - - -
    get_value() const noexcept (defined in libsemigroups::Constant< TOffset, TMaxOrMin >)libsemigroups::Constant< TOffset, TMaxOrMin >inline
    NEGATIVE_INFINITY() (defined in libsemigroups::NEGATIVE_INFINITY)libsemigroups::NEGATIVE_INFINITYinline
    operator TIntegralType() const noexcept (defined in libsemigroups::Constant< TOffset, TMaxOrMin >)libsemigroups::Constant< TOffset, TMaxOrMin >inline
    - - - - diff --git a/structlibsemigroups_1_1_n_e_g_a_t_i_v_e___i_n_f_i_n_i_t_y.html b/structlibsemigroups_1_1_n_e_g_a_t_i_v_e___i_n_f_i_n_i_t_y.html deleted file mode 100644 index a1a96c467..000000000 --- a/structlibsemigroups_1_1_n_e_g_a_t_i_v_e___i_n_f_i_n_i_t_y.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::NEGATIVE_INFINITY Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::NEGATIVE_INFINITY Struct Reference
    -
    -
    - -

    Value representing \(-\infty\). - More...

    - -

    #include <constants.hpp>

    - -

    Inherits libsemigroups::Constant< TOffset, TMaxOrMin >.

    -

    Detailed Description

    -

    Value representing \(-\infty\).

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_p_o_s_i_t_i_v_e___i_n_f_i_n_i_t_y-members.html b/structlibsemigroups_1_1_p_o_s_i_t_i_v_e___i_n_f_i_n_i_t_y-members.html deleted file mode 100644 index 382f17bb7..000000000 --- a/structlibsemigroups_1_1_p_o_s_i_t_i_v_e___i_n_f_i_n_i_t_y-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::POSITIVE_INFINITY Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::POSITIVE_INFINITY, including all inherited members.

    - - - - -
    get_value() const noexcept (defined in libsemigroups::Constant< TOffset, TMaxOrMin >)libsemigroups::Constant< TOffset, TMaxOrMin >inline
    operator TIntegralType() const noexcept (defined in libsemigroups::Constant< TOffset, TMaxOrMin >)libsemigroups::Constant< TOffset, TMaxOrMin >inline
    POSITIVE_INFINITY() (defined in libsemigroups::POSITIVE_INFINITY)libsemigroups::POSITIVE_INFINITYinline
    - - - - diff --git a/structlibsemigroups_1_1_p_o_s_i_t_i_v_e___i_n_f_i_n_i_t_y.html b/structlibsemigroups_1_1_p_o_s_i_t_i_v_e___i_n_f_i_n_i_t_y.html deleted file mode 100644 index 641f17b18..000000000 --- a/structlibsemigroups_1_1_p_o_s_i_t_i_v_e___i_n_f_i_n_i_t_y.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::POSITIVE_INFINITY Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::POSITIVE_INFINITY Struct Reference
    -
    -
    - -

    Value representing \(\infty\). - More...

    - -

    #include <constants.hpp>

    - -

    Inherits libsemigroups::Constant< TOffset, TMaxOrMin >.

    -

    Detailed Description

    -

    Value representing \(\infty\).

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_polymorphic_p_transf.html b/structlibsemigroups_1_1_polymorphic_p_transf.html deleted file mode 100644 index e828f54b5..000000000 --- a/structlibsemigroups_1_1_polymorphic_p_transf.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::PolymorphicPTransf Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::PolymorphicPTransf Struct Reference
    -
    -
    - -

    Abstract class for partial transformations. - More...

    - -

    #include <transf.hpp>

    - -

    Inherited by libsemigroups::BasePTransf< TValueType, std::array< TValueType, N > >, libsemigroups::BasePTransf< TValueType, std::vector< TValueType > >, and libsemigroups::BasePTransf< TValueType, TContainer >.

    -

    Detailed Description

    -

    Abstract class for partial transformations.

    -

    This is a template class for partial transformations, which is a subclass of ElementWithVectorDataDefaultHash. For example, Transformation<uint128_t> is a subclass of PTransformation<uint128_t, Transformation<uint128_t>>.

    -

    The template parameter TValueType is the type of image values, i.e. uint16_t, and so on. The value of the template parameter S can be used to reduce (or increase) the amount of memory required by instances of this class.

    -

    The template parameter TSubclass is the subclass of PTransformation used by the PTransformation::identity method to construct an identity, so that the return value of the method PTransformation::identity is of type TSubclass instead of type PTransformation.

    -

    This class is abstract since it does not implement all methods required by the Element class, it exists to provide common methods for its subclasses.

    -

    A partial transformation \(f\) is just a function defined on a subset of \(\{0, 1, \ldots, n - 1\}\) for some integer \(n\) called the degree of f. A partial transformation is stored as a vector of the images of \(\{0, 1, \ldots, n -1\}\), i.e. \(\{(0)f, (1)f, \ldots, (n - 1)f\}\) where the value PTransformation::UNDEFINED is used to indicate that \((i)f\) is, you guessed it, undefined (i.e. not among the points where \(f\) is defined).

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_prefix-members.html b/structlibsemigroups_1_1_prefix-members.html deleted file mode 100644 index 8e99ded8e..000000000 --- a/structlibsemigroups_1_1_prefix-members.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::Prefix Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::Prefix, including all inherited members.

    - - -
    operator()(rws_word_t::const_iterator const &begin_word1, rws_word_t::const_iterator end_word1, rws_word_t::const_iterator const &begin_word2, rws_word_t::const_iterator const &end_word2) const (defined in libsemigroups::Prefix)libsemigroups::Prefixinline
    - - - - diff --git a/structlibsemigroups_1_1_prefix.html b/structlibsemigroups_1_1_prefix.html deleted file mode 100644 index 17ed08bf6..000000000 --- a/structlibsemigroups_1_1_prefix.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Prefix Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::Prefix Struct Reference
    -
    -
    - - - - -

    -Public Member Functions

    -size_t operator() (rws_word_t::const_iterator const &begin_word1, rws_word_t::const_iterator end_word1, rws_word_t::const_iterator const &begin_word2, rws_word_t::const_iterator const &end_word2) const
     
    -
    The documentation for this struct was generated from the following file:
      -
    • src/rws.cc
    • -
    -
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure-members.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure-members.html deleted file mode 100644 index e59ea42c4..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure-members.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::RWS::OverlapMeasure Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::RWS::OverlapMeasure, including all inherited members.

    - - - -
    operator()(Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it)=0 (defined in libsemigroups::RWS::OverlapMeasure)libsemigroups::RWS::OverlapMeasurepure virtual
    ~OverlapMeasure() (defined in libsemigroups::RWS::OverlapMeasure)libsemigroups::RWS::OverlapMeasureinlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure.html deleted file mode 100644 index 0b1059d47..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS::OverlapMeasure Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::RWS::OverlapMeasure Struct Referenceabstract
    -
    -
    -
    -Inheritance diagram for libsemigroups::RWS::OverlapMeasure:
    -
    -
    Inheritance graph
    - - - - - -
    - - - - - - - - -

    -Classes

    struct  AB_BC
     
    struct  ABC
     
    struct  max_AB_BC
     
    - - - -

    -Public Member Functions

    -virtual size_t operator() (Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it)=0
     
    -
    The documentation for this struct was generated from the following file:
      -
    • src/rws.cc
    • -
    -
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c-members.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c-members.html deleted file mode 100644 index 2db2db42b..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c-members.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::RWS::OverlapMeasure::AB_BC Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::RWS::OverlapMeasure::AB_BC, including all inherited members.

    - - - -
    operator()(Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it) final (defined in libsemigroups::RWS::OverlapMeasure::AB_BC)libsemigroups::RWS::OverlapMeasure::AB_BCinlinevirtual
    ~OverlapMeasure() (defined in libsemigroups::RWS::OverlapMeasure)libsemigroups::RWS::OverlapMeasureinlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c.html deleted file mode 100644 index 5c475fd9e..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS::OverlapMeasure::AB_BC Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::RWS::OverlapMeasure::AB_BC Struct Reference
    -
    -
    -
    -Inheritance diagram for libsemigroups::RWS::OverlapMeasure::AB_BC:
    -
    -
    Inheritance graph
    - - - -
    -
    -Collaboration diagram for libsemigroups::RWS::OverlapMeasure::AB_BC:
    -
    -
    Collaboration graph
    - - - -
    - - - - -

    -Public Member Functions

    -size_t operator() (Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it) final
     
    -
    The documentation for this struct was generated from the following file:
      -
    • src/rws.cc
    • -
    -
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.map b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.map deleted file mode 100644 index d01b2ce79..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.md5 b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.md5 deleted file mode 100644 index 4095560f5..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -22f0935a4abc46538dd747079379ec1e diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.png b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.png deleted file mode 100644 index fe277b584..000000000 Binary files a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.map b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.map deleted file mode 100644 index d01b2ce79..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.md5 b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.md5 deleted file mode 100644 index 81912cb48..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -44226f50dcebf2d5eb02e02d7e47ba7d diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.png b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.png deleted file mode 100644 index fe277b584..000000000 Binary files a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b___b_c__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c-members.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c-members.html deleted file mode 100644 index 9c4cf6866..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c-members.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::RWS::OverlapMeasure::ABC Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::RWS::OverlapMeasure::ABC, including all inherited members.

    - - - -
    operator()(Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it) final (defined in libsemigroups::RWS::OverlapMeasure::ABC)libsemigroups::RWS::OverlapMeasure::ABCinlinevirtual
    ~OverlapMeasure() (defined in libsemigroups::RWS::OverlapMeasure)libsemigroups::RWS::OverlapMeasureinlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c.html deleted file mode 100644 index 1c9e6a275..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS::OverlapMeasure::ABC Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::RWS::OverlapMeasure::ABC Struct Reference
    -
    -
    -
    -Inheritance diagram for libsemigroups::RWS::OverlapMeasure::ABC:
    -
    -
    Inheritance graph
    - - - -
    -
    -Collaboration diagram for libsemigroups::RWS::OverlapMeasure::ABC:
    -
    -
    Collaboration graph
    - - - -
    - - - - -

    -Public Member Functions

    -size_t operator() (Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it) final
     
    -
    The documentation for this struct was generated from the following file:
      -
    • src/rws.cc
    • -
    -
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.map b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.map deleted file mode 100644 index 259709cb1..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.md5 b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.md5 deleted file mode 100644 index 201d45d12..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ec21c27b199f7cd3550ffa0fb1596626 diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.png b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.png deleted file mode 100644 index 5fa2ec325..000000000 Binary files a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.map b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.map deleted file mode 100644 index 259709cb1..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.md5 b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.md5 deleted file mode 100644 index ad656595f..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ea36e6043e442662a0a24a36e76312bf diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.png b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.png deleted file mode 100644 index 5fa2ec325..000000000 Binary files a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1_a_b_c__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c-members.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c-members.html deleted file mode 100644 index af0c1c1b6..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c-members.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::RWS::OverlapMeasure::max_AB_BC Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::RWS::OverlapMeasure::max_AB_BC, including all inherited members.

    - - - -
    operator()(Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it) final (defined in libsemigroups::RWS::OverlapMeasure::max_AB_BC)libsemigroups::RWS::OverlapMeasure::max_AB_BCinlinevirtual
    ~OverlapMeasure() (defined in libsemigroups::RWS::OverlapMeasure)libsemigroups::RWS::OverlapMeasureinlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c.html b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c.html deleted file mode 100644 index 9a81a2f6c..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS::OverlapMeasure::max_AB_BC Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::RWS::OverlapMeasure::max_AB_BC Struct Reference
    -
    -
    -
    -Inheritance diagram for libsemigroups::RWS::OverlapMeasure::max_AB_BC:
    -
    -
    Inheritance graph
    - - - -
    -
    -Collaboration diagram for libsemigroups::RWS::OverlapMeasure::max_AB_BC:
    -
    -
    Collaboration graph
    - - - -
    - - - - -

    -Public Member Functions

    -size_t operator() (Rule const *AB, Rule const *BC, rws_word_t::const_iterator const &it) final
     
    -
    The documentation for this struct was generated from the following file:
      -
    • src/rws.cc
    • -
    -
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.map b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.map deleted file mode 100644 index 07a2ae015..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.md5 b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.md5 deleted file mode 100644 index cfbd733a6..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -effc4fb95be723f9cb6ebe9c516df749 diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.png b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.png deleted file mode 100644 index 02cd04869..000000000 Binary files a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.map b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.map deleted file mode 100644 index 07a2ae015..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.md5 b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.md5 deleted file mode 100644 index 5f578c162..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -b1595a31feae7734ff17b84123992956 diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.png b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.png deleted file mode 100644 index 02cd04869..000000000 Binary files a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure_1_1max___a_b___b_c__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.map b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.map deleted file mode 100644 index 9be919b78..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.md5 b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.md5 deleted file mode 100644 index 4a9a072d3..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -3cabe75e5aa5017ec1db70ab80a62c4c diff --git a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.png b/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.png deleted file mode 100644 index 67ef4578d..000000000 Binary files a/structlibsemigroups_1_1_r_w_s_1_1_overlap_measure__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_r_w_s_1_1internal-members.html b/structlibsemigroups_1_1_r_w_s_1_1internal-members.html deleted file mode 100644 index dd72c1eb6..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1internal-members.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::RWS::internal Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::RWS::internal, including all inherited members.

    - - - -
    rws_letter_t typedef (defined in libsemigroups::RWS::internal)libsemigroups::RWS::internal
    rws_word_t typedef (defined in libsemigroups::RWS::internal)libsemigroups::RWS::internal
    - - - - diff --git a/structlibsemigroups_1_1_r_w_s_1_1internal.html b/structlibsemigroups_1_1_r_w_s_1_1internal.html deleted file mode 100644 index 6c493d1a1..000000000 --- a/structlibsemigroups_1_1_r_w_s_1_1internal.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::RWS::internal Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::RWS::internal Struct Reference
    -
    -
    - - - - - - -

    -Public Types

    -typedef rws_letter_t rws_letter_t
     
    -typedef rws_word_t rws_word_t
     
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_smallest_integer-members.html b/structlibsemigroups_1_1_smallest_integer-members.html deleted file mode 100644 index a72b5ea04..000000000 --- a/structlibsemigroups_1_1_smallest_integer-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::SmallestInteger< N > Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::SmallestInteger< N >, including all inherited members.

    - - -
    type typedeflibsemigroups::SmallestInteger< N >
    - - - - diff --git a/structlibsemigroups_1_1_smallest_integer.html b/structlibsemigroups_1_1_smallest_integer.html deleted file mode 100644 index 60cccef0d..000000000 --- a/structlibsemigroups_1_1_smallest_integer.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::SmallestInteger< N > Struct Template Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::SmallestInteger< N > Struct Template Reference
    -
    -
    - -

    Provides a type giving the smallest unsigned integer type capable of representing the template N. - More...

    - -

    #include <types.hpp>

    - - - - - -

    -Public Types

    using type = typename std::conditional< N >=0x100000000, uint64_t, typename std::conditional< N >=0x10000, uint32_t, typename std::conditional< N >=0x100, uint16_t, uint8_t >::type >::type >::type
     The smallest (in terms of memory required) unsigned integer type which can represent N. More...
     
    -

    Detailed Description

    -

    template<size_t N>
    -struct libsemigroups::SmallestInteger< N >

    - -

    Provides a type giving the smallest unsigned integer type capable of representing the template N.

    -

    The type SmallestInteger<N>::type contains the smallest (in terms of memory required) unsigned integer type which can represent the non-negative integer N.

    -

    Member Typedef Documentation

    - -

    ◆ type

    - -
    -
    -
    -template<size_t N>
    - - - - -
    using libsemigroups::SmallestInteger< N >::type = typename std::conditional< N >= 0x100000000, uint64_t, typename std::conditional< N >= 0x10000, uint32_t, typename std::conditional<N >= 0x100, uint16_t, uint8_t>::type>:: type>::type
    -
    - -

    The smallest (in terms of memory required) unsigned integer type which can represent N.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_suffix-members.html b/structlibsemigroups_1_1_suffix-members.html deleted file mode 100644 index c3634f1cf..000000000 --- a/structlibsemigroups_1_1_suffix-members.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::Suffix Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::Suffix, including all inherited members.

    - - -
    operator()(rws_word_t::const_iterator begin_word1, rws_word_t::const_iterator const &end_word1, rws_word_t::const_iterator const &begin_word2, rws_word_t::const_iterator const &end_word2) const (defined in libsemigroups::Suffix)libsemigroups::Suffixinline
    - - - - diff --git a/structlibsemigroups_1_1_suffix.html b/structlibsemigroups_1_1_suffix.html deleted file mode 100644 index d29878f40..000000000 --- a/structlibsemigroups_1_1_suffix.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::Suffix Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::Suffix Struct Reference
    -
    -
    - - - - -

    -Public Member Functions

    -size_t operator() (rws_word_t::const_iterator begin_word1, rws_word_t::const_iterator const &end_word1, rws_word_t::const_iterator const &begin_word2, rws_word_t::const_iterator const &end_word2) const
     
    -
    The documentation for this struct was generated from the following file:
      -
    • src/rws.cc
    • -
    -
    - - - - diff --git a/structlibsemigroups_1_1_traits_equal_1_1internal__equal__to-members.html b/structlibsemigroups_1_1_traits_equal_1_1internal__equal__to-members.html deleted file mode 100644 index faa96d164..000000000 --- a/structlibsemigroups_1_1_traits_equal_1_1internal__equal__to-members.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::TraitsEqual< TElementType, TElementEqual >::internal_equal_to Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::TraitsEqual< TElementType, TElementEqual >::internal_equal_to, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - -
    const_element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    const_pointer typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    const_reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    external_copy(const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    external_free(element_type) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    internal_const_element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    internal_const_reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    internal_copy(internal_const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    internal_element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    internal_free(internal_element_type) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    internal_reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    operator()(internal_const_element_type x, internal_const_element_type y) const (defined in libsemigroups::TraitsEqual< TElementType, TElementEqual >::internal_equal_to)libsemigroups::TraitsEqual< TElementType, TElementEqual >::internal_equal_toinline
    pointer typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    to_external(internal_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    to_external_const(internal_const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    to_internal(reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    to_internal_const(const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    - - - - diff --git a/structlibsemigroups_1_1_traits_equal_1_1internal__equal__to.html b/structlibsemigroups_1_1_traits_equal_1_1internal__equal__to.html deleted file mode 100644 index d9c0501ad..000000000 --- a/structlibsemigroups_1_1_traits_equal_1_1internal__equal__to.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::TraitsEqual< TElementType, TElementEqual >::internal_equal_to Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::TraitsEqual< TElementType, TElementEqual >::internal_equal_to Struct Reference
    -
    -
    - -

    Provides a call operator for comparing elements of this. - More...

    - -

    #include <traits.hpp>

    - -

    Inherits libsemigroups::Traits< TElementType >.

    - - - - -

    -Public Member Functions

    -bool operator() (internal_const_element_type x, internal_const_element_type y) const
     
    -

    Detailed Description

    -

    template<typename TElementType, typename TElementEqual = internal::equal_to<TElementType>>
    -struct libsemigroups::TraitsEqual< TElementType, TElementEqual >::internal_equal_to

    - -

    Provides a call operator for comparing elements of this.

    -

    This struct provides a call operator for comparing two elements of this, provided as internal_const_element_types.

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_traits_hash_equal_1_1internal__hash-members.html b/structlibsemigroups_1_1_traits_hash_equal_1_1internal__hash-members.html deleted file mode 100644 index 505d90c93..000000000 --- a/structlibsemigroups_1_1_traits_hash_equal_1_1internal__hash-members.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::TraitsHashEqual< TElementType, TElementHash, TElementEqual >::internal_hash Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::TraitsHashEqual< TElementType, TElementHash, TElementEqual >::internal_hash, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - -
    const_element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    const_pointer typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    const_reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    external_copy(const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    external_free(element_type) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    internal_const_element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    internal_const_reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    internal_copy(internal_const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    internal_element_type typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    internal_free(internal_element_type) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    internal_reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    operator()(internal_const_element_type x) const (defined in libsemigroups::TraitsHashEqual< TElementType, TElementHash, TElementEqual >::internal_hash)libsemigroups::TraitsHashEqual< TElementType, TElementHash, TElementEqual >::internal_hashinline
    pointer typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    reference typedef (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >
    to_external(internal_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    to_external_const(internal_const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    to_internal(reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    to_internal_const(const_reference x) const (defined in libsemigroups::Traits< TElementType >)libsemigroups::Traits< TElementType >inline
    - - - - diff --git a/structlibsemigroups_1_1_traits_hash_equal_1_1internal__hash.html b/structlibsemigroups_1_1_traits_hash_equal_1_1internal__hash.html deleted file mode 100644 index 8323f93ae..000000000 --- a/structlibsemigroups_1_1_traits_hash_equal_1_1internal__hash.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::TraitsHashEqual< TElementType, TElementHash, TElementEqual >::internal_hash Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::TraitsHashEqual< TElementType, TElementHash, TElementEqual >::internal_hash Struct Reference
    -
    -
    - -

    Provides a call operator for hashing elements of this. - More...

    - -

    #include <traits.hpp>

    - -

    Inherits libsemigroups::Traits< TElementType >.

    - - - - -

    -Public Member Functions

    -size_t operator() (internal_const_element_type x) const
     
    -

    Detailed Description

    -

    template<typename TElementType, typename TElementHash = internal::hash<TElementType>, typename TElementEqual = internal::equal_to<TElementType>>
    -struct libsemigroups::TraitsHashEqual< TElementType, TElementHash, TElementEqual >::internal_hash

    - -

    Provides a call operator for hashing elements of this.

    -

    This struct provides a call operator for hashing an element of this, provided as an internal_const_element_type.

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring-members.html b/structlibsemigroups_1_1_tropical_max_plus_semiring-members.html deleted file mode 100644 index deb42b29f..000000000 --- a/structlibsemigroups_1_1_tropical_max_plus_semiring-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::TropicalMaxPlusSemiring Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::TropicalMaxPlusSemiring, including all inherited members.

    - - - - - - - - - - -
    contains(int64_t) const overridelibsemigroups::TropicalMaxPlusSemiringvirtual
    one() const overridelibsemigroups::TropicalMaxPlusSemiringvirtual
    plus(int64_t, int64_t) const overridelibsemigroups::TropicalMaxPlusSemiringvirtual
    prod(int64_t, int64_t) const overridelibsemigroups::TropicalMaxPlusSemiringvirtual
    SemiringWithThreshold(int64_t)libsemigroups::SemiringWithThresholdexplicit
    threshold() constlibsemigroups::SemiringWithThreshold
    TropicalMaxPlusSemiring(int64_t)libsemigroups::TropicalMaxPlusSemiringexplicit
    zero() const overridelibsemigroups::TropicalMaxPlusSemiringvirtual
    ~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring.html b/structlibsemigroups_1_1_tropical_max_plus_semiring.html deleted file mode 100644 index 04a75e8b0..000000000 --- a/structlibsemigroups_1_1_tropical_max_plus_semiring.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::TropicalMaxPlusSemiring Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::TropicalMaxPlusSemiring Struct Reference
    -
    -
    - -

    The tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\POSITIVE_INFINITY\). Negative infinity is represented by NEGATIVE_INFINITY. - More...

    - -

    #include <semiring.hpp>

    -
    -Inheritance diagram for libsemigroups::TropicalMaxPlusSemiring:
    -
    -
    Inheritance graph
    - - - - -
    [legend]
    -
    -Collaboration diagram for libsemigroups::TropicalMaxPlusSemiring:
    -
    -
    Collaboration graph
    - - - - -
    [legend]
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     TropicalMaxPlusSemiring (int64_t)
     Construct from threshold. More...
     
    bool contains (int64_t) const override
     Returns true if this contain the argument. More...
     
    int64_t one () const override
     Returns the integer 0. More...
     
    int64_t plus (int64_t, int64_t) const override
     Returns the minimum of (the maximum of x and y) and the threshold of the semiring. More...
     
    int64_t prod (int64_t, int64_t) const override
     Returns NEGATIVE_INFINITY if either parameter equal NEGATIVE_INFINITY, otherwise returns the minimum of the usual integer sum of the parameters and the threshold of the semiring. More...
     
    int64_t zero () const override
     Returns the NEGATIVE_INFINITY. More...
     
    - Public Member Functions inherited from libsemigroups::SemiringWithThreshold
     SemiringWithThreshold (int64_t)
     A class for semirings with a threshold. More...
     
    int64_t threshold () const
     Returns the threshold of a semiring with threshold. More...
     
    - Public Member Functions inherited from libsemigroups::Semiring< int64_t >
    virtual ~Semiring ()
     A default destructor. More...
     
    -

    Detailed Description

    -

    The tropical max-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(-\POSITIVE_INFINITY\). Negative infinity is represented by NEGATIVE_INFINITY.

    -

    Constructor & Destructor Documentation

    - -

    ◆ TropicalMaxPlusSemiring()

    - -
    -
    - - - - - -
    - - - - - - - - -
    libsemigroups::TropicalMaxPlusSemiring::TropicalMaxPlusSemiring (int64_t )
    -
    -explicit
    -
    - -

    Construct from threshold.

    -

    The threshold is the largest integer in the semiring.

    - -
    -
    -

    Member Function Documentation

    - -

    ◆ contains()

    - -
    -
    - - - - - -
    - - - - - - - - -
    bool libsemigroups::TropicalMaxPlusSemiring::contains (int64_t ) const
    -
    -overridevirtual
    -
    - -

    Returns true if this contain the argument.

    -

    This method returns true if the argument is mathematically contained in this. For semirings without threshold, this will always return true.

    - -

    Reimplemented from libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ one()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::TropicalMaxPlusSemiring::one () const
    -
    -overridevirtual
    -
    - -

    Returns the integer 0.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ plus()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::TropicalMaxPlusSemiring::plus (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the minimum of (the maximum of x and y) and the threshold of the semiring.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ prod()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::TropicalMaxPlusSemiring::prod (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns NEGATIVE_INFINITY if either parameter equal NEGATIVE_INFINITY, otherwise returns the minimum of the usual integer sum of the parameters and the threshold of the semiring.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ zero()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::TropicalMaxPlusSemiring::zero () const
    -
    -overridevirtual
    -
    - -

    Returns the NEGATIVE_INFINITY.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.map b/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.map deleted file mode 100644 index c4523a77a..000000000 --- a/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.md5 b/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.md5 deleted file mode 100644 index e5d0ede3e..000000000 --- a/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -413d6cc10333d76d2ae4b395db034ce3 \ No newline at end of file diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.png b/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.png deleted file mode 100644 index 2d925c1c1..000000000 Binary files a/structlibsemigroups_1_1_tropical_max_plus_semiring__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.map b/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.map deleted file mode 100644 index c4523a77a..000000000 --- a/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.md5 b/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.md5 deleted file mode 100644 index 87de72a7b..000000000 --- a/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -c499542e5f4134300f663ee704a66218 \ No newline at end of file diff --git a/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.png b/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.png deleted file mode 100644 index 2d925c1c1..000000000 Binary files a/structlibsemigroups_1_1_tropical_max_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring-members.html b/structlibsemigroups_1_1_tropical_min_plus_semiring-members.html deleted file mode 100644 index 00f2e5dc7..000000000 --- a/structlibsemigroups_1_1_tropical_min_plus_semiring-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::TropicalMinPlusSemiring Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::TropicalMinPlusSemiring, including all inherited members.

    - - - - - - - - - - -
    contains(int64_t) const overridelibsemigroups::TropicalMinPlusSemiringvirtual
    one() const overridelibsemigroups::TropicalMinPlusSemiringvirtual
    plus(int64_t, int64_t) const overridelibsemigroups::TropicalMinPlusSemiringvirtual
    prod(int64_t, int64_t) const overridelibsemigroups::TropicalMinPlusSemiringvirtual
    SemiringWithThreshold(int64_t)libsemigroups::SemiringWithThresholdexplicit
    threshold() constlibsemigroups::SemiringWithThreshold
    TropicalMinPlusSemiring(int64_t)libsemigroups::TropicalMinPlusSemiringexplicit
    zero() const overridelibsemigroups::TropicalMinPlusSemiringvirtual
    ~Semiring()libsemigroups::Semiring< int64_t >inlinevirtual
    - - - - diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring.html b/structlibsemigroups_1_1_tropical_min_plus_semiring.html deleted file mode 100644 index 8648820ec..000000000 --- a/structlibsemigroups_1_1_tropical_min_plus_semiring.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::TropicalMinPlusSemiring Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::TropicalMinPlusSemiring Struct Reference
    -
    -
    - -

    The tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\POSITIVE_INFINITY\). Infinity is represented by POSITIVE_INFINITY. - More...

    - -

    #include <semiring.hpp>

    -
    -Inheritance diagram for libsemigroups::TropicalMinPlusSemiring:
    -
    -
    Inheritance graph
    - - - - -
    [legend]
    -
    -Collaboration diagram for libsemigroups::TropicalMinPlusSemiring:
    -
    -
    Collaboration graph
    - - - - -
    [legend]
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     TropicalMinPlusSemiring (int64_t)
     Construct from threshold. More...
     
    bool contains (int64_t) const override
     Returns true if this contain the argument. More...
     
    int64_t one () const override
     Returns the integer 0. More...
     
    int64_t plus (int64_t, int64_t) const override
     Returns the minimum of the parameters. More...
     
    int64_t prod (int64_t, int64_t) const override
     Returns POSITIVE_INFINITY if either parameter equals POSITIVE_INFINITY, otherwise return the minimum of the usual integer sum of the parameters and the threshold of the semiring. More...
     
    int64_t zero () const override
     Returns POSITIVE_INFINITY. More...
     
    - Public Member Functions inherited from libsemigroups::SemiringWithThreshold
     SemiringWithThreshold (int64_t)
     A class for semirings with a threshold. More...
     
    int64_t threshold () const
     Returns the threshold of a semiring with threshold. More...
     
    - Public Member Functions inherited from libsemigroups::Semiring< int64_t >
    virtual ~Semiring ()
     A default destructor. More...
     
    -

    Detailed Description

    -

    The tropical min-plus semiring consists of the integers \(\{0, \ldots , t\}\) for some value \(t\) (called the threshold of the semiring) and \(\POSITIVE_INFINITY\). Infinity is represented by POSITIVE_INFINITY.

    -

    Constructor & Destructor Documentation

    - -

    ◆ TropicalMinPlusSemiring()

    - -
    -
    - - - - - -
    - - - - - - - - -
    libsemigroups::TropicalMinPlusSemiring::TropicalMinPlusSemiring (int64_t )
    -
    -explicit
    -
    - -

    Construct from threshold.

    -

    The threshold is the largest integer in the semiring.

    - -
    -
    -

    Member Function Documentation

    - -

    ◆ contains()

    - -
    -
    - - - - - -
    - - - - - - - - -
    bool libsemigroups::TropicalMinPlusSemiring::contains (int64_t ) const
    -
    -overridevirtual
    -
    - -

    Returns true if this contain the argument.

    -

    This method returns true if the argument is mathematically contained in this. For semirings without threshold, this will always return true.

    - -

    Reimplemented from libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ one()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::TropicalMinPlusSemiring::one () const
    -
    -overridevirtual
    -
    - -

    Returns the integer 0.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ plus()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::TropicalMinPlusSemiring::plus (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns the minimum of the parameters.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ prod()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    int64_t libsemigroups::TropicalMinPlusSemiring::prod (int64_t ,
    int64_t  
    ) const
    -
    -overridevirtual
    -
    - -

    Returns POSITIVE_INFINITY if either parameter equals POSITIVE_INFINITY, otherwise return the minimum of the usual integer sum of the parameters and the threshold of the semiring.

    - -

    Implements libsemigroups::Semiring< int64_t >.

    - -
    -
    - -

    ◆ zero()

    - -
    -
    - - - - - -
    - - - - - - - -
    int64_t libsemigroups::TropicalMinPlusSemiring::zero () const
    -
    -overridevirtual
    -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.map b/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.map deleted file mode 100644 index 8bdfa4988..000000000 --- a/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.md5 b/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.md5 deleted file mode 100644 index 39c51dbac..000000000 --- a/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -35adba98119364338d3b69f2f5b899b3 \ No newline at end of file diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.png b/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.png deleted file mode 100644 index a339444ff..000000000 Binary files a/structlibsemigroups_1_1_tropical_min_plus_semiring__coll__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.map b/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.map deleted file mode 100644 index 8bdfa4988..000000000 --- a/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.md5 b/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.md5 deleted file mode 100644 index 90dfaf3b5..000000000 --- a/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -89661b5e93525624e006ea6a08d21c86 \ No newline at end of file diff --git a/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.png b/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.png deleted file mode 100644 index a339444ff..000000000 Binary files a/structlibsemigroups_1_1_tropical_min_plus_semiring__inherit__graph.png and /dev/null differ diff --git a/structlibsemigroups_1_1_u_n_d_e_f_i_n_e_d-members.html b/structlibsemigroups_1_1_u_n_d_e_f_i_n_e_d-members.html deleted file mode 100644 index 076c32781..000000000 --- a/structlibsemigroups_1_1_u_n_d_e_f_i_n_e_d-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::UNDEFINED Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::UNDEFINED, including all inherited members.

    - - - - -
    get_value() const noexcept (defined in libsemigroups::Constant< TOffset, TMaxOrMin >)libsemigroups::Constant< TOffset, TMaxOrMin >inline
    operator TIntegralType() const noexcept (defined in libsemigroups::Constant< TOffset, TMaxOrMin >)libsemigroups::Constant< TOffset, TMaxOrMin >inline
    UNDEFINED() (defined in libsemigroups::UNDEFINED)libsemigroups::UNDEFINEDinline
    - - - - diff --git a/structlibsemigroups_1_1_u_n_d_e_f_i_n_e_d.html b/structlibsemigroups_1_1_u_n_d_e_f_i_n_e_d.html deleted file mode 100644 index a0c5f0264..000000000 --- a/structlibsemigroups_1_1_u_n_d_e_f_i_n_e_d.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::UNDEFINED Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::UNDEFINED Struct Reference
    -
    -
    - -

    UNDEFINED value. - More...

    - -

    #include <constants.hpp>

    - -

    Inherits libsemigroups::Constant< TOffset, TMaxOrMin >.

    -

    Detailed Description

    -

    UNDEFINED value.

    -

    This variable is used to indicate that a value is undefined. For example, the cached hash value of an Element is initially set to this value.

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1equal__to_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_8bf3040e605cca164106bbfc5b71fc6c.html b/structlibsemigroups_1_1equal__to_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_8bf3040e605cca164106bbfc5b71fc6c.html deleted file mode 100644 index 5c4d81c7b..000000000 --- a/structlibsemigroups_1_1equal__to_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_8bf3040e605cca164106bbfc5b71fc6c.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::equal_to< TSubclass *, typename std::enable_if< std::is_base_of< libsemigroups::Element, TSubclass >::value >::type > Struct Template Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::equal_to< TSubclass *, typename std::enable_if< std::is_base_of< libsemigroups::Element, TSubclass >::value >::type > Struct Template Reference
    -
    -
    - -

    Provides a call operator for comparing Elements via pointers. - More...

    - -

    #include <element.hpp>

    - - - - - -

    -Public Member Functions

    bool operator() (TSubclass const *x, TSubclass const *y) const
     Tests equality of two const Element pointers via equality of the Elements they point to. More...
     
    -

    Detailed Description

    -

    template<class TSubclass>
    -struct libsemigroups::equal_to< TSubclass *, typename std::enable_if< std::is_base_of< libsemigroups::Element, TSubclass >::value >::type >

    - -

    Provides a call operator for comparing Elements via pointers.

    -

    This struct provides a call operator for comparing Element pointers (by comparing the Element objects they point to). This is used by various methods of the FroidurePin class.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    -
    -template<class TSubclass >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    bool libsemigroups::equal_to< TSubclass *, typename std::enable_if< std::is_base_of< libsemigroups::Element, TSubclass >::value >::type >::operator() (TSubclass const * x,
    TSubclass const * y 
    ) const
    -
    -inline
    -
    - -

    Tests equality of two const Element pointers via equality of the Elements they point to.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1equal__to_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_d572a3eaab8786a0fb93130f0f69ec56.html b/structlibsemigroups_1_1equal__to_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_d572a3eaab8786a0fb93130f0f69ec56.html deleted file mode 100644 index 59b067ec8..000000000 --- a/structlibsemigroups_1_1equal__to_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_d572a3eaab8786a0fb93130f0f69ec56.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::equal_to< TSubclass *, typename std::enable_if< std::is_base_of< libsemigroups::Element, TSubclass >::value >::type > Member List
    -
    - - - - - diff --git a/structlibsemigroups_1_1hash_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_1_1is2894f31e6df465aacbacfbcf67a500a4.html b/structlibsemigroups_1_1hash_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_1_1is2894f31e6df465aacbacfbcf67a500a4.html deleted file mode 100644 index cda8f725e..000000000 --- a/structlibsemigroups_1_1hash_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_1_1is2894f31e6df465aacbacfbcf67a500a4.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::hash< TSubclass *, typename std::enable_if< std::is_base_of< Element, TSubclass >::value >::type > Struct Template Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::hash< TSubclass *, typename std::enable_if< std::is_base_of< Element, TSubclass >::value >::type > Struct Template Reference
    -
    -
    - -

    Provides a call operator returning a hash value for an Element via a pointer. - More...

    - -

    #include <element.hpp>

    - - - - - -

    -Public Member Functions

    size_t operator() (TSubclass const *x) const
     Hashes an Element given by Element pointer. More...
     
    -

    Detailed Description

    -

    template<class TSubclass>
    -struct libsemigroups::hash< TSubclass *, typename std::enable_if< std::is_base_of< Element, TSubclass >::value >::type >

    - -

    Provides a call operator returning a hash value for an Element via a pointer.

    -

    This struct provides a call operator for obtaining a hash value for the Element from an Element pointer. This is used by various methods of the FroidurePin class.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    -
    -template<class TSubclass >
    - - - - - -
    - - - - - - - - -
    size_t libsemigroups::hash< TSubclass *, typename std::enable_if< std::is_base_of< Element, TSubclass >::value >::type >::operator() (TSubclass const * x) const
    -
    -inline
    -
    - -

    Hashes an Element given by Element pointer.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1hash_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_1_1is8802d8da0a9231599aab4c288a2fde1c.html b/structlibsemigroups_1_1hash_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_1_1is8802d8da0a9231599aab4c288a2fde1c.html deleted file mode 100644 index 17f6e6171..000000000 --- a/structlibsemigroups_1_1hash_3_01_t_subclass_01_5_00_01typename_01std_1_1enable__if_3_01std_1_1is8802d8da0a9231599aab4c288a2fde1c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::hash< TSubclass *, typename std::enable_if< std::is_base_of< Element, TSubclass >::value >::type > Member List
    -
    - - - - - diff --git a/structlibsemigroups_1_1new__traits__equal_1_1internal__equal__to-members.html b/structlibsemigroups_1_1new__traits__equal_1_1internal__equal__to-members.html deleted file mode 100644 index ee1659102..000000000 --- a/structlibsemigroups_1_1new__traits__equal_1_1internal__equal__to-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::new_traits_equal< TValueType, TValueEqual >::internal_equal_to Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::new_traits_equal< TValueType, TValueEqual >::internal_equal_to, including all inherited members.

    - - -
    operator()(internal_const_value_type x, internal_const_value_type y) const (defined in libsemigroups::new_traits_equal< TValueType, TValueEqual >::internal_equal_to)libsemigroups::new_traits_equal< TValueType, TValueEqual >::internal_equal_toinline
    - - - - diff --git a/structlibsemigroups_1_1new__traits__equal_1_1internal__equal__to.html b/structlibsemigroups_1_1new__traits__equal_1_1internal__equal__to.html deleted file mode 100644 index edd74749e..000000000 --- a/structlibsemigroups_1_1new__traits__equal_1_1internal__equal__to.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::new_traits_equal< TValueType, TValueEqual >::internal_equal_to Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::new_traits_equal< TValueType, TValueEqual >::internal_equal_to Struct Reference
    -
    -
    - -

    Provides a call operator for comparing values of this. - More...

    - -

    #include <traits.hpp>

    - -

    Inherits libsemigroups::new_traits< TValueType >.

    - - - - -

    -Public Member Functions

    -bool operator() (internal_const_value_type x, internal_const_value_type y) const
     
    -

    Detailed Description

    -

    template<typename TValueType, typename TValueEqual = internal::equal_to<TValueType>>
    -struct libsemigroups::new_traits_equal< TValueType, TValueEqual >::internal_equal_to

    - -

    Provides a call operator for comparing values of this.

    -

    This struct provides a call operator for comparing two values of this, provided as internal_const_value_types.

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1new__traits__hash__equal_1_1internal__hash-members.html b/structlibsemigroups_1_1new__traits__hash__equal_1_1internal__hash-members.html deleted file mode 100644 index 4d680d5ed..000000000 --- a/structlibsemigroups_1_1new__traits__hash__equal_1_1internal__hash-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::new_traits_hash_equal< TValueType, TValueHash, TValueEqual >::internal_hash Member List
    -
    - - - - - diff --git a/structlibsemigroups_1_1new__traits__hash__equal_1_1internal__hash.html b/structlibsemigroups_1_1new__traits__hash__equal_1_1internal__hash.html deleted file mode 100644 index 9594cc706..000000000 --- a/structlibsemigroups_1_1new__traits__hash__equal_1_1internal__hash.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::new_traits_hash_equal< TValueType, TValueHash, TValueEqual >::internal_hash Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::new_traits_hash_equal< TValueType, TValueHash, TValueEqual >::internal_hash Struct Reference
    -
    -
    - -

    Provides a call operator for hashing values of this. - More...

    - -

    #include <traits.hpp>

    - -

    Inherits libsemigroups::new_traits< TValueType >.

    - - - - -

    -Public Member Functions

    -size_t operator() (internal_const_value_type x) const
     
    -

    Detailed Description

    -

    template<typename TValueType, typename TValueHash = internal::hash<TValueType>, typename TValueEqual = internal::equal_to<TValueType>>
    -struct libsemigroups::new_traits_hash_equal< TValueType, TValueHash, TValueEqual >::internal_hash

    - -

    Provides a call operator for hashing values of this.

    -

    This struct provides a call operator for hashing an value of this, provided as an internal_const_value_type.

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1pair__hash-members.html b/structlibsemigroups_1_1pair__hash-members.html deleted file mode 100644 index 326ffea1b..000000000 --- a/structlibsemigroups_1_1pair__hash-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::pair_hash Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::pair_hash, including all inherited members.

    - - -
    operator()(std::pair< size_t, size_t > x) constlibsemigroups::pair_hashinline
    - - - - diff --git a/structlibsemigroups_1_1pair__hash.html b/structlibsemigroups_1_1pair__hash.html deleted file mode 100644 index 9e4d2a8c2..000000000 --- a/structlibsemigroups_1_1pair__hash.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::pair_hash Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::pair_hash Struct Reference
    -
    -
    - -

    Provides a call operator returning a hash value for a pair of size_t. - More...

    - -

    #include <konieczny.hpp>

    - - - - - -

    -Public Member Functions

    size_t operator() (std::pair< size_t, size_t > x) const
     Hashes a pair of size_t. More...
     
    -

    Detailed Description

    -

    Provides a call operator returning a hash value for a pair of size_t.

    -

    This struct provides a call operator for obtaining a hash value for the pair.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    - - - - - -
    - - - - - - - - -
    size_t libsemigroups::pair_hash::operator() (std::pair< size_t, size_t > x) const
    -
    -inline
    -
    - -

    Hashes a pair of size_t.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structlibsemigroups_1_1vec__bmat8__hash-members.html b/structlibsemigroups_1_1vec__bmat8__hash-members.html deleted file mode 100644 index 0f0b18a81..000000000 --- a/structlibsemigroups_1_1vec__bmat8__hash-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    libsemigroups::vec_bmat8_hash Member List
    -
    -
    - -

    This is the complete list of members for libsemigroups::vec_bmat8_hash, including all inherited members.

    - - -
    operator()(std::vector< BMat8 > vec) constlibsemigroups::vec_bmat8_hashinline
    - - - - diff --git a/structlibsemigroups_1_1vec__bmat8__hash.html b/structlibsemigroups_1_1vec__bmat8__hash.html deleted file mode 100644 index b4dc5d1a6..000000000 --- a/structlibsemigroups_1_1vec__bmat8__hash.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -libsemigroups: libsemigroups::vec_bmat8_hash Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    libsemigroups::vec_bmat8_hash Struct Reference
    -
    -
    - -

    Provides a call operator returning a hash value for a vector of BMat8s. - More...

    - -

    #include <konieczny.hpp>

    - - - - - -

    -Public Member Functions

    size_t operator() (std::vector< BMat8 > vec) const
     Hashes a vector of BMat8s. More...
     
    -

    Detailed Description

    -

    Provides a call operator returning a hash value for a vector of BMat8s.

    -

    This struct provides a call operator for obtaining a hash value for the vector.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    - - - - - -
    - - - - - - - - -
    size_t libsemigroups::vec_bmat8_hash::operator() (std::vector< BMat8 > vec) const
    -
    -inline
    -
    - -

    Hashes a vector of BMat8s.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structstd_1_1equal__to_3_01libsemigroups_1_1_k_b_e_01_4-members.html b/structstd_1_1equal__to_3_01libsemigroups_1_1_k_b_e_01_4-members.html deleted file mode 100644 index 7244b8cef..000000000 --- a/structstd_1_1equal__to_3_01libsemigroups_1_1_k_b_e_01_4-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    std::equal_to< libsemigroups::KBE > Member List
    -
    -
    - -

    This is the complete list of members for std::equal_to< libsemigroups::KBE >, including all inherited members.

    - - -
    operator()(libsemigroups::KBE const &x, libsemigroups::KBE const &y) conststd::equal_to< libsemigroups::KBE >inline
    - - - - diff --git a/structstd_1_1equal__to_3_01libsemigroups_1_1_k_b_e_01_4.html b/structstd_1_1equal__to_3_01libsemigroups_1_1_k_b_e_01_4.html deleted file mode 100644 index f3e9caff3..000000000 --- a/structstd_1_1equal__to_3_01libsemigroups_1_1_k_b_e_01_4.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - -libsemigroups: std::equal_to< libsemigroups::KBE > Struct Template Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    std::equal_to< libsemigroups::KBE > Struct Template Reference
    -
    -
    - -

    Provides a call operator for comparing KBEs via references. - More...

    - -

    #include <kbe.hpp>

    - - - - - -

    -Public Member Functions

    bool operator() (libsemigroups::KBE const &x, libsemigroups::KBE const &y) const
     Tests equality of two const KBE references via equality of the KBEs. More...
     
    -

    Detailed Description

    -

    template<>
    -struct std::equal_to< libsemigroups::KBE >

    - -

    Provides a call operator for comparing KBEs via references.

    -

    This struct provides a call operator for comparing const KBE references (by comparing the KBE objects they point to). This is used by various methods of the FroidurePin class.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    bool std::equal_to< libsemigroups::KBE >::operator() (libsemigroups::KBE const & x,
    libsemigroups::KBE const & y 
    ) const
    -
    -inline
    -
    - -

    Tests equality of two const KBE references via equality of the KBEs.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structstd_1_1hash_3_01libsemigroups_1_1_k_b_e_01_4-members.html b/structstd_1_1hash_3_01libsemigroups_1_1_k_b_e_01_4-members.html deleted file mode 100644 index 478ad25ff..000000000 --- a/structstd_1_1hash_3_01libsemigroups_1_1_k_b_e_01_4-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -libsemigroups: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    std::hash< libsemigroups::KBE > Member List
    -
    -
    - -

    This is the complete list of members for std::hash< libsemigroups::KBE >, including all inherited members.

    - - -
    operator()(libsemigroups::KBE const &x) conststd::hash< libsemigroups::KBE >inline
    - - - - diff --git a/structstd_1_1hash_3_01libsemigroups_1_1_k_b_e_01_4.html b/structstd_1_1hash_3_01libsemigroups_1_1_k_b_e_01_4.html deleted file mode 100644 index e09a99807..000000000 --- a/structstd_1_1hash_3_01libsemigroups_1_1_k_b_e_01_4.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -libsemigroups: std::hash< libsemigroups::KBE > Struct Template Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    std::hash< libsemigroups::KBE > Struct Template Reference
    -
    -
    - -

    Provides a call operator returning a hash value for an Element via a pointer. - More...

    - -

    #include <kbe.hpp>

    - - - - - -

    -Public Member Functions

    size_t operator() (libsemigroups::KBE const &x) const
     Hashes a KBE given by const KBE reference. More...
     
    -

    Detailed Description

    -

    template<>
    -struct std::hash< libsemigroups::KBE >

    - -

    Provides a call operator returning a hash value for an Element via a pointer.

    -

    This struct provides a call operator for obtaining a hash value for the Element from a const Element pointer. This is used by various methods of the FroidurePin class.

    -

    Member Function Documentation

    - -

    ◆ operator()()

    - -
    -
    - - - - - -
    - - - - - - - - -
    size_t std::hash< libsemigroups::KBE >::operator() (libsemigroups::KBE const & x) const
    -
    -inline
    -
    - -

    Hashes a KBE given by const KBE reference.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/svgpan.js b/svgpan.js deleted file mode 100644 index 1fc154417..000000000 --- a/svgpan.js +++ /dev/null @@ -1,343 +0,0 @@ -/* - @licstart The following is the entire license notice for the - JavaScript code in this file. - - Copyright (C) 1997-2017 by Dimitri van Heesch - - 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 2 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - @licend The above is the entire license notice - for the JavaScript code in this file - */ -/** - * The code below is based on SVGPan Library 1.2 and was modified for doxygen - * to support both zooming and panning via the mouse and via embedded bottons. - * - * This code is licensed under the following BSD license: - * - * Copyright 2009-2010 Andrea Leofreddi . All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY Andrea Leofreddi ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Andrea Leofreddi OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Andrea Leofreddi. - */ - -var root = document.documentElement; -var state = 'none'; -var stateOrigin; -var stateTf = root.createSVGMatrix(); -var cursorGrab = ' url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAlQTFRFAAAA////////c3ilYwAAAAN0Uk5T//8A18oNQQAAAD1JREFUeNp0zlEKACAIA9Bt9z90bZBZkQj29qFBEuBOzQHSnWTTyckEfqUuZgFvslH4ch3qLCO/Kr8cAgwATw4Ax6XRCcoAAAAASUVORK5CYII="), move'; -var zoomSteps = 10; -var zoomInFactor; -var zoomOutFactor; -var windowWidth; -var windowHeight; -var svgDoc; -var minZoom; -var maxZoom; -if (!window) window=this; - -/** - * Show the graph in the middle of the view, scaled to fit - */ -function show() -{ - if (window.innerHeight) // Firefox - { - windowWidth = window.innerWidth; - windowHeight = window.innerHeight; - } - else if (document.documentElement.clientWidth) // Chrome/Safari - { - windowWidth = document.documentElement.clientWidth - windowHeight = document.documentElement.clientHeight - } - if (!windowWidth || !windowHeight) // failsafe - { - windowWidth = 800; - windowHeight = 600; - } - minZoom = Math.min(Math.min(viewHeight,windowHeight)/viewHeight,Math.min(viewWidth,windowWidth)/viewWidth); - maxZoom = minZoom+1.5; - zoomInFactor = Math.pow(maxZoom/minZoom,1.0/zoomSteps); - zoomOutFactor = 1.0/zoomInFactor; - - var g = svgDoc.getElementById('viewport'); - try - { - var bb = g.getBBox(); // this can throw an exception if css { display: none } - var tx = (windowWidth-viewWidth*minZoom+8)/(2*minZoom); - var ty = viewHeight+(windowHeight-viewHeight*minZoom)/(2*minZoom); - var a = 'scale('+minZoom+') rotate(0) translate('+tx+' '+ty+')'; - g.setAttribute('transform',a); - } - catch(e) {} -} - -/** - * Register handlers - */ -function init(evt) -{ - svgDoc = evt.target.ownerDocument; - try { - if (top.window && top.window.registerShow) { // register show function in html doc for dynamic sections - top.window.registerShow(sectionId,show); - } - } catch(e) { - // ugh, we are not allowed to talk to the parent; can happen with Chrome when viewing pages - // locally, since they treat every local page as having a different origin - } - show(); - - setAttributes(root, { - "onmousedown" : "handleMouseDown(evt)", - "onmousemove" : "handleMouseMove(evt)", - "onmouseup" : "handleMouseUp(evt)" - }); - - if (window.addEventListener) - { - if (navigator.userAgent.toLowerCase().indexOf('webkit') >= 0 || - navigator.userAgent.toLowerCase().indexOf("opera") >= 0 || - navigator.appVersion.indexOf("MSIE") != -1) - { - window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari/IE9 - } - else - { - window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others - } - } -} - -window.onresize=function() -{ - if (svgDoc) { show(); } -} - -/** - * Instance an SVGPoint object with given event coordinates. - */ -function getEventPoint(evt) -{ - var p = root.createSVGPoint(); - p.x = evt.clientX; - p.y = evt.clientY; - return p; -} - -/** - * Sets the current transform matrix of an element. - */ -function setCTM(element, matrix) -{ - var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")"; - element.setAttribute("transform", s); -} - -/** - * Sets attributes of an element. - */ -function setAttributes(element, attributes) -{ - for (i in attributes) - element.setAttributeNS(null, i, attributes[i]); -} - -function doZoom(g,point,zoomFactor) -{ - var p = point.matrixTransform(g.getCTM().inverse()); - var k = root.createSVGMatrix().translate(p.x, p.y).scale(zoomFactor).translate(-p.x, -p.y); - var n = g.getCTM().multiply(k); - var s = Math.max(n.a,n.d); - if (s>maxZoom) n=n.translate(p.x,p.y).scale(maxZoom/s).translate(-p.x,-p.y); - else if (s'); - d.write('Print SVG'); - d.write(''); - d.write('
    '+xs+'
    '); - d.write(''); - d.write(''); - d.close(); - } catch(e) { - alert('Failed to open popup window needed for printing!\n'+e.message); - } -} -/* @license-end */ diff --git a/sync_off.png b/sync_off.png deleted file mode 100644 index 3b443fc62..000000000 Binary files a/sync_off.png and /dev/null differ diff --git a/sync_on.png b/sync_on.png deleted file mode 100644 index e08320fb6..000000000 Binary files a/sync_on.png and /dev/null differ diff --git a/tab_a.png b/tab_a.png deleted file mode 100644 index 3b725c41c..000000000 Binary files a/tab_a.png and /dev/null differ diff --git a/tab_b.png b/tab_b.png deleted file mode 100644 index e2b4a8638..000000000 Binary files a/tab_b.png and /dev/null differ diff --git a/tab_h.png b/tab_h.png deleted file mode 100644 index fd5cb7054..000000000 Binary files a/tab_h.png and /dev/null differ diff --git a/tab_s.png b/tab_s.png deleted file mode 100644 index ab478c95b..000000000 Binary files a/tab_s.png and /dev/null differ diff --git a/tabs.css b/tabs.css deleted file mode 100644 index 8ea7d5496..000000000 --- a/tabs.css +++ /dev/null @@ -1 +0,0 @@ -.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/tce_8hpp_source.html b/tce_8hpp_source.html deleted file mode 100644 index c02d8aeff..000000000 --- a/tce_8hpp_source.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: include/tce.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    tce.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 //
    20 
    21 #ifndef LIBSEMIGROUPS_INCLUDE_TCE_HPP_
    22 #define LIBSEMIGROUPS_INCLUDE_TCE_HPP_
    23 
    24 #include <cstddef> // for size_t
    25 #include <ostream> // for ostream
    26 #include <sstream> // for ostringstream
    27 
    28 #include "adapters.hpp" // for complexity, degree, less, one, product, ...
    29 #include "constants.hpp" // for LIMIT_MAX
    30 
    31 namespace libsemigroups {
    32  // Forward declarations
    33  namespace congruence {
    34  class ToddCoxeter;
    35  } // namespace congruence
    36 
    37  class TCE {
    38  public:
    39  using class_index_type = size_t;
    40  TCE() = default;
    41  TCE(congruence::ToddCoxeter*, class_index_type) noexcept;
    42  TCE(congruence::ToddCoxeter&, class_index_type) noexcept;
    43 
    44  bool operator==(TCE const&) const noexcept;
    45  bool operator<(TCE const&) const noexcept;
    46 
    47  // Only works when that is a generator!!
    48  TCE operator*(TCE const&) const;
    49  TCE one() const noexcept;
    50 
    51  friend std::ostringstream& operator<<(std::ostringstream&, TCE const&);
    52  friend std::ostream& operator<<(std::ostream&, TCE const&);
    53  friend struct ::std::hash<TCE>;
    54 
    55  private:
    56  congruence::ToddCoxeter* _tc;
    57  // Note that the class_index_type below is the actual class_index_type used
    58  // in the ToddCoxeter class and not that number minus 1, which is what
    59  // "class_index" means in the context of CongBase objects.
    60  class_index_type _index;
    61  };
    62 
    63  static_assert(std::is_trivial<TCE>::value, "TCE is not trivial!");
    64 
    65  template <>
    66  struct complexity<TCE> {
    67  constexpr size_t operator()(TCE const&) const noexcept {
    68  return LIMIT_MAX;
    69  }
    70  };
    71 
    72  template <>
    73  struct degree<TCE> {
    74  constexpr size_t operator()(TCE const&) const noexcept {
    75  return 0;
    76  }
    77  };
    78 
    79  template <>
    80  struct less<TCE> {
    81  bool operator()(TCE const& x, TCE const& y) const noexcept {
    82  return x < y;
    83  }
    84  };
    85 
    86  template <>
    87  struct one<TCE> {
    88  TCE operator()(TCE const& x) const noexcept {
    89  return x.one();
    90  }
    91  };
    92 
    93  template <>
    94  struct product<TCE> {
    95  void operator()(TCE& xy, TCE const& x, TCE const& y, size_t = 0) const {
    96  xy = x * y;
    97  }
    98  };
    99 } // namespace libsemigroups
    100 
    101 namespace std {
    102  template <>
    103  struct hash<libsemigroups::TCE> {
    104  size_t operator()(libsemigroups::TCE const& x) const noexcept {
    105  return x._index;
    106  }
    107  };
    108 } // namespace std
    109 
    110 #endif // LIBSEMIGROUPS_INCLUDE_TCE_HPP_
    Definition: kbe.hpp:198
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    This file contains function templates for adapting a user-defined type so that it can be used with li...
    -
    - - - - diff --git a/timer_8hpp_source.html b/timer_8hpp_source.html deleted file mode 100644 index 799ff7f72..000000000 --- a/timer_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/timer.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    timer.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2016 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // It is intentional that there is no implementation file for the class in this
    20 // file.
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_TIMER_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_TIMER_HPP_
    24 
    25 #include <chrono>
    26 #include <iostream>
    27 #include <string>
    28 
    29 #include "stl.hpp"
    30 
    31 namespace libsemigroups {
    32  namespace internal {
    33 
    34  // This is a simple class which can be used to send timing information in a
    35  // somewhat human readable format to the standard output.
    36  class Timer {
    37  public:
    38  // Default constructor, timer starts when object is created
    39  Timer() : _start(std::chrono::high_resolution_clock::now()) {}
    40 
    41  // Reset the timer (i.e. time from this point on)
    42  void reset() {
    43  _start = std::chrono::high_resolution_clock::now();
    44  }
    45 
    46  // The elapsed time in nanoseconds since last reset
    47  std::chrono::nanoseconds elapsed() const {
    48  return std::chrono::duration_cast<std::chrono::nanoseconds>(
    49  std::chrono::high_resolution_clock::now() - _start);
    50  }
    51 
    52  // String containing the somewhat human readable amount of time, this is
    53  // primarily intended for testing purposes
    54  static std::string string(std::chrono::nanoseconds elapsed) {
    55  std::string out;
    56  if (string_it<std::chrono::hours>(out, elapsed, "h", 0)) {
    57  string_it<std::chrono::minutes>(out, elapsed, "m", 0);
    58  return out;
    59  } else if (string_it<std::chrono::minutes>(out, elapsed, "m", 0)) {
    60  string_it<std::chrono::seconds>(out, elapsed, "s", 0);
    61  return out;
    62  } else if (string_it<std::chrono::milliseconds>(
    63  out, elapsed, "ms", 9)) {
    64  return out;
    65  } else if (string_it<std::chrono::microseconds>(
    66  out, elapsed, "\u03BCs", 9)) {
    67  return out;
    68  } else {
    69  string_it<std::chrono::nanoseconds>(out, elapsed, "ns", 0);
    70  return out;
    71  }
    72  }
    73 
    74  // String containing the somewhat human readable amount of time since the
    75  // last reset
    76  std::string string() const {
    77  return string(elapsed());
    78  }
    79 
    80  // Left shift the string containing the somewhat human readable amount of
    81  // time since last reset to an ostream
    82  friend std::ostream& operator<<(std::ostream& os,
    83  internal::Timer const& t) {
    84  os << t.string();
    85  return os;
    86  }
    87 
    88  private:
    89  std::chrono::high_resolution_clock::time_point _start;
    90 
    91  template <typename T>
    92  static bool string_it(std::string& str,
    93  std::chrono::nanoseconds& elapsed,
    94  std::string unit,
    95  size_t threshold) {
    96  T x = std::chrono::duration_cast<T>(elapsed);
    97  if (x > T(threshold)) {
    98  str += internal::to_string(x.count()) + unit;
    99  elapsed -= x;
    100  return true;
    101  }
    102  return false;
    103  }
    104  };
    105  } // namespace internal
    106 } // namespace libsemigroups
    107 
    108 #endif // LIBSEMIGROUPS_INCLUDE_TIMER_HPP_
    Definition: kbe.hpp:198
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/todd-coxeter_8hpp_source.html b/todd-coxeter_8hpp_source.html deleted file mode 100644 index f4d92f600..000000000 --- a/todd-coxeter_8hpp_source.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -libsemigroups: include/todd-coxeter.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    todd-coxeter.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains a declaration of a class for performing the Todd-Coxeter
    20 // algorithm for semigroups.
    21 
    22 // TODO(now)
    23 // 1. In congruence::ToddCoxeter: add methods for add_pair, set_base, etc, for
    24 // use with 0-parameter constructor, and remove other methods/constructors
    25 
    26 #ifndef LIBSEMIGROUPS_INCLUDE_TODD_COXETER_HPP_
    27 #define LIBSEMIGROUPS_INCLUDE_TODD_COXETER_HPP_
    28 
    29 #include <stddef.h> // for size_t
    30 
    31 #include <cinttypes> // for int64_t
    32 #include <stack> // for stack
    33 #include <string> // for string
    34 #include <unordered_map> // for unordered_map
    35 #include <vector> // for vector
    36 
    37 #include "cong-base.hpp" // for congruence_type, CongBase, CongBa...
    38 #include "containers.hpp" // for internal::internal::RecVec
    39 #include "types.hpp" // for relation_type, word_type, letter_...
    40 #include "wrap.hpp" // for WrappedCong
    41 
    42 namespace libsemigroups {
    43  // Forward declarations
    44  class TCE;
    45  class FroidurePinBase;
    46  namespace congruence {
    47  class ToddCoxeter;
    48  }
    49  namespace fpsemigroup {
    50  class KnuthBendix;
    51  using ToddCoxeter = WrappedCong<congruence::ToddCoxeter>;
    52  } // namespace fpsemigroup
    53 
    54  namespace internal {
    55  template <class TPtrType>
    56  class owned_ptr;
    57  }
    58 
    59  namespace congruence {
    60  class ToddCoxeter : public CongBase {
    62  // ToddCoxeter - typedefs - private
    64 
    65  using signed_class_index_type = int64_t;
    66 
    67  public:
    69  // ToddCoxeter - typedefs + enums - public
    71 
    72  using class_index_type = CongBase::class_index_type;
    73 
    74  enum class policy { none = 0, use_relations = 1, use_cayley_graph = 2 };
    75 
    77  // ToddCoxeter - constructors and destructor - public
    79 
    80  explicit ToddCoxeter(congruence_type type);
    81 
    82  ToddCoxeter(congruence_type,
    83  FroidurePinBase&,
    84  policy = policy::use_cayley_graph);
    85  // This policy is guaranteed to terminate relatively quickly
    86 
    87  ToddCoxeter(congruence_type, fpsemigroup::ToddCoxeter&);
    88  ToddCoxeter(congruence_type, ToddCoxeter const&);
    89  ToddCoxeter(congruence_type, fpsemigroup::KnuthBendix&);
    90 
    91  ~ToddCoxeter() = default;
    92 
    94  // Runner - pure virtual methods - public
    96 
    97  void run() override;
    98 
    100  // CongBase - pure virtual methods - public
    102 
    103  size_t nr_classes() override;
    104  class_index_type word_to_class_index(word_type const&) override;
    105  word_type class_index_to_word(class_index_type) override;
    106 
    108  // CongBase - non-pure virtual methods - public
    110 
    111  bool contains(word_type const&, word_type const&) override;
    112 
    114  // ToddCoxeter - methods - public
    116 
    117  bool empty() const;
    118  letter_type class_index_to_letter(class_index_type);
    119  policy get_policy() const noexcept;
    120  void set_pack(size_t);
    121  class_index_type table(class_index_type, letter_type);
    122 
    123  private:
    125  // CongBase - pure virtual methods - private
    127 
    128  void add_pair_impl(word_type const&, word_type const&) override;
    129  // Guaranteed to return a FroidurePin<TCE>*.
    130  internal::owned_ptr<FroidurePinBase> quotient_impl() override;
    131 
    133  // CongBase - non-pure virtual methods - private
    135 
    136  class_index_type
    137  const_word_to_class_index(word_type const&) const override;
    138  void set_nr_generators_impl(size_t) override;
    139  bool is_quotient_obviously_finite_impl() override;
    140  bool is_quotient_obviously_infinite_impl() override;
    141 
    143  // ToddCoxeter - methods (validation) - private
    145 
    146  void validate_table() const;
    147 
    149  // ToddCoxeter - methods (initialisation) - private
    151 
    152  void init();
    153  void init_after_prefill();
    154  void init_relations();
    155  void prefill(FroidurePinBase&);
    156  void use_relations_or_cayley_graph();
    157 
    159  // ToddCoxeter - methods (other) - private
    161 
    162  void compress();
    163  void new_coset(class_index_type const&, letter_type const&);
    164  void identify_cosets(class_index_type, class_index_type);
    165  inline void
    166  trace(class_index_type const&, relation_type const&, bool = true);
    167 
    169  // ToddCoxeter - data - private
    171  // TODO(later): Pimpl
    172  size_t _active; // Number of active cosets
    173  std::vector<signed_class_index_type> _bckwd;
    174  std::vector<class_index_type> _class_index_to_letter;
    175  size_t _cosets_killed;
    176  class_index_type _current;
    177  class_index_type _current_no_add;
    178  size_t _defined;
    179  std::vector<relation_type> _extra;
    180  std::vector<class_index_type> _forwd;
    181  class_index_type _id_coset;
    182  bool _init_done; // Has init() been run yet?
    183  class_index_type _last;
    184  std::stack<class_index_type> _lhs_stack;
    185  class_index_type _next;
    186  size_t _pack; // Nr of active cosets allowed before a
    187  // packing phase starts
    188  policy _policy;
    189  bool _prefilled;
    190  internal::RecVec<class_index_type> _preim_init;
    191  internal::RecVec<class_index_type> _preim_next;
    192  bool _relations_are_reversed;
    193  std::vector<relation_type> _relations;
    194  std::stack<class_index_type> _rhs_stack;
    195  bool _stop_packing;
    196  internal::RecVec<class_index_type> _table;
    197  };
    198  } // namespace congruence
    199 } // namespace libsemigroups
    200 #endif // LIBSEMIGROUPS_INCLUDE_TODD_COXETER_HPP_
    std::pair< word_type, word_type > relation_type
    Type for a pair of word_type (a relation) of a semigroup.
    Definition: types.hpp:56
    -
    Definition: kbe.hpp:198
    -
    std::vector< letter_type > word_type
    Type for a word over the generators of a semigroup.
    Definition: types.hpp:53
    -
    size_t letter_type
    Type for the index of a generator of a semigroup.
    Definition: types.hpp:50
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/traits_8hpp_source.html b/traits_8hpp_source.html deleted file mode 100644 index 1e6391f50..000000000 --- a/traits_8hpp_source.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -libsemigroups: include/traits.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    traits.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains the Traits class that defines the types, and
    20 // methods for translating between then, for use by the FroidurePin,
    21 // SchreierSims, and P classes.
    22 
    23 #ifndef LIBSEMIGROUPS_INCLUDE_TRAITS_HPP_
    24 #define LIBSEMIGROUPS_INCLUDE_TRAITS_HPP_
    25 
    26 #include <stddef.h> // for size_t
    27 
    28 #include "stl.hpp" // for internal::equal_to, internal::hash
    29 
    30 namespace libsemigroups {
    31  template <typename TElementType, typename = void>
    32  struct Traits {
    33  using element_type = TElementType;
    34  using const_element_type = TElementType const;
    35  using reference = TElementType&;
    36  using const_reference = TElementType const&;
    37  using pointer = TElementType*; // no internal equivalent
    38  using const_pointer = TElementType const*; // no internal equivalent
    39 
    40  using internal_element_type = element_type;
    41  using internal_const_element_type = const_element_type;
    42  using internal_reference = reference;
    43  using internal_const_reference = const_reference;
    44 
    45  inline internal_const_reference to_internal_const(const_reference x) const {
    46  return x;
    47  }
    48 
    49  inline internal_reference to_internal(reference x) const {
    50  return x;
    51  }
    52 
    53  inline const_reference to_external_const(internal_const_reference x) const {
    54  return x;
    55  }
    56 
    57  inline reference to_external(internal_reference x) const {
    58  return x;
    59  }
    60 
    61  inline internal_element_type
    62  internal_copy(internal_const_reference x) const {
    63  return x;
    64  }
    65 
    66  inline element_type external_copy(const_reference x) const {
    67  return x;
    68  }
    69 
    70  inline void internal_free(internal_element_type) const {}
    71  inline void external_free(element_type) const {}
    72  };
    73 
    74  template <typename TElementType,
    75  typename TElementEqual = internal::equal_to<TElementType>>
    76  class TraitsEqual : public Traits<TElementType> {
    77  private:
    78  using base = Traits<TElementType>;
    79 
    80  public:
    81  using element_type = typename base::element_type;
    82  using const_element_type = typename base::const_element_type;
    83  using reference = typename base::reference;
    84  using const_reference = typename base::const_reference;
    85  using pointer = typename base::pointer;
    86  using const_pointer = typename base::const_pointer;
    87 
    88  using internal_element_type = typename base::internal_element_type;
    89  using internal_const_element_type =
    90  typename base::internal_const_element_type;
    91  using internal_reference = typename base::internal_reference;
    92  using internal_const_reference = typename base::internal_const_reference;
    93 
    98  struct internal_equal_to : base {
    99  bool operator()(internal_const_element_type x,
    100  internal_const_element_type y) const {
    101  return TElementEqual()(this->to_external_const(x),
    102  this->to_external_const(y));
    103  }
    104  };
    105  };
    106 
    107  template <typename TElementType,
    108  typename TElementHash = internal::hash<TElementType>,
    109  typename TElementEqual = internal::equal_to<TElementType>>
    110  class TraitsHashEqual : public TraitsEqual<TElementType, TElementEqual> {
    111  private:
    112  using base = Traits<TElementType>;
    113 
    114  public:
    115  using element_type = typename base::element_type;
    116  using const_element_type = typename base::const_element_type;
    117  using reference = typename base::reference;
    118  using const_reference = typename base::const_reference;
    119  using pointer = typename base::pointer;
    120  using const_pointer = typename base::const_pointer;
    121 
    122  using internal_element_type = typename base::internal_element_type;
    123  using internal_const_element_type =
    124  typename base::internal_const_element_type;
    125  using internal_reference = typename base::internal_reference;
    126  using internal_const_reference = typename base::internal_const_reference;
    127 
    132  struct internal_hash : base {
    133  size_t operator()(internal_const_element_type x) const {
    134  return TElementHash()(this->to_external_const(x));
    135  }
    136  };
    137  };
    138 
    139  template <class T>
    140  struct IsSmall : std::integral_constant<bool, (sizeof(T) <= 16)> {};
    141 
    142  // Bruidhinn is (apparently) the Scots gaelic word for "convey", the
    143  // following traits class is used to convey values from an external type to
    144  // an internal type.
    145 
    146  template <typename TValueType, typename = void>
    147  struct BruidhinnTraits {};
    148 
    149  template <typename TValueType>
    150  struct BruidhinnTraits<
    151  TValueType,
    152  typename std::enable_if<!std::is_trivial<TValueType>::value
    153  || !IsSmall<TValueType>::value>::type> {
    154  using value_type = TValueType;
    155  using const_value_type = TValueType const;
    156  using reference = TValueType&;
    157  using rvalue_reference = TValueType&&;
    158  using const_reference = TValueType const&;
    159  using pointer = TValueType*;
    160  using const_pointer = TValueType const*;
    161 
    162  using internal_value_type = pointer;
    163  using internal_const_value_type = const_pointer;
    164  using internal_reference = internal_value_type&;
    165  using internal_const_reference = internal_const_value_type const&;
    166 
    167  inline internal_const_value_type
    168  to_internal_const(const_reference x) const {
    169  return &x;
    170  }
    171 
    172  inline internal_value_type to_internal(reference x) const {
    173  return &x;
    174  }
    175 
    176  inline internal_value_type to_internal(rvalue_reference x) const {
    177  return new value_type(x);
    178  }
    179 
    180  inline const_reference to_external_const(internal_const_reference x) const {
    181  return *x;
    182  }
    183 
    184  inline reference to_external(internal_reference x) const {
    185  return *x;
    186  }
    187 
    188  inline internal_value_type internal_copy(internal_const_reference x) const {
    189  return new value_type(*x);
    190  }
    191 
    192  inline value_type external_copy(const_reference x) const {
    193  return x;
    194  }
    195 
    196  inline void internal_free(internal_value_type x) const {
    197  delete x;
    198  }
    199 
    200  inline void external_free(value_type) const {}
    201  };
    202 
    203  template <typename TValueType>
    204  struct BruidhinnTraits<
    205  TValueType,
    206  typename std::enable_if<std::is_trivial<TValueType>::value
    207  && IsSmall<TValueType>::value>::type> {
    208  using value_type = TValueType;
    209  using const_value_type = TValueType const;
    210  using reference = TValueType&;
    211  using rvalue_reference = TValueType&&;
    212  using const_reference = TValueType const&;
    213  using pointer = TValueType*;
    214  using const_pointer = TValueType const* const;
    215 
    216  using internal_value_type = value_type;
    217  using internal_const_value_type = const_value_type;
    218  using internal_reference = reference;
    219  using internal_const_reference = const_reference;
    220 
    221  inline internal_const_reference to_internal_const(const_reference x) const {
    222  return x;
    223  }
    224 
    225  inline internal_reference to_internal(reference x) const {
    226  return x;
    227  }
    228 
    229  inline internal_value_type to_internal(rvalue_reference x) const {
    230  return x;
    231  }
    232 
    233  inline const_reference to_external_const(internal_const_reference x) const {
    234  return x;
    235  }
    236 
    237  inline reference to_external(internal_reference x) const {
    238  return x;
    239  }
    240 
    241  inline internal_value_type internal_copy(internal_const_reference x) const {
    242  return internal_value_type(x);
    243  }
    244 
    245  inline value_type external_copy(const_reference x) const {
    246  return value_type(x);
    247  }
    248  inline void internal_free(internal_value_type) const {}
    249  inline void external_free(value_type) const {}
    250  };
    251 } // namespace libsemigroups
    252 #endif // LIBSEMIGROUPS_INCLUDE_TRAITS_HPP_
    Provides a call operator for comparing elements of this.
    Definition: traits.hpp:98
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    Provides a call operator for hashing elements of this.
    Definition: traits.hpp:132
    -
    - - - - diff --git a/transf_8hpp_source.html b/transf_8hpp_source.html deleted file mode 100644 index 307eb68aa..000000000 --- a/transf_8hpp_source.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -libsemigroups: include/transf.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    transf.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2019 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains the declaration of the partial transformation class and
    20 // its subclasses.
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_TRANSF_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_TRANSF_HPP_
    24 
    25 #include <limits> // for numeric_limits
    26 #include <numeric> // for std::iota
    27 #include <type_traits> // for is_integral
    28 #include <vector> // for vector
    29 
    30 #include "constants.hpp" // for UNDEFINED
    31 #include "hpcombi.hpp" // for HPCombi::Transf16, ...
    32 #include "types.hpp" // for SmallestInteger
    33 
    34 namespace libsemigroups {
    35 
    66 
    67  struct PolymorphicPTransf {};
    68 
    69  template <typename TValueType, typename TContainer>
    70  class BasePTransf : public PolymorphicPTransf {
    71  public:
    78  BasePTransf() : _container() {}
    79 
    80  explicit BasePTransf(TContainer&& cont) : _container(std::move(cont)) {
    81  // validate();
    82  }
    83 
    84  explicit BasePTransf(TContainer const& cont) : _container(cont) {
    85  // validate();
    86  }
    87 
    88  BasePTransf(BasePTransf const&) = default;
    89 
    90  bool operator<(BasePTransf const& that) const {
    91  return this->_container < that._container;
    92  }
    93 
    94  bool operator==(BasePTransf const& that) const {
    95  return this->_container == that._container;
    96  }
    97 
    98  TValueType& operator[](size_t i) noexcept {
    99  return _container[i];
    100  }
    101 
    102  TValueType const& operator[](size_t i) const noexcept {
    103  return _container[i];
    104  }
    105 
    106  // TODO other operators
    107  template <typename TSubclass>
    108  TSubclass operator*(TSubclass const& y) const {
    109  TSubclass xy(y.degree());
    110  xy.in_place_product(*static_cast<TSubclass const*>(this), y);
    111  return xy;
    112  }
    118  size_t rank() const {
    119  return std::count_if(
    120  _container.cbegin(),
    121  _container.cend(),
    122  [](TValueType const& val) -> bool { return val == UNDEFINED; });
    123  // TODO double check this is correct
    124 
    125  // #ifdef LIBSEMIGROUPS_DENSEHASHMAP
    126  // Element empty_key() const override {
    127  // std::vector<TValueType> vector(this->degree() + 1);
    128  // std::iota(vector.begin(), vector.end(), 0);
    129  // return new PPerm(std::move(vector));
    130  // }
    131  // #endif
    132  }
    133 
    134  protected:
    140  // void validate() const {
    141  // for (auto const& val : _container) {
    142  // if ((val < 0 || val >= this->degree()) && val != UNDEFINED) {
    143  // LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
    144  // << static_cast<size_t>(val)
    145  // << ", must be less than " <<
    146  // this->degree());
    147  // }
    148  // }
    149  // }
    150  TContainer _container;
    151  };
    152 
    153  template <typename TValueType, typename TContainer>
    154  class PTransf;
    155 
    156  template <typename TValueType>
    157  class PTransf<TValueType, std::vector<TValueType>>
    158  : public BasePTransf<TValueType, std::vector<TValueType>> {
    159  public:
    160  using value_type = TValueType;
    161  using container_type = std::vector<TValueType>;
    162 
    163  using BasePTransf<TValueType, std::vector<TValueType>>::BasePTransf;
    164 
    165  explicit PTransf(size_t n)
    166  : BasePTransf<TValueType, std::vector<TValueType>>() {
    167  this->_container.resize(n);
    168  }
    169 
    175  size_t degree() const noexcept {
    176  return this->_container.size();
    177  }
    178 
    184  template <typename TSubclass>
    185  TSubclass identity() const {
    186  return identity<TSubclass>(degree());
    187  }
    188 
    189  template <typename TSubclass>
    190  static TSubclass identity(size_t n) {
    191  std::vector<TValueType> cont(n);
    192  std::iota(cont.begin(), cont.end(), 0);
    193  return TSubclass(std::move(cont));
    194  }
    195 
    196  void increase_degree_by(size_t m) {
    197  this->_container.resize(this->_container.size() + m);
    198  std::iota(this->_container.end() - m,
    199  this->_container.end(),
    200  this->_container.size() - m);
    201  }
    202  };
    203 
    204  template <typename TValueType, size_t N>
    205  class PTransf<TValueType, std::array<TValueType, N>>
    206  : public BasePTransf<TValueType, std::array<TValueType, N>> {
    207  public:
    208  using value_type = TValueType;
    209  using container_type = std::array<TValueType, N>;
    210 
    211  using BasePTransf<TValueType, std::array<TValueType, N>>::BasePTransf;
    212 
    213  explicit PTransf(size_t = 0)
    214  : BasePTransf<TValueType, std::array<TValueType, N>>() {}
    215 
    221  constexpr size_t degree() const noexcept {
    222  return N;
    223  }
    224 
    230  template <typename TSubclass>
    231  static TSubclass identity(size_t = 0) {
    232  std::array<TValueType, N> cont;
    233  std::iota(cont.begin(), cont.end(), 0);
    234  return TSubclass(std::move(cont));
    235  }
    236  };
    237 
    249  template <typename TValueType, typename TContainer = std::vector<TValueType>>
    250  class Transf
    251  : public PTransf<TValueType, TContainer> {
    252  static_assert(std::is_integral<TValueType>::value,
    253  "template parameter TValueType must be an integral type");
    254  static_assert(!std::numeric_limits<TValueType>::is_signed,
    255  "template parameter TValueType must be unsigned");
    256 
    257  public:
    258  using PTransf<TValueType, TContainer>::PTransf;
    259 
    266  void in_place_product(Transf const& x, Transf const& y) {
    267  LIBSEMIGROUPS_ASSERT(x.degree() == y.degree());
    268  LIBSEMIGROUPS_ASSERT(x.degree() == this->degree());
    269  LIBSEMIGROUPS_ASSERT(&x != this && &y != this);
    270  size_t const n = this->degree();
    271  for (TValueType i = 0; i < n; ++i) {
    272  this->_container[i] = y[x[i]];
    273  }
    274  }
    275 
    280  // void validate() const {
    281  // size_t deg = this->degree();
    282  // for (auto const& val : this->_container) {
    283  // if (val >= deg) {
    284  // LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
    285  // << static_cast<size_t>(val)
    286  // << ", must be less than " << deg);
    287  // }
    288  // }
    289  // }
    290  };
    291 
    305  template <typename TValueType, typename TContainer = std::vector<TValueType>>
    306  class PPerm : public PTransf<TValueType, TContainer> {
    307  static_assert(std::is_integral<TValueType>::value,
    308  "template parameter TValueType must be an integral type");
    309  static_assert(!std::numeric_limits<TValueType>::is_signed,
    310  "template parameter TValueType must be unsigned");
    311 
    312  public:
    313  using PTransf<TValueType, TContainer>::PTransf;
    314 
    322  PPerm(TContainer const& dom, TContainer const& ran, size_t deg)
    323  // The vector passed in the next line shouldn't be necessary, but with
    324  // GCC5 PPerm fails to inherit the 0-param constructor from
    325  // PTransf.
    326  : PTransf<TValueType, TContainer>(TContainer()) {
    327  if (dom.size() != ran.size()) {
    328  LIBSEMIGROUPS_EXCEPTION(
    329  "domain and range size mismatch, domain has size "
    330  << dom.size() << " but range has size " << ran.size());
    331  } else if (!(dom.empty()
    332  || deg > *std::max_element(dom.cbegin(), dom.cend()))) {
    333  LIBSEMIGROUPS_EXCEPTION(
    334  "domain value out of bounds, found "
    335  << static_cast<size_t>(*std::max_element(dom.cbegin(), dom.cend()))
    336  << ", must be less than " << deg);
    337  }
    338  this->_container.resize(deg, UNDEFINED);
    339  for (size_t i = 0; i < dom.size(); i++) {
    340  this->_container[dom[i]] = ran[i];
    341  }
    342  }
    343 
    348  PPerm(std::initializer_list<TValueType> dom,
    349  std::initializer_list<TValueType> ran,
    350  size_t deg)
    351  : PPerm<TValueType>(TContainer(dom), TContainer(ran), deg) {}
    352 
    359  // void validate() const {
    360  // size_t const deg = this->degree();
    361  // std::vector<bool> present(deg, false);
    362  // for (auto const& val : this->_container) {
    363  // if (val != UNDEFINED) {
    364  // if (val < 0 || val >= this->degree()) {
    365  // LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
    366  // << static_cast<size_t>(val)
    367  // << ", must be less than "
    368  // << this->degree());
    369  // } else if (present[val]) {
    370  // LIBSEMIGROUPS_EXCEPTION("duplicate image value "
    371  // << static_cast<size_t>(val));
    372  // }
    373  // present[val] = true;
    374  // }
    375  // }
    376  // }
    377 
    378  // void increase_degree_by(size_t m) override {
    379  // this->_container.insert(this->_container.end(), m, UNDEFINED);
    380  // this->reset_hash_value();
    381  // }
    382 
    389  void in_place_product(PPerm const& x, PPerm const& y) override {
    390  LIBSEMIGROUPS_ASSERT(x.degree() == y.degree());
    391  LIBSEMIGROUPS_ASSERT(x.degree() == this->degree());
    392  LIBSEMIGROUPS_ASSERT(&x != this && &y != this);
    393  size_t const n = this->degree();
    394  for (TValueType i = 0; i < n; i++) {
    395  this->_container[i] = (x[i] == UNDEFINED ? UNDEFINED : y[x[i]]);
    396  }
    397  }
    398 
    399  PPerm<TValueType, TContainer> right_one() const {
    400  std::vector<TValueType> img(this->degree(),
    401  static_cast<TValueType>(UNDEFINED));
    402  size_t const n = this->degree();
    403  for (size_t i = 0; i < n; ++i) {
    404  if (this->_container[i] != UNDEFINED) {
    405  img[this->_container[i]] = this->_container[i];
    406  }
    407  }
    408  return PPerm<TValueType, TContainer>(img);
    409  }
    410 
    411  PPerm<TValueType> left_one() const {
    412  std::vector<TValueType> dom(this->degree(),
    413  static_cast<TValueType>(UNDEFINED));
    414  size_t const n = this->_container.size();
    415  for (size_t i = 0; i < n; ++i) {
    416  if (this->_container[i] != UNDEFINED) {
    417  dom[i] = i;
    418  }
    419  }
    420  return PPerm<TValueType>(dom);
    421  }
    422  };
    423 
    436  template <typename TValueType, typename TContainer>
    437  class Perm
    438  : public Transf<TValueType, TContainer> {
    439  public:
    441 
    447  // void validate() const {
    448  // std::vector<bool> present(this->degree(), false);
    449  // for (auto const& val : this->_container) {
    450  // if (val < 0 || val >= this->degree()) {
    451  // LIBSEMIGROUPS_EXCEPTION("image value out of bounds, found "
    452  // << static_cast<size_t>(val)
    453  // << ", must be less than " <<
    454  // this->degree());
    455  // } else if (present[val]) {
    456  // LIBSEMIGROUPS_EXCEPTION("duplicate image value "
    457  // << static_cast<size_t>(val));
    458  // }
    459  // present[val] = true;
    460  // }
    461  // }
    462 
    467  Perm inverse() const {
    468  size_t const n = this->degree();
    469  Perm id = this->template identity<Perm>();
    470  for (TValueType i = 0; i < n; i++) {
    471  id[(*this)[i]] = i;
    472  }
    473  return id;
    474  }
    475  };
    476 
    477  template <typename TSubclass>
    478  struct degree<TSubclass,
    479  typename std::enable_if<
    480  std::is_base_of<PolymorphicPTransf,
    481  TSubclass>::value>::type> {
    482  inline size_t operator()(TSubclass const& x) const {
    483  return x.degree();
    484  }
    485  };
    486 
    487  template <class TSubclass>
    488  struct one<TSubclass,
    489  typename std::enable_if<
    490  std::is_base_of<PolymorphicPTransf, TSubclass>::value>::type> {
    491  TSubclass operator()(TSubclass const& x) const {
    492  return static_cast<TSubclass>(x.identity());
    493  }
    494 
    495  TSubclass operator()(size_t N = 0) {
    496  return TSubclass::template identity<TSubclass>(N);
    497  }
    498  };
    499 
    500  template <typename TValueType, typename TContainerType>
    501  struct inverse<Perm<TValueType, TContainerType>> {
    502  Perm<TValueType, TContainerType>
    503  operator()(Perm<TValueType, TContainerType> const& x) {
    504  return x.inverse();
    505  }
    506  };
    507 
    508  template <typename TValueType, typename TContainerType>
    509  struct action<Perm<TValueType, TContainerType>, TValueType> {
    510  TValueType operator()(Perm<TValueType, TContainerType> const& x,
    511  TValueType const pt) {
    512  return x[pt];
    513  }
    514  };
    515 
    516  template <class TSubclass>
    517  struct product<
    518  TSubclass,
    519  typename std::enable_if<
    520  std::is_base_of<PolymorphicPTransf, TSubclass>::value>::type> {
    521  void operator()(TSubclass& xy, TSubclass const& x, TSubclass const& y) {
    522  xy.in_place_product(x, y);
    523  }
    524  };
    525 
    526  template <size_t N>
    527  struct TransfHelper {
    528  using int_type = typename SmallestInteger<N>::type;
    529 #ifdef LIBSEMIGROUPS_HPCOMBI
    530  using type =
    531  typename std::conditional<N >= 17,
    532  Transf<int_type, std::array<int_type, N>>,
    533  HPCombi::Transf16>::type;
    534 #else
    535  using type = Transf<int_type, std::array<int_type, N>>;
    536 #endif
    537  };
    538 
    539  template <size_t N>
    540  struct PPermHelper {
    541  using int_type = typename SmallestInteger<N>::type;
    542 #ifdef LIBSEMIGROUPS_HPCOMBI
    543  using type =
    544  typename std::conditional<N >= 17,
    545  PPerm<int_type, std::array<int_type, N>>,
    546  HPCombi::PPerm16>::type;
    547 #else
    548  using type = PPerm<int_type, std::array<int_type, N>>;
    549 #endif
    550  };
    551 
    552  template <size_t N>
    553  struct PermHelper {
    554  using int_type = typename SmallestInteger<N>::type;
    555 #ifdef LIBSEMIGROUPS_HPCOMBI
    556  using type =
    557  typename std::conditional<N >= 17,
    558  Perm<int_type, std::array<int_type, N>>,
    559  HPCombi::Perm16>::type;
    560 #else
    561  using type = Perm<int_type, std::array<int_type, N>>;
    562 #endif
    563  };
    564 } // namespace libsemigroups
    565 #endif // LIBSEMIGROUPS_INCLUDE_TRANSF_HPP_
    Abstract class for partial transformations.
    Definition: transf.hpp:67
    -
    Definition: kbe.hpp:198
    -
    Perm inverse() const
    Validates the data defining this.
    Definition: transf.hpp:467
    -
    UNDEFINED value.
    Definition: constants.hpp:107
    -
    Template class for permutations.
    Definition: transf.hpp:437
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    typename std::conditional< N >=0x100000000, uint64_t, typename std::conditional< N >=0x10000, uint32_t, typename std::conditional< N >=0x100, uint16_t, uint8_t >::type >::type >::type type
    The smallest (in terms of memory required) unsigned integer type which can represent N...
    Definition: types.hpp:47
    -
    Template class for transformations.
    Definition: transf.hpp:250
    -
    void in_place_product(PPerm const &x, PPerm const &y) override
    Validates the data defining this.
    Definition: transf.hpp:389
    -
    void in_place_product(Transf const &x, Transf const &y)
    Multiply x and y and stores the result in this.
    Definition: transf.hpp:266
    -
    PPerm(std::initializer_list< TValueType > dom, std::initializer_list< TValueType > ran, size_t deg)
    A constructor.
    Definition: transf.hpp:348
    -
    PPerm(TContainer const &dom, TContainer const &ran, size_t deg)
    A constructor.
    Definition: transf.hpp:322
    -
    Template class for partial permutations.
    Definition: transf.hpp:306
    -
    - - - - diff --git a/types_8hpp_source.html b/types_8hpp_source.html deleted file mode 100644 index 9f386695a..000000000 --- a/types_8hpp_source.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -libsemigroups: include/types.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    types.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 #ifndef LIBSEMIGROUPS_INCLUDE_TYPES_HPP_
    20 #define LIBSEMIGROUPS_INCLUDE_TYPES_HPP_
    21 
    22 #include <stddef.h> // for size_t
    23 
    24 #include <cstdint> // for uint8_t, uint16_t, uint32_t, uint64_t
    25 #include <type_traits> // for conditional
    26 #include <utility> // for pair
    27 #include <vector> // for vector
    28 
    29 namespace libsemigroups {
    36  template <size_t N>
    37  struct SmallestInteger {
    40  using type = typename std::conditional<
    41  N >= 0x100000000,
    42  uint64_t,
    43  typename std::conditional<
    44  N >= 0x10000,
    45  uint32_t,
    46  typename std::conditional<N >= 0x100, uint16_t, uint8_t>::type>::
    47  type>::type;
    48  };
    50  using letter_type = size_t;
    51 
    53  using word_type = std::vector<letter_type>;
    54 
    56  using relation_type = std::pair<word_type, word_type>;
    57 } // namespace libsemigroups
    58 
    59 #endif // LIBSEMIGROUPS_INCLUDE_TYPES_HPP_
    std::pair< word_type, word_type > relation_type
    Type for a pair of word_type (a relation) of a semigroup.
    Definition: types.hpp:56
    -
    std::vector< letter_type > word_type
    Type for a word over the generators of a semigroup.
    Definition: types.hpp:53
    -
    Provides a type giving the smallest unsigned integer type capable of representing the template N...
    Definition: types.hpp:37
    -
    size_t letter_type
    Type for the index of a generator of a semigroup.
    Definition: types.hpp:50
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    typename std::conditional< N >=0x100000000, uint64_t, typename std::conditional< N >=0x10000, uint32_t, typename std::conditional< N >=0x100, uint16_t, uint8_t >::type >::type >::type type
    The smallest (in terms of memory required) unsigned integer type which can represent N...
    Definition: types.hpp:47
    -
    - - - - diff --git a/uf_8hpp_source.html b/uf_8hpp_source.html deleted file mode 100644 index 155b21a72..000000000 --- a/uf_8hpp_source.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -libsemigroups: include/uf.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    uf.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2017 Michael Torpey
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file defines UF, a class used to make an equivalence relation on
    20 // the integers {1 .. n}, using the UNION-FIND METHOD: new pairs can be added
    21 // and the appropriate classes combined quickly.
    22 
    23 #ifndef LIBSEMIGROUPS_INCLUDE_UF_HPP_
    24 #define LIBSEMIGROUPS_INCLUDE_UF_HPP_
    25 
    26 #include <algorithm>
    27 #include <functional>
    28 #include <vector>
    29 
    30 namespace libsemigroups {
    31  class UF {
    32  public:
    33  typedef std::vector<size_t> table_t;
    34  typedef std::vector<table_t*> blocks_t;
    35 
    36  // Copy constructor
    37  UF(const UF& copy);
    38  UF& operator=(UF const& copy) = delete;
    39 
    40  // Constructor by table
    41  explicit UF(const table_t& table);
    42 
    43  // Constructor by size
    44  explicit UF(size_t size);
    45 
    46  // Destructor
    47  ~UF();
    48 
    49  // Getters
    50  size_t get_size();
    51  table_t* get_table();
    52 
    53  void join(UF const& uf);
    54  void join(UF* uf) {
    55  join(*uf);
    56  }
    57 
    58  // get_blocks
    59  blocks_t* get_blocks();
    60 
    61  // find
    62  size_t find(size_t i);
    63 
    64  // union
    65  void unite(size_t i, size_t j);
    66 
    67  // flatten
    68  void flatten();
    69 
    70  // add_entry
    71  void add_entry();
    72 
    73  // nr_blocks
    74  size_t nr_blocks();
    75 
    76  void reset_next_rep();
    77  size_t next_rep();
    78 
    79  private:
    80  size_t _size;
    81  table_t* _table;
    82  blocks_t* _blocks;
    83  bool _haschanged;
    84  size_t _next_rep;
    85  };
    86 } // namespace libsemigroups
    87 
    88 #endif // LIBSEMIGROUPS_INCLUDE_UF_HPP_
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - - diff --git a/wrap_8hpp_source.html b/wrap_8hpp_source.html deleted file mode 100644 index c25ec8299..000000000 --- a/wrap_8hpp_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -libsemigroups: include/wrap.hpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    libsemigroups -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    wrap.hpp
    -
    -
    -
    1 //
    2 // libsemigroups - C++ library for semigroups and monoids
    3 // Copyright (C) 2018 James D. Mitchell
    4 //
    5 // This program is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
    10 // This program is distributed in the hope that it will be useful,
    11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13 // GNU General Public License for more details.
    14 //
    15 // You should have received a copy of the GNU General Public License
    16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
    17 //
    18 
    19 // This file contains wrappers for converting an CongBase -> FpSemiBase, the
    20 // resulting FpSemiBase delegates everything to CongBase which it wraps.
    21 
    22 #ifndef LIBSEMIGROUPS_INCLUDE_WRAP_HPP_
    23 #define LIBSEMIGROUPS_INCLUDE_WRAP_HPP_
    24 
    25 #include <memory> // for unique_ptr
    26 #include <stddef.h> // for size_t
    27 #include <string> // for string
    28 
    29 #include "cong-base.hpp" // for congruence_type, con...
    30 #include "fpsemi-base.hpp" // for FpSemiBase
    31 #include "froidure-pin-base.hpp" // for FroidurePinBase
    32 #include "libsemigroups-exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
    33 #include "stl.hpp" // for internal::make_unique
    34 
    35 namespace libsemigroups {
    36  namespace fpsemigroup {
    37  template <class TWrappedCong, bool TAddRules = true>
    38  class WrappedCong : public FpSemiBase {
    39  public:
    40  using wrapped_type = TWrappedCong;
    41 
    43  // WrappedCong - constructors - public
    45 
    46  WrappedCong()
    47  : _wrapped_cong(internal::make_unique<wrapped_type>(
    48  congruence_type::TWOSIDED)) {}
    49 
    50  explicit WrappedCong(FroidurePinBase& S)
    51  : _wrapped_cong(
    52  internal::make_unique<wrapped_type>(congruence_type::TWOSIDED,
    53  S)) {
    54  set_alphabet(S.nr_generators());
    55  if (TAddRules) {
    56  add_rules(S);
    57  }
    58  }
    59 
    61  // Runner - pure virtual method - public
    63 
    64  void run() override {
    65  _wrapped_cong->run_until(
    66  [this]() -> bool { return dead() || timed_out(); });
    67  }
    68 
    70  // FpSemiBase - pure virtual methods - public
    72 
    73  size_t size() override {
    74  return _wrapped_cong->nr_classes();
    75  }
    76 
    77  bool equal_to(std::string const& lhs, std::string const& rhs) override {
    78  validate_word(lhs);
    79  validate_word(rhs);
    80  return _wrapped_cong->contains(string_to_word(lhs),
    81  string_to_word(rhs));
    82  }
    83 
    84  // TODO improve the many copies etc in:
    85  // string -> word_type -> class_index_type -> word_type -> string
    86  std::string normal_form(std::string const& w) override {
    87  return word_to_string(_wrapped_cong->class_index_to_word(
    88  _wrapped_cong->word_to_class_index(string_to_word(w))));
    89  }
    90 
    92  // Runner - non-pure virtual method - protected
    94 
    95  bool finished_impl() const override {
    96  return _wrapped_cong->finished();
    97  }
    98 
    100  // FpSemiBase - non-pure virtual methods - public
    102 
    103  // We override FpSemiBase::equal_to to avoid unnecessary conversion from
    104  // word_type -> string.
    105  bool equal_to(word_type const& lhs, word_type const& rhs) override {
    106  return _wrapped_cong->contains(lhs, rhs);
    107  }
    108 
    109  // We override FpSemiBase::normal_form to avoid unnecessary conversion
    110  // from word_type -> string.
    111  word_type normal_form(word_type const& w) override {
    112  return _wrapped_cong->class_index_to_word(
    113  _wrapped_cong->word_to_class_index(w));
    114  }
    115 
    117  // WrappedCong - methods - public
    119 
    120  TWrappedCong& congruence() const {
    121  return *_wrapped_cong.get();
    122  }
    123 
    124  private:
    126  // FpSemiBase - pure virtual methods - private
    128 
    129  void add_rule_impl(std::string const& u, std::string const& v) override {
    130  // This is only ever called if u and v are valid
    131  _wrapped_cong->add_pair(string_to_word(u), string_to_word(v));
    132  }
    133 
    134  internal::owned_ptr<FroidurePinBase> froidure_pin_impl() override {
    135  return internal::owned_ptr<FroidurePinBase>(
    136  &_wrapped_cong->quotient_semigroup());
    137  }
    138 
    140  // FpSemiBase - non-pure virtual methods - private
    142 
    143  void set_alphabet_impl(std::string const& lphbt) override {
    144  _wrapped_cong->set_nr_generators(lphbt.size());
    145  }
    146 
    147  void set_alphabet_impl(size_t nr_letters) override {
    148  _wrapped_cong->set_nr_generators(nr_letters);
    149  }
    150 
    151  // We override FpSemiBase::add_rule_impl to avoid unnecessary conversion
    152  // from word_type -> string.
    153  void add_rule_impl(word_type const& u, word_type const& v) override {
    154  // This is only ever called if u and v are valid
    155  _wrapped_cong->add_pair(u, v);
    156  }
    157 
    158  void add_rules_impl(FroidurePinBase& S) override {
    159  relations(S, [this](word_type lhs, word_type rhs) -> void {
    160  validate_word(lhs);
    161  validate_word(rhs);
    162  add_rule(lhs, rhs);
    163  });
    164  }
    165 
    166  bool is_obviously_finite_impl() override {
    167  return _wrapped_cong->is_quotient_obviously_finite();
    168  }
    169 
    170  bool is_obviously_infinite_impl() override {
    171  return _wrapped_cong->is_quotient_obviously_infinite();
    172  }
    173 
    175  // WrappedCong - data - private
    177 
    178  std::unique_ptr<TWrappedCong> _wrapped_cong;
    179  };
    180  } // namespace fpsemigroup
    181 } // namespace libsemigroups
    182 #endif // LIBSEMIGROUPS_INCLUDE_WRAP_HPP_
    std::vector< letter_type > word_type
    Type for a word over the generators of a semigroup.
    Definition: types.hpp:53
    -
    Namespace for everything in the libsemigroups library.
    Definition: adapters.hpp:34
    -
    - - - -