Empirical
Classes | Namespaces | Functions
BitVector.h File Reference

A drop-in replacement for std::vector<bool>, with additional bitwise logic features. More...

#include <iostream>
#include "../base/assert.h"
#include "../base/Ptr.h"
#include "../base/vector.h"
#include "bitset_utils.h"
#include "functions.h"
#include "math.h"

Go to the source code of this file.

Classes

class  emp::BitVector
 A drop-in replacement for std::vector<bool>, but with extra bitwise logic features. More...
 
struct  std::hash< emp::BitVector >
 Hash function to allow BitVector to be used with maps and sets (must be in std). More...
 

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 
 std
 

Functions

std::ostream & std::operator<< (std::ostream &out, const emp::BitVector &bit_v)
 operator<< to work with ostream (must be in std to work) More...
 

Detailed Description

A drop-in replacement for std::vector<bool>, with additional bitwise logic features.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2017
Note
Status: RELEASE
Todo:

Implement append(), resize()...

Implement techniques to push bits (we have pop)

Implement techniques to insert of remove bits from middle.

Note
This class is 15-20% slower than emp::BitSet, but more flexible & run-time configurable.