Auxiliary Arithmetic Algorithms

Functions

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
void aaa::logical_and (InputIterator1 first_left, InputIterator1 last_left, InputIterator2 first_right, OutputIterator first_out)
 
template<typename Container1 , typename Container2 , typename Container3 >
void aaa::logical_and (const Container1 &left, const Container2 &right, Container3 &out)
 
template<typename Container >
Container aaa::logical_and (const Container &left, const Container &right)
 

Detailed Description

Example:

std::vector<bool> in1 = { true, false, true, false };
std::vector<bool> in2 = { true, false, true, false };
std::valarray<bool> in3 = { true, false, true, false };
std::array<bool, 4> in4 = { true, false, true, false };
std::array<bool, 6> in5 = { true, false, true, false, true, false };
std::vector<bool> out = { true, false, true, false };
using namespace aaa;
out = logical_and(in1, in2); // Same type of containers.
logical_and(in3, in4, out); // Mixed type of containers.
logical_and(begin(in5) + 1, begin(in5) + 5, begin(in4), begin(out)); // Ranges of iterators.