Empirical
Classes | Namespaces | Functions
BitSet.h File Reference

A drop-in replacement for std::bitset, with additional bit magic features. More...

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

Go to the source code of this file.

Classes

class  emp::BitSet< NUM_BITS >
 

Namespaces

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

Functions

template<size_t NUM_BITS1, size_t NUM_BITS2>
BitSet< NUM_BITS1+NUM_BITS2 > emp::join (const BitSet< NUM_BITS1 > &in1, const BitSet< NUM_BITS2 > &in2)
 
template<size_t NUM_BITS>
double emp::SimpleMatchCoeff (const BitSet< NUM_BITS > &in1, const BitSet< NUM_BITS > &in2)
 Computes simple matching coefficient (https://en.wikipedia.org/wiki/Simple_matching_coefficient). More...
 
template<size_t NUM_BITS>
std::ostream & operator<< (std::ostream &out, const emp::BitSet< NUM_BITS > &_bit_set)
 

Detailed Description

A drop-in replacement for std::bitset, with additional bit magic features.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2017
Note
Status: RELEASE
Like std::bitset, bit zero is on the right side. Unlike std::bitset, emp::BitSet gives access to bit fields for easy access to different sized chucnk of bits and implementation new bit-magic tricks.

Function Documentation

template<size_t NUM_BITS>
std::ostream& operator<< ( std::ostream &  out,
const emp::BitSet< NUM_BITS > &  _bit_set 
)