Regina Calculation Engine
Public Types | Static Public Member Functions | 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 >

Public Types

enum  { specialised = 0 }
 

Static Public Member Functions

static T nextPermutation (T x)
 Returns the next largest integer with the same number of true bits as x. 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.
Template Parameters
Tan unsigned integral numeric type, which we treat as a sequence of true and/or false bits.

Member Enumeration Documentation

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
specialised 

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

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

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.

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

Copyright © 1999-2021, 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).