casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casacore::LELArrayBase Class Reference

Base class for LELArray holding the mask. More...

#include <LELArrayBase.h>

Inheritance diagram for casacore::LELArrayBase:
casacore::LELArray< T > casacore::LELArray< Bool > casacore::LELArrayRef< T >

Public Member Functions

 LELArrayBase ()
 Default constructor sets to mask all true. More...
 
 LELArrayBase (const Array< Bool > &mask)
 Constructor takes mask. More...
 
 LELArrayBase (const LELArrayBase &other)
 Copy constructor (reference semantics). More...
 
 ~LELArrayBase ()
 
LELArrayBaseoperator= (const LELArrayBase &other)
 Assignment (reference semantics). More...
 
Bool isMasked () const
 Does the value have a mask? More...
 
const Array< Bool > & mask () const
 Get mask. More...
 
Array< Bool > & mask ()
 
void removeMask ()
 Remove the mask. More...
 
void setMask (const Array< Bool > &other)
 Set the mask from given array (takes reference). More...
 
void setMask (const LELArrayBase &other)
 Set the mask from the mask of the other value. More...
 
void setMask (Array< Bool > &other)
 Set the mask from given array (takes reference). More...
 
void setMask (const LELArrayBase &left, const LELArrayBase &right)
 Set the mask by combining the masks of both values. More...
 
void combineMask (const LELArrayBase &other)
 Combine the mask of this and the other value (by anding them). More...
 
void combineMask (const Array< Bool > &mask)
 
void combineOrAnd (Bool desiredValue, const Array< Bool > &value)
 Combine the mask with the given value in case of an OR or AND. More...
 
void combineOrAnd (Bool desiredValue, Array< Bool > &value, const Array< Bool > &temp)
 Combine for two arrays taking the true/false array values into account. More...
 
void combineOrAnd (Bool desiredValue, Array< Bool > &value, const Array< Bool > &temp, const Array< Bool > &tempMask)
 Combine for two arrays taking the true/false array values and mask into account. More...
 

Private Attributes

Array< Bool > * itsMaskPtr
 

Detailed Description

Base class for LELArray holding the mask.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Synopsis

This LEL class holds an array with a mask. The mask can be a single Bool valid for all elements of the array. Otherwise it is a full mask with the same shape as the array.

Motivation

It maskes it possible to handle an array with its mask as a single object.

Definition at line 62 of file LELArrayBase.h.

Constructor & Destructor Documentation

casacore::LELArrayBase::LELArrayBase ( )
inline

Default constructor sets to mask all true.

Definition at line 66 of file LELArrayBase.h.

casacore::LELArrayBase::LELArrayBase ( const Array< Bool > &  mask)
inline

Constructor takes mask.

Definition at line 70 of file LELArrayBase.h.

casacore::LELArrayBase::LELArrayBase ( const LELArrayBase other)

Copy constructor (reference semantics).

casacore::LELArrayBase::~LELArrayBase ( )

Member Function Documentation

void casacore::LELArrayBase::combineMask ( const LELArrayBase other)
inline

Combine the mask of this and the other value (by anding them).

Definition at line 111 of file LELArrayBase.h.

References isMasked(), and mask().

Referenced by setMask().

void casacore::LELArrayBase::combineMask ( const Array< Bool > &  mask)
void casacore::LELArrayBase::combineOrAnd ( Bool  desiredValue,
const Array< Bool > &  value 
)

Combine the mask with the given value in case of an OR or AND.

It means the mask is set to true if value is desiredValue (which should be True for OR and False for AND).

Combine with a single scalar value for which the mask is false.

void casacore::LELArrayBase::combineOrAnd ( Bool  desiredValue,
Array< Bool > &  value,
const Array< Bool > &  temp 
)

Combine for two arrays taking the true/false array values into account.

The mask and value are set to desiredValue if the temp value is desiredValue.

void casacore::LELArrayBase::combineOrAnd ( Bool  desiredValue,
Array< Bool > &  value,
const Array< Bool > &  temp,
const Array< Bool > &  tempMask 
)

Combine for two arrays taking the true/false array values and mask into account.

The mask and value are set to desiredValue if the temp value is desiredValue and its temp mask it true. The mask is set to false if the temp mask is False.

Bool casacore::LELArrayBase::isMasked ( ) const
inline

Does the value have a mask?

Definition at line 82 of file LELArrayBase.h.

References itsMaskPtr.

Referenced by combineMask().

const Array<Bool>& casacore::LELArrayBase::mask ( ) const
inline

Get mask.

Definition at line 87 of file LELArrayBase.h.

References itsMaskPtr.

Referenced by combineMask().

Array<Bool>& casacore::LELArrayBase::mask ( )
inline

Definition at line 89 of file LELArrayBase.h.

References itsMaskPtr.

LELArrayBase& casacore::LELArrayBase::operator= ( const LELArrayBase other)

Assignment (reference semantics).

void casacore::LELArrayBase::removeMask ( )

Remove the mask.

void casacore::LELArrayBase::setMask ( const Array< Bool > &  other)

Set the mask from given array (takes reference).

Referenced by setMask().

void casacore::LELArrayBase::setMask ( const LELArrayBase other)

Set the mask from the mask of the other value.

void casacore::LELArrayBase::setMask ( Array< Bool > &  other)

Set the mask from given array (takes reference).

void casacore::LELArrayBase::setMask ( const LELArrayBase left,
const LELArrayBase right 
)
inline

Set the mask by combining the masks of both values.

Definition at line 106 of file LELArrayBase.h.

References combineMask(), and setMask().

Member Data Documentation

Array<Bool>* casacore::LELArrayBase::itsMaskPtr
private

Definition at line 138 of file LELArrayBase.h.

Referenced by isMasked(), and mask().


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