NRP Core  1.4.1
set_ops.hpp File Reference
#include <set>
#include <algorithm>

Go to the source code of this file.

Functions

template<class T >
bool operator== (const std::set< T > &A, const std::set< T > &B)
 
template<class T >
std::set< T > operator* (const std::set< T > &A, const std::set< T > &B)
 
template<class T >
std::set< T > & operator+= (std::set< T > &A, const std::set< T > &B)
 
template<class T >
std::set< T > & operator-= (std::set< T > &A, const std::set< T > &B)
 
template<class T >
std::set< T > operator+ (const std::set< T > &A, const std::set< T > &B)
 
template<class T >
std::set< T > operator- (const std::set< T > &A, const std::set< T > &B)
 
template<class T >
std::set< T > symm_diff (const std::set< T > &A, const std::set< T > &B)
 
template<class T , class constT >
bool includes_elm (const std::set< T > &A, constT &a)
 
template<class T >
int intersection_size (const std::set< T > &A, const std::set< T > &B)
 
template<class T >
int big_small_intersection_size (const std::set< T > &A, const std::set< T > &B)
 
template<class T >
int union_size (const std::set< T > &A, const std::set< T > &B)
 
template<class T >
int set_difference_size (const std::set< T > &A, const std::set< T > &B)
 

Function Documentation

◆ big_small_intersection_size()

template<class T >
int big_small_intersection_size ( const std::set< T > &  A,
const std::set< T > &  B 
)

◆ includes_elm()

template<class T , class constT >
bool includes_elm ( const std::set< T > &  A,
constT &  a 
)
inline
Returns
true, if element a is in set A

◆ intersection_size()

template<class T >
int intersection_size ( const std::set< T > &  A,
const std::set< T > &  B 
)

◆ operator*()

template<class T >
std::set<T> operator* ( const std::set< T > &  A,
const std::set< T > &  B 
)

◆ operator+()

template<class T >
std::set<T> operator+ ( const std::set< T > &  A,
const std::set< T > &  B 
)
Returns
a new set, the union of A and B.

◆ operator+=()

template<class T >
std::set<T>& operator+= ( std::set< T > &  A,
const std::set< T > &  B 
)

◆ operator-()

template<class T >
std::set<T> operator- ( const std::set< T > &  A,
const std::set< T > &  B 
)
Returns
the A - B: elements in A but not in B.

◆ operator-=()

template<class T >
std::set<T>& operator-= ( std::set< T > &  A,
const std::set< T > &  B 
)

◆ operator==()

template<class T >
bool operator== ( const std::set< T > &  A,
const std::set< T > &  B 
)

◆ set_difference_size()

template<class T >
int set_difference_size ( const std::set< T > &  A,
const std::set< T > &  B 
)

◆ symm_diff()

template<class T >
std::set<T> symm_diff ( const std::set< T > &  A,
const std::set< T > &  B 
)
Returns
a new (possibly empty) set, the symmetric difference of A and B. That is, elements in only one set, but not the other. Mathematically, this is A+B - (A*B)

◆ union_size()

template<class T >
int union_size ( const std::set< T > &  A,
const std::set< T > &  B 
)