ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
BinaryCounter.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*-------------------------- File BinaryCounter.h --------------------------*/
3/*--------------------------------------------------------------------------*/
32/*--------------------------------------------------------------------------*/
33/*----------------------------- DEFINITIONS --------------------------------*/
34/*--------------------------------------------------------------------------*/
35
36#ifndef __ADS_BinaryCounter
37 #define __ADS_BinaryCounter
38/* self-identification: #endif constant */
39
40/*--------------------------------------------------------------------------*/
41/*------------------------------ INCLUDES ----------------------------------*/
42/*--------------------------------------------------------------------------*/
43
44#include "ADS/Contract.h"
45
46#include <algorithm>
47#include <cstddef>
48#include <vector>
49
50/*--------------------------------------------------------------------------*/
51/*--------------------------- NAMESPACE ------------------------------------*/
52/*--------------------------------------------------------------------------*/
53
54namespace ADS
55{
56
57/*--------------------------------------------------------------------------*/
58/*------------------------------ FUNCTIONS ---------------------------------*/
59/*--------------------------------------------------------------------------*/
60
82inline std::size_t add( std::vector< int > & A );
83
84/*--------------------------------------------------------------------------*/
85
86} // end( namespace ADS )
87
88/*--------------------------------------------------------------------------*/
89/*-------------------------- IMPLEMENTATION --------------------------------*/
90/*--------------------------------------------------------------------------*/
91
92#include "ADS/algorithm/impl/BinaryCounter.tpp"
93
94/*--------------------------------------------------------------------------*/
95
96#endif /* BinaryCounter.h included */
97
98/*--------------------------------------------------------------------------*/
99/*------------------------ End File BinaryCounter.h ------------------------*/
100/*--------------------------------------------------------------------------*/
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
std::size_t add(std::vector< int > &A)
the increment of the counter of bits modulo , returning the number of bits it has changed,...
Definition ADT.h:96