Regina 7.3 Calculation Engine
Static Public Member Functions | Static Public Attributes | List of all members
regina::BitManipulatorByType< T > Class Template Reference

Contains implementation details for BitManipulator where we optimise according to the underlying data type. More...

#include <utilities/bitmanip.h>

Inheritance diagram for regina::BitManipulatorByType< T >:
regina::BitManipulator< T >

Static Public Member Functions

static T nextPermutation (T x)
 Returns the next largest integer with the same number of true bits as x. More...
 

Static Public Attributes

static constexpr bool specialised = false
 Indicates whether this class is a template specialisation of BitManipulatorByType with extra optimisations. More...
 

Detailed Description

template<typename T>
class regina::BitManipulatorByType< T >

Contains implementation details for BitManipulator where we optimise according to the underlying data type.

End users should use the BitManipulator class, not this class.

Precondition
Type T is an unsigned integral numeric type.
Python
Not present. Only the end-user class BitManipulator<unsigned long> is available to Python users.
Template Parameters
Tan unsigned integral numeric type, which we treat as a sequence of true and/or false bits.

Member Function Documentation

◆ nextPermutation()

template<typename T >
static T regina::BitManipulatorByType< T >::nextPermutation ( x)
inlinestatic

Returns the next largest integer with the same number of true bits as x.

If x is the largest such integer (i.e., x is of the form 111...1000...0), then this routine returns 0.

Parameters
xthe integer of type T to examine.
Returns
the next largrst integer with the same number of true bits, or 0 if this is the largest such integer.

Member Data Documentation

◆ specialised

template<typename T >
constexpr bool regina::BitManipulatorByType< T >::specialised = false
staticconstexpr

Indicates whether this class is a template specialisation of BitManipulatorByType with extra optimisations.

This compile-time constant is set to false for the generic implementation of BitManipulatorByType, and true for all specialisations.


The documentation for this class was generated from the following file:

Copyright © 1999-2023, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).