![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Algorithms and utilities for NCollection_PackedMap operations. More...
Functions | |
| template<class IntType > | |
| bool | Unite (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Apply to theMap the boolean operation union (aka addition, fuse, merge, boolean OR) with another (given) Map. The result contains the values that were previously contained in theMap or contained in the given (operand) map. | |
| template<class IntType > | |
| void | Union (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theLeftMap, const NCollection_PackedMap< IntType > &theRightMap) |
| Sets theMap to be the result of union (aka addition, fuse, merge, boolean OR) operation between two given Maps. The new Map contains the values that are contained either in the first map or in the second map or in both. All previous content of theMap is cleared. theMap (result of the boolean operation) can also be passed as one of operands. | |
| template<class IntType > | |
| bool | Intersect (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Apply to theMap the intersection operation (aka multiplication, common, boolean AND) with another (given) Map. The result contains only the values that are contained in both theMap and the given map. | |
| template<class IntType > | |
| void | Intersection (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theLeftMap, const NCollection_PackedMap< IntType > &theRightMap) |
| Sets theMap to be the result of intersection (aka multiplication, common, boolean AND) operation between two given Maps. The new Map contains only the values that are contained in both map operands. All previous content of theMap is cleared. theMap (result of the boolean operation) can also be used as one of operands. | |
| template<class IntType > | |
| bool | Subtract (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Apply to theMap the subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation with another (given) Map. The result contains only the values that were previously contained in theMap and not contained in theOtherMap. | |
| template<class IntType > | |
| void | Subtraction (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theLeftMap, const NCollection_PackedMap< IntType > &theRightMap) |
| Sets theMap to be the result of subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation between two given Maps. The new Map contains only the values that are contained in the first map operand and not contained in the second one. All previous content of theMap is cleared. | |
| template<class IntType > | |
| bool | Differ (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Apply to theMap the symmetric difference (aka exclusive disjunction, boolean XOR) operation with another (given) Map. The result contains the values that are contained only in theMap or the operand map, but not in both. | |
| template<class IntType > | |
| void | Difference (NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theLeftMap, const NCollection_PackedMap< IntType > &theRightMap) |
| Sets theMap to be the result of symmetric difference (aka exclusive disjunction, boolean XOR) operation between two given Maps. The new Map contains the values that are contained only in the first or the second operand maps but not in both. All previous content of theMap is cleared. theMap (result of the boolean operation) can also be used as one of operands. | |
| template<class IntType > | |
| bool | HasIntersection (const NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Returns True if theMap and theOtherMap have common elements. | |
| template<class IntType > | |
| bool | Contains (const NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Checks if theMap contains all keys of theOtherMap. Returns True if theMap is a superset of theOtherMap (theOtherMap is a subset of theMap). | |
| template<class IntType > | |
| bool | IsSubset (const NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Returns True if theMap is a subset of theOtherMap, i.e. all elements contained in theMap are also contained in theOtherMap. If theMap is empty, this method returns true for any operand map. | |
| template<class IntType > | |
| bool | IsEqual (const NCollection_PackedMap< IntType > &theMap, const NCollection_PackedMap< IntType > &theOtherMap) |
| Checks if two maps contain exactly the same keys. Returns True if theMap and theOtherMap are equal. | |
Algorithms and utilities for NCollection_PackedMap operations.
This namespace provides template functions for boolean operations on packed maps: union, intersection, subtraction, and symmetric difference. These algorithms are optimized for the packed bit representation.
| bool NCollection_PackedMapAlgo::Contains | ( | const NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Checks if theMap contains all keys of theOtherMap. Returns True if theMap is a superset of theOtherMap (theOtherMap is a subset of theMap).
| bool NCollection_PackedMapAlgo::Differ | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Apply to theMap the symmetric difference (aka exclusive disjunction, boolean XOR) operation with another (given) Map. The result contains the values that are contained only in theMap or the operand map, but not in both.
| void NCollection_PackedMapAlgo::Difference | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theLeftMap, | ||
| const NCollection_PackedMap< IntType > & | theRightMap ) |
Sets theMap to be the result of symmetric difference (aka exclusive disjunction, boolean XOR) operation between two given Maps. The new Map contains the values that are contained only in the first or the second operand maps but not in both. All previous content of theMap is cleared. theMap (result of the boolean operation) can also be used as one of operands.
| bool NCollection_PackedMapAlgo::HasIntersection | ( | const NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Returns True if theMap and theOtherMap have common elements.
| bool NCollection_PackedMapAlgo::Intersect | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Apply to theMap the intersection operation (aka multiplication, common, boolean AND) with another (given) Map. The result contains only the values that are contained in both theMap and the given map.
| void NCollection_PackedMapAlgo::Intersection | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theLeftMap, | ||
| const NCollection_PackedMap< IntType > & | theRightMap ) |
Sets theMap to be the result of intersection (aka multiplication, common, boolean AND) operation between two given Maps. The new Map contains only the values that are contained in both map operands. All previous content of theMap is cleared. theMap (result of the boolean operation) can also be used as one of operands.
| bool NCollection_PackedMapAlgo::IsEqual | ( | const NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Checks if two maps contain exactly the same keys. Returns True if theMap and theOtherMap are equal.
| bool NCollection_PackedMapAlgo::IsSubset | ( | const NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Returns True if theMap is a subset of theOtherMap, i.e. all elements contained in theMap are also contained in theOtherMap. If theMap is empty, this method returns true for any operand map.
| bool NCollection_PackedMapAlgo::Subtract | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Apply to theMap the subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation with another (given) Map. The result contains only the values that were previously contained in theMap and not contained in theOtherMap.
| void NCollection_PackedMapAlgo::Subtraction | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theLeftMap, | ||
| const NCollection_PackedMap< IntType > & | theRightMap ) |
Sets theMap to be the result of subtraction (aka set-theoretic difference, relative complement, exclude, cut, boolean NOT) operation between two given Maps. The new Map contains only the values that are contained in the first map operand and not contained in the second one. All previous content of theMap is cleared.
| void NCollection_PackedMapAlgo::Union | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theLeftMap, | ||
| const NCollection_PackedMap< IntType > & | theRightMap ) |
Sets theMap to be the result of union (aka addition, fuse, merge, boolean OR) operation between two given Maps. The new Map contains the values that are contained either in the first map or in the second map or in both. All previous content of theMap is cleared. theMap (result of the boolean operation) can also be passed as one of operands.
| bool NCollection_PackedMapAlgo::Unite | ( | NCollection_PackedMap< IntType > & | theMap, |
| const NCollection_PackedMap< IntType > & | theOtherMap ) |
Apply to theMap the boolean operation union (aka addition, fuse, merge, boolean OR) with another (given) Map. The result contains the values that were previously contained in theMap or contained in the given (operand) map.