TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
for assert More...
Functions | |
uint64_t | next_higher_number (uint64_t x) |
The main function implements checking the next number. | |
bool | isPowerOfTwo (std ::int64_t n) |
The main function implements check for power of 2. | |
for assert
Program to generate n-bit Gray code
storing the numbers
for IO operations
Bit manipulation algorithms
for assert for IO operations
Bit manipulation algorithms
Gray code is a binary numeral system where consecutive values differ in exactly 1 bit. The following code offers one of many possible Gray codes given some pre-determined number of bits. for gray code representation for assert for IO operations for vector data structure
Bit manipulation algorithms
for io operations
Bit Manipulation algorithms
for std::min for IO operations for limits of integral types for std::vector
Bit manipulation algorithms
bool bit_manipulation::isPowerOfTwo | ( | std ::int64_t | n | ) |
The main function implements check for power of 2.
n | is the number who will be checked |
Definition at line 32 of file power_of_2.cpp.
uint64_t bit_manipulation::next_higher_number | ( | uint64_t | x | ) |
The main function implements checking the next number.
x | the number that will be calculated |
Definition at line 33 of file next_higher_number_with_same_number_of_set_bits.cpp.