Settings¶
This page contains information about the member functions of the FroidurePinBase
that control various settings.
-
size_t libsemigroups::FroidurePinBase::batch_size() const noexcept¶
Returns the current value of the batch size.
- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
This is the minimum number of elements enumerated in any call to run, see batch_size(size_t).
- Parameters
None.
- Returns
A
size_t
.
-
FroidurePinBase &libsemigroups::FroidurePinBase::batch_size(size_t batch_size) noexcept¶
Set a new value for the batch size.
The batch size is the number of new elements to be found by any call to run. This is used by, for example, FroidurePin::position so that it is possible to find the position of an element after only partially enumerating the semigroup.
The default value of the batch size is
8192
.- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
batch_size – the new value for the batch size.
- Returns
A reference to
this
.
-
size_t libsemigroups::FroidurePinBase::concurrency_threshold() const noexcept¶
Returns the current value of the concurrency threshold.
- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
None.
- Returns
A
size_t
.
-
FroidurePinBase &libsemigroups::FroidurePinBase::concurrency_threshold(size_t thrshld) noexcept¶
Set the threshold for concurrency to be used by member functions.
This member function sets the threshold such that if size() exceeds this value, then the following functions may use a concurrent implementation:
The default value is
823543
.- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
thrshld – the new threshold.
- Returns
A reference to
this
.
-
bool libsemigroups::FroidurePinBase::immutable() const noexcept¶
Returns the current immutability.
- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
None.
- Returns
A
bool
.
-
FroidurePinBase &libsemigroups::FroidurePinBase::immutable(bool val) noexcept¶
Set immutability.
Prevent further changes to the mathematical semigroup represented by an instance of FroidurePinBase.
This member function prevents certain member functions from being applied to a FroidurePinBase, such as FroidurePin::add_generators, if they would change the mathematical object represented by
this
.The default value is false.
- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
val – the new value.
- Returns
A reference to
this
.
-
size_t libsemigroups::FroidurePinBase::max_threads() const noexcept¶
Returns the current value of the maximum number of threads.
- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
None.
- Returns
A
size_t
.
-
FroidurePinBase &libsemigroups::FroidurePinBase::max_threads(size_t number_of_threads) noexcept¶
Set the maximum number of threads.
This member function sets the maximum number of threads to be used by any member function of a FroidurePin object. The number of threads is limited to the maximum of 1 and the minimum of
number_of_threads
and the number of threads supported by the hardware.The default value is
std::thread::hardware_concurrency()
.- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
number_of_threads – the maximum number of threads to use.
- Returns
A reference to
this
.