COMBINATORIAL_BLAS
1.6
binUtils.h
Go to the documentation of this file.
1
8
#ifndef __BIN_UTILS_H_
9
#define __BIN_UTILS_H_
10
#include <vector>
11
17
namespace
binOp
{
18
22
bool
isPowerOfTwo
(
unsigned
int
n);
23
27
unsigned
int
binLength
(
unsigned
int
num) ;
28
32
unsigned
int
fastLog2
(
unsigned
int
num) ;
33
41
int
toBin
(
unsigned
int
dec,
unsigned
int
binLen, std::vector<bool>& result);
42
48
unsigned
int
binToDec
(
unsigned
int
* numBin,
unsigned
int
binLen) ;
49
53
int
getNextHighestPowerOfTwo
(
unsigned
int
n);
54
58
int
getPrevHighestPowerOfTwo
(
unsigned
int
n);
59
63
unsigned
int
reversibleHash
(
unsigned
int
x);
64
65
66
}
//end namespace
67
68
#endif
binOp::toBin
int toBin(unsigned int dec, unsigned int binLen, std::vector< bool > &result)
Converts a decimal number to binary.
Definition:
binUtils.cpp:33
binOp::isPowerOfTwo
bool isPowerOfTwo(unsigned int n)
Definition:
binUtils.cpp:56
binOp::getNextHighestPowerOfTwo
int getNextHighestPowerOfTwo(unsigned int n)
Definition:
binUtils.cpp:61
binOp::fastLog2
unsigned int fastLog2(unsigned int num)
Definition:
binUtils.cpp:15
binOp::getPrevHighestPowerOfTwo
int getPrevHighestPowerOfTwo(unsigned int n)
Definition:
binUtils.cpp:75
binOp::reversibleHash
unsigned int reversibleHash(unsigned int x)
Definition:
binUtils.cpp:88
binOp
A set of functions for fast binary operations.
binOp::binToDec
unsigned int binToDec(unsigned int *numBin, unsigned int binLen)
Definition:
binUtils.cpp:47
binOp::binLength
unsigned int binLength(unsigned int num)
Definition:
binUtils.cpp:24
debian
tmp
usr
include
usort
binUtils.h
Generated by
1.8.17