bits.h File Reference

A collection of functions to help with bitwise manipulations. More...

#include <string>
#include "DGtal/base/Common.h"
Include dependency graph for bits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  bits::POW< X, exponent >
class  bits::POW< X, 1 >

Namespaces

namespace  bits

Defines

#define mymax(a, b)   ( ((a)<(b))?(b):(a) )
#define mymin(a, b)   ( ((a)<(b))?(a):(b) )

Functions

template<typename T >
std::string bits::bitString (T value, unsigned nbBits=0)
template<typename T >
bits::mask (unsigned nthBit)
template<typename T >
bool bits::getBit (T key, unsigned nthBit)
template<typename T >
bits::firstSetBit (T val)
template<typename T >
bits::firstUnsetBit (T val)
template<typename T >
unsigned bits::nbSetBits (T val)

Detailed Description

A collection of functions to help with bitwise manipulations.

Author:
Nicolas Silva (nicolas.silva@insa-lyon.fr )
Date:
2010/09/02

Define Documentation

#define mymax ( a,
 )     ( ((a)<(b))?(b):(a) )
#define mymin ( a,
 )     ( ((a)<(b))?(a):(b) )

Referenced by bits::bitString().

Generated on Fri Sep 17 17:29:55 2010 for DGtal by  doxygen 1.6.3