Open CASCADE Technology  7.3.0
Data Structures | Public Member Functions | Protected Member Functions

TColStd_PackedMapOfInteger Class Reference

#include <TColStd_PackedMapOfInteger.hxx>

Inheritance diagram for TColStd_PackedMapOfInteger:
Inheritance graph
[legend]

Data Structures

class  Iterator
 Iterator of class TColStd_PackedMapOfInteger. More...
 

Public Member Functions

 TColStd_PackedMapOfInteger (const Standard_Integer NbBuckets=1)
 Constructor. More...
 
 TColStd_PackedMapOfInteger (const TColStd_PackedMapOfInteger &theOther)
 Copy constructor. More...
 
TColStd_PackedMapOfIntegeroperator= (const TColStd_PackedMapOfInteger &Other)
 
TColStd_PackedMapOfIntegerAssign (const TColStd_PackedMapOfInteger &)
 
void ReSize (const Standard_Integer NbBuckets)
 
void Clear ()
 
 ~TColStd_PackedMapOfInteger ()
 
Standard_Boolean Add (const Standard_Integer aKey)
 
Standard_Boolean Contains (const Standard_Integer aKey) const
 
Standard_Boolean Remove (const Standard_Integer aKey)
 
Standard_Integer NbBuckets () const
 
Standard_Integer Extent () const
 
Standard_Boolean IsEmpty () const
 
void Statistics (Standard_OStream &outStream) const
 
Standard_Integer GetMinimalMapped () const
 
Standard_Integer GetMaximalMapped () const
 
Boolean operations with maps as sets of integers
void Union (const TColStd_PackedMapOfInteger &, const TColStd_PackedMapOfInteger &)
 
Standard_Boolean Unite (const TColStd_PackedMapOfInteger &)
 
TColStd_PackedMapOfIntegeroperator|= (const TColStd_PackedMapOfInteger &MM)
 
void Intersection (const TColStd_PackedMapOfInteger &, const TColStd_PackedMapOfInteger &)
 
Standard_Boolean Intersect (const TColStd_PackedMapOfInteger &)
 
TColStd_PackedMapOfIntegeroperator&= (const TColStd_PackedMapOfInteger &MM)
 
void Subtraction (const TColStd_PackedMapOfInteger &, const TColStd_PackedMapOfInteger &)
 
Standard_Boolean Subtract (const TColStd_PackedMapOfInteger &)
 
TColStd_PackedMapOfIntegeroperator-= (const TColStd_PackedMapOfInteger &MM)
 
void Difference (const TColStd_PackedMapOfInteger &, const TColStd_PackedMapOfInteger &)
 
Standard_Boolean Differ (const TColStd_PackedMapOfInteger &)
 
TColStd_PackedMapOfIntegeroperator^= (const TColStd_PackedMapOfInteger &MM)
 
Standard_Boolean IsEqual (const TColStd_PackedMapOfInteger &) const
 
Standard_Boolean operator== (const TColStd_PackedMapOfInteger &MM) const
 
Standard_Boolean IsSubset (const TColStd_PackedMapOfInteger &) const
 
Standard_Boolean operator<= (const TColStd_PackedMapOfInteger &MM) const
 
Standard_Boolean HasIntersection (const TColStd_PackedMapOfInteger &) const
 

Protected Member Functions

Standard_Integer InternalExtent () const
 

Detailed Description

Optimized Map of integer values. Each block of 32 integers is stored in 8 bytes in memory.

Constructor & Destructor Documentation

◆ TColStd_PackedMapOfInteger() [1/2]

TColStd_PackedMapOfInteger::TColStd_PackedMapOfInteger ( const Standard_Integer  NbBuckets = 1)
inline

Constructor.

◆ TColStd_PackedMapOfInteger() [2/2]

TColStd_PackedMapOfInteger::TColStd_PackedMapOfInteger ( const TColStd_PackedMapOfInteger theOther)
inline

Copy constructor.

◆ ~TColStd_PackedMapOfInteger()

TColStd_PackedMapOfInteger::~TColStd_PackedMapOfInteger ( )
inline

Member Function Documentation

◆ Add()

Standard_Boolean TColStd_PackedMapOfInteger::Add ( const Standard_Integer  aKey)

◆ Assign()

TColStd_PackedMapOfInteger& TColStd_PackedMapOfInteger::Assign ( const TColStd_PackedMapOfInteger )

◆ Clear()

void TColStd_PackedMapOfInteger::Clear ( )

◆ Contains()

Standard_Boolean TColStd_PackedMapOfInteger::Contains ( const Standard_Integer  aKey) const

◆ Differ()

Standard_Boolean TColStd_PackedMapOfInteger::Differ ( const TColStd_PackedMapOfInteger )

Apply to this Map the symmetric difference (aka exclusive disjunction, boolean XOR) operation with another (given) Map. The result contains the values that are contained only in this or the operand map, but not in both. This algorithm is similar to method Difference().

Returns
True if contents of this map is changed

◆ Difference()

void TColStd_PackedMapOfInteger::Difference ( const TColStd_PackedMapOfInteger ,
const TColStd_PackedMapOfInteger  
)

Sets this Map 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 contents of this Map is cleared. This map (result of the boolean operation) can also be used as one of operands.

◆ Extent()

Standard_Integer TColStd_PackedMapOfInteger::Extent ( ) const
inline

◆ GetMaximalMapped()

Standard_Integer TColStd_PackedMapOfInteger::GetMaximalMapped ( ) const

Query the maximal contained key value.

◆ GetMinimalMapped()

Standard_Integer TColStd_PackedMapOfInteger::GetMinimalMapped ( ) const

Query the minimal contained key value.

◆ HasIntersection()

Standard_Boolean TColStd_PackedMapOfInteger::HasIntersection ( const TColStd_PackedMapOfInteger ) const

Returns True if this map has common items with the given one.

◆ InternalExtent()

Standard_Integer TColStd_PackedMapOfInteger::InternalExtent ( ) const
inlineprotected

◆ Intersect()

Standard_Boolean TColStd_PackedMapOfInteger::Intersect ( const TColStd_PackedMapOfInteger )

Apply to this Map the intersection operation (aka multiplication, common, boolean AND) with another (given) Map. The result contains only the values that are contained in both this and the given maps. This algorithm is similar to method Intersection().

Returns
True if content of this map is changed

◆ Intersection()

void TColStd_PackedMapOfInteger::Intersection ( const TColStd_PackedMapOfInteger ,
const TColStd_PackedMapOfInteger  
)

Sets this Map 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 contents of this Map is cleared. This same map (result of the boolean operation) can also be used as one of operands. The order of operands makes no difference; the method minimizes internally the number of iterations using the smallest map for the loop.

◆ IsEmpty()

Standard_Boolean TColStd_PackedMapOfInteger::IsEmpty ( ) const
inline

◆ IsEqual()

Standard_Boolean TColStd_PackedMapOfInteger::IsEqual ( const TColStd_PackedMapOfInteger ) const

Returns True if this map is equal to the given one, i.e. they contain the same sets of elements

◆ IsSubset()

Standard_Boolean TColStd_PackedMapOfInteger::IsSubset ( const TColStd_PackedMapOfInteger ) const

Returns True if this map is subset of the given one, i.e. all elements contained in this map is contained also in the operand map. if this map is empty that this method returns true for any operand map.

◆ NbBuckets()

Standard_Integer TColStd_PackedMapOfInteger::NbBuckets ( ) const
inline

◆ operator&=()

TColStd_PackedMapOfInteger& TColStd_PackedMapOfInteger::operator &= ( const TColStd_PackedMapOfInteger MM)
inline

Overloaded operator version of Intersect().

◆ operator-=()

TColStd_PackedMapOfInteger& TColStd_PackedMapOfInteger::operator-= ( const TColStd_PackedMapOfInteger MM)
inline

Overloaded operator version of Subtract().

◆ operator<=()

Standard_Boolean TColStd_PackedMapOfInteger::operator<= ( const TColStd_PackedMapOfInteger MM) const
inline

Overloaded operator version of IsSubset().

◆ operator=()

TColStd_PackedMapOfInteger& TColStd_PackedMapOfInteger::operator= ( const TColStd_PackedMapOfInteger Other)
inline

◆ operator==()

Standard_Boolean TColStd_PackedMapOfInteger::operator== ( const TColStd_PackedMapOfInteger MM) const
inline

Overloaded operator version of IsEqual().

◆ operator^=()

TColStd_PackedMapOfInteger& TColStd_PackedMapOfInteger::operator^= ( const TColStd_PackedMapOfInteger MM)
inline

Overloaded operator version of Differ().

◆ operator|=()

TColStd_PackedMapOfInteger& TColStd_PackedMapOfInteger::operator|= ( const TColStd_PackedMapOfInteger MM)
inline

Overloaded operator version of Unite().

◆ Remove()

Standard_Boolean TColStd_PackedMapOfInteger::Remove ( const Standard_Integer  aKey)

◆ ReSize()

void TColStd_PackedMapOfInteger::ReSize ( const Standard_Integer  NbBuckets)

◆ Statistics()

void TColStd_PackedMapOfInteger::Statistics ( Standard_OStream outStream) const
inline

◆ Subtract()

Standard_Boolean TColStd_PackedMapOfInteger::Subtract ( const TColStd_PackedMapOfInteger )

Apply to this Map 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 this map and not contained in this map. This algorithm is similar to method Subtract() with two operands.

Returns
True if contents of this map is changed

◆ Subtraction()

void TColStd_PackedMapOfInteger::Subtraction ( const TColStd_PackedMapOfInteger ,
const TColStd_PackedMapOfInteger  
)

Sets this Map 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 operands and not contained in the second one. All previous contents of this Map is cleared. This map (result of the boolean operation) can also be used as the first operand.

◆ Union()

void TColStd_PackedMapOfInteger::Union ( const TColStd_PackedMapOfInteger ,
const TColStd_PackedMapOfInteger  
)

Sets this Map 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 contents of this Map is cleared. This map (result of the boolean operation) can also be passed as one of operands.

◆ Unite()

Standard_Boolean TColStd_PackedMapOfInteger::Unite ( const TColStd_PackedMapOfInteger )

Apply to this Map the boolean operation union (aka addition, fuse, merge, boolean OR) with another (given) Map. The result contains the values that were previously contained in this map or contained in the given (operand) map. This algorithm is similar to method Union().

Returns
True if content of this map is changed

The documentation for this class was generated from the following file: