ReactOS 0.4.16-dev-306-g647d351
mask_array< _Tp > Class Template Reference

#include <_valarray.h>

Collaboration diagram for mask_array< _Tp >:

Public Types

typedef _Tp value_type
 

Public Member Functions

void operator= (const valarray< value_type > &__x) const
 
void operator*= (const valarray< value_type > &__x) const
 
void operator/= (const valarray< value_type > &__x) const
 
void operator%= (const valarray< value_type > &__x) const
 
void operator+= (const valarray< value_type > &__x) const
 
void operator-= (const valarray< value_type > &__x) const
 
void operator^= (const valarray< value_type > &__x) const
 
void operator&= (const valarray< value_type > &__x) const
 
void operator|= (const valarray< value_type > &__x) const
 
void operator<<= (const valarray< value_type > &__x) const
 
void operator>>= (const valarray< value_type > &__x) const
 
void operator= (const value_type &__c) const
 
size_t _M_num_true () const
 
 mask_array (const mask_array &__x)
 
 ~mask_array ()
 

Private Member Functions

 mask_array (const _Valarray_bool &__mask, valarray< _Tp > &__array)
 
 mask_array ()
 
void operator= (const mask_array< _Tp > &)
 

Private Attributes

_Valarray_bool _M_mask
 
valarray< _Tp > & _M_array
 

Friends

class valarray< _Tp >
 

Detailed Description

template<class _Tp>
class mask_array< _Tp >

Definition at line 1436 of file _valarray.h.

Member Typedef Documentation

◆ value_type

template<class _Tp >
typedef _Tp mask_array< _Tp >::value_type

Definition at line 1439 of file _valarray.h.

Constructor & Destructor Documentation

◆ mask_array() [1/3]

template<class _Tp >
mask_array< _Tp >::mask_array ( const mask_array< _Tp > &  __x)
inline

Definition at line 1521 of file _valarray.h.

1522 : _M_mask(__x._M_mask), _M_array(__x._M_array)
1523 {}
_Valarray_bool _M_mask
Definition: _valarray.h:1531
valarray< _Tp > & _M_array
Definition: _valarray.h:1532

◆ ~mask_array()

template<class _Tp >
mask_array< _Tp >::~mask_array ( )
inline

Definition at line 1525 of file _valarray.h.

1525{}

◆ mask_array() [2/3]

template<class _Tp >
mask_array< _Tp >::mask_array ( const _Valarray_bool __mask,
valarray< _Tp > &  __array 
)
inlineprivate

Definition at line 1528 of file _valarray.h.

1529 : _M_mask(__mask), _M_array(__array)
1530 {}

◆ mask_array() [3/3]

template<class _Tp >
mask_array< _Tp >::mask_array ( )
private

Member Function Documentation

◆ _M_num_true()

template<class _Tp >
size_t mask_array< _Tp >::_M_num_true ( ) const
inline

Definition at line 1513 of file _valarray.h.

1513 {
1514 size_t __result = 0;
1515 for (size_t __i = 0; __i < _M_mask.size(); ++__i)
1516 if (_M_mask[__i]) ++__result;
1517 return __result;
1518 }
size_t size() const
Definition: _valarray.h:164

◆ operator%=()

template<class _Tp >
void mask_array< _Tp >::operator%= ( const valarray< value_type > &  __x) const
inline

Definition at line 1459 of file _valarray.h.

1459 {
1460 size_t __idx = 0;
1461 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1462 if (_M_mask[__i]) _M_array[__i] %= __x[__idx++];
1463 }

◆ operator&=()

template<class _Tp >
void mask_array< _Tp >::operator&= ( const valarray< value_type > &  __x) const
inline

Definition at line 1483 of file _valarray.h.

1483 {
1484 size_t __idx = 0;
1485 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1486 if (_M_mask[__i]) _M_array[__i] &= __x[__idx++];
1487 }

◆ operator*=()

template<class _Tp >
void mask_array< _Tp >::operator*= ( const valarray< value_type > &  __x) const
inline

Definition at line 1447 of file _valarray.h.

1447 {
1448 size_t __idx = 0;
1449 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1450 if (_M_mask[__i]) _M_array[__i] *= __x[__idx++];
1451 }

◆ operator+=()

template<class _Tp >
void mask_array< _Tp >::operator+= ( const valarray< value_type > &  __x) const
inline

Definition at line 1465 of file _valarray.h.

1465 {
1466 size_t __idx = 0;
1467 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1468 if (_M_mask[__i]) _M_array[__i] += __x[__idx++];
1469 }

◆ operator-=()

template<class _Tp >
void mask_array< _Tp >::operator-= ( const valarray< value_type > &  __x) const
inline

Definition at line 1471 of file _valarray.h.

1471 {
1472 size_t __idx = 0;
1473 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1474 if (_M_mask[__i]) _M_array[__i] -= __x[__idx++];
1475 }

◆ operator/=()

template<class _Tp >
void mask_array< _Tp >::operator/= ( const valarray< value_type > &  __x) const
inline

Definition at line 1453 of file _valarray.h.

1453 {
1454 size_t __idx = 0;
1455 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1456 if (_M_mask[__i]) _M_array[__i] /= __x[__idx++];
1457 }

◆ operator<<=()

template<class _Tp >
void mask_array< _Tp >::operator<<= ( const valarray< value_type > &  __x) const
inline

Definition at line 1495 of file _valarray.h.

1495 {
1496 size_t __idx = 0;
1497 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1498 if (_M_mask[__i]) _M_array[__i] <<= __x[__idx++];
1499 }

◆ operator=() [1/3]

template<class _Tp >
void mask_array< _Tp >::operator= ( const mask_array< _Tp > &  )
private

◆ operator=() [2/3]

template<class _Tp >
void mask_array< _Tp >::operator= ( const valarray< value_type > &  __x) const
inline

Definition at line 1441 of file _valarray.h.

1441 {
1442 size_t __idx = 0;
1443 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1444 if (_M_mask[__i]) _M_array[__i] = __x[__idx++];
1445 }

◆ operator=() [3/3]

template<class _Tp >
void mask_array< _Tp >::operator= ( const value_type __c) const
inline

Definition at line 1507 of file _valarray.h.

1507 {
1508 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1509 if (_M_mask[__i]) _M_array[__i] = __c;
1510 }
#define __c
Definition: schilyio.h:209

◆ operator>>=()

template<class _Tp >
void mask_array< _Tp >::operator>>= ( const valarray< value_type > &  __x) const
inline

Definition at line 1501 of file _valarray.h.

1501 {
1502 size_t __idx = 0;
1503 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1504 if (_M_mask[__i]) _M_array[__i] >>= __x[__idx++];
1505 }

◆ operator^=()

template<class _Tp >
void mask_array< _Tp >::operator^= ( const valarray< value_type > &  __x) const
inline

Definition at line 1477 of file _valarray.h.

1477 {
1478 size_t __idx = 0;
1479 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1480 if (_M_mask[__i]) _M_array[__i] ^= __x[__idx++];
1481 }

◆ operator|=()

template<class _Tp >
void mask_array< _Tp >::operator|= ( const valarray< value_type > &  __x) const
inline

Definition at line 1489 of file _valarray.h.

1489 {
1490 size_t __idx = 0;
1491 for (size_t __i = 0; __i < _M_array.size(); ++__i)
1492 if (_M_mask[__i]) _M_array[__i] |= __x[__idx++];
1493 }

Friends And Related Function Documentation

◆ valarray< _Tp >

template<class _Tp >
friend class valarray< _Tp >
friend

Definition at line 1411 of file _valarray.h.

Member Data Documentation

◆ _M_array

◆ _M_mask


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