DGtal 1.3.0
Searching...
No Matches
DGtal::functions::setops Namespace Reference

## Functions

template<typename Container >
Container & operator-= (Container &S1, const Container &S2)

template<typename Container >
Container operator- (const Container &S1, const Container &S2)

template<typename Container >
Container operator| (const Container &S1, const Container &S2)

template<typename Container >
Container & operator|= (Container &S1, const Container &S2)

template<typename Container >
Container operator& (const Container &S1, const Container &S2)

template<typename Container >
Container & operator&= (Container &S1, const Container &S2)

template<typename Container >
Container operator^ (const Container &S1, const Container &S2)

template<typename Container >
Container & operator^= (Container &S1, const Container &S2)

## Detailed Description

Contains set operator union |, intersection &, difference -, symmetric difference ^.

## ◆ operator&()

template<typename Container >
 Container DGtal::functions::setops::operator& ( const Container & S1, const Container & S2 )
inline

Set intersection operation. Returns the set $$S1 \cap S2$$.

Parameters
 [in] S1 an input set. [in] S2 another input set.
Returns
the set $$S1 \cap S2$$.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1332 of file SetFunctions.h.

1333 {
1334 return makeIntersection( S1, S2 );
1335 }
Container makeIntersection(const Container &S1, const Container &S2)

References DGtal::functions::makeIntersection(), and operator&().

Referenced by operator&().

## ◆ operator&=()

template<typename Container >
 Container & DGtal::functions::setops::operator&= ( Container & S1, const Container & S2 )
inline

Set intersection operation. Updates the set S1 as $$S1 \cap S2$$.

Parameters
 [in,out] S1 an input set, $$S1 \cap S2$$ as output. [in] S2 another input set.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1346 of file SetFunctions.h.

1347 {
1348 return assignIntersection( S1, S2 );
1349 }
Container & assignIntersection(Container &S1, const Container &S2)

References DGtal::functions::assignIntersection().

## ◆ operator-()

template<typename Container >
 Container DGtal::functions::setops::operator- ( const Container & S1, const Container & S2 )
inline

Set difference operation. Returns the difference of S1 - S2.

Parameters
 [in] S1 an input set [in] S2 another input set.
Returns
the set S1 - S2.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1288 of file SetFunctions.h.

1289 {
1290 return makeDifference( S1, S2 );
1291 }
Container makeDifference(const Container &S1, const Container &S2)
Definition: SetFunctions.h:946

References DGtal::functions::makeDifference(), and operator-().

Referenced by operator-().

## ◆ operator-=()

template<typename Container >
 Container & DGtal::functions::setops::operator-= ( Container & S1, const Container & S2 )
inline

Set difference operation. Updates the set S1 as S1 - S2.

Parameters
 [in,out] S1 an input set, S1 - S2 as output. [in] S2 another input set.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1272 of file SetFunctions.h.

1273 {
1274 return assignDifference( S1, S2 );
1275 }
Container & assignDifference(Container &S1, const Container &S2)
Definition: SetFunctions.h:896

References DGtal::functions::assignDifference().

## ◆ operator^()

template<typename Container >
 Container DGtal::functions::setops::operator^ ( const Container & S1, const Container & S2 )
inline

Set symmetric difference operation. Returns the set $$S1 \Delta S2$$.

Parameters
 [in] S1 an input set. [in] S2 another input set.
Returns
the set $$S1 \Delta S2$$.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1362 of file SetFunctions.h.

1363 {
1364 return makeSymmetricDifference( S1, S2 );
1365 }
Container makeSymmetricDifference(const Container &S1, const Container &S2)

References DGtal::functions::makeSymmetricDifference(), and operator^().

Referenced by operator^().

## ◆ operator^=()

template<typename Container >
 Container & DGtal::functions::setops::operator^= ( Container & S1, const Container & S2 )
inline

Set symmetric difference operation. Updates the set S1 as $$S1 \Delta S2$$.

Parameters
 [in,out] S1 an input set, $$S1 \Delta S2$$ as output. [in] S2 another input set.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1378 of file SetFunctions.h.

1379 {
1380 return assignSymmetricDifference( S1, S2 );
1381 }
Container & assignSymmetricDifference(Container &S1, const Container &S2)

## ◆ operator|()

template<typename Container >
 Container DGtal::functions::setops::operator| ( const Container & S1, const Container & S2 )
inline

Set union operation. Returns the set $$S1 \cup S2$$.

Parameters
 [in] S1 an input set. [in] S2 another input set.
Returns
the set $$S1 \cup S2$$.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1303 of file SetFunctions.h.

1304 {
1305 return makeUnion( S1, S2 );
1306 }
Container makeUnion(const Container &S1, const Container &S2)

References DGtal::functions::makeUnion().

## ◆ operator|=()

template<typename Container >
 Container & DGtal::functions::setops::operator|= ( Container & S1, const Container & S2 )
inline

Set union operation. Updates the set S1 as $$S1 \cup S2$$.

Parameters
 [in,out] S1 an input set, $$S1 \cup S2$$ as output. [in] S2 another input set.
Template Parameters
 Container any type of container (even a sequence, a set, an unordered_set, a map, etc).

Definition at line 1317 of file SetFunctions.h.

1318 {
1319 return assignUnion( S1, S2 );
1320 }
Container & assignUnion(Container &S1, const Container &S2)
Definition: SetFunctions.h:990

References DGtal::functions::assignUnion().