Loading...
Searching...
No Matches
casacore::LELArrayBase Class Reference
lattices package (libcasa_lattices) » LEL_module » LEL_module_internal_classes

More...

`#include <LELArrayBase.h>`

## Public Member Functions

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

## 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 60 of file LELArrayBase.h.

## Constructor & Destructor Documentation

## LELArrayBase() [1/3]

casacore::LELArrayBase::LELArrayBase | ( |  | ) |

inline

Default constructor sets to mask all true.

Definition at line 64 of file LELArrayBase.h.

References itsMaskPtr.

Referenced by combineMask(), casacore::LELArray< T >::LELArray(), LELArrayBase(), operator=(), setMask(), and setMask().

## LELArrayBase() [2/3]

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

inline

Constructor takes mask.

Definition at line 68 of file LELArrayBase.h.

References itsMaskPtr, and mask().

## LELArrayBase() [3/3]

casacore::LELArrayBase::LELArrayBase | ( | const LELArrayBase & | other | ) |

Copy constructor (reference semantics).

References LELArrayBase().

## ~LELArrayBase()

casacore::LELArrayBase::~LELArrayBase | ( |  | ) |

## Member Function Documentation

## combineMask() [1/2]

void casacore::LELArrayBase::combineMask | ( | const Array< Bool > & | mask | ) |

References mask().

## combineMask() [2/2]

void casacore::LELArrayBase::combineMask | ( | const LELArrayBase & | other | ) |

inline

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

Definition at line 109 of file LELArrayBase.h.

References combineMask(), isMasked(), LELArrayBase(), and mask().

Referenced by combineMask(), and setMask().

## combineOrAnd() [1/3]

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.

References casacore::NewDelAllocator< T >::value.

## combineOrAnd() [2/3]

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.

References casacore::NewDelAllocator< T >::value.

## combineOrAnd() [3/3]

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.

References casacore::NewDelAllocator< T >::value.

## isMasked()

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

inline

Does the value have a mask?

Definition at line 80 of file LELArrayBase.h.

References itsMaskPtr.

Referenced by combineMask().

## mask() [1/2]

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

inline

Definition at line 87 of file LELArrayBase.h.

References itsMaskPtr.

## mask() [2/2]

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

inline

Get mask.

Definition at line 85 of file LELArrayBase.h.

References itsMaskPtr.

Referenced by combineMask(), combineMask(), casacore::LELArray< T >::LELArray(), and LELArrayBase().

## operator=()

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

Assignment (reference semantics).

References LELArrayBase().

## removeMask()

void casacore::LELArrayBase::removeMask | ( |  | ) |

Remove the mask.

## setMask() [1/4]

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

Set the mask from given array (takes reference).

## setMask() [2/4]

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

Set the mask from given array (takes reference).

Referenced by setMask().

## setMask() [3/4]

void casacore::LELArrayBase::setMask | ( | const LELArrayBase & | left,
|  | const LELArrayBase & | right )

inline

Set the mask by combining the masks of both values.

Definition at line 104 of file LELArrayBase.h.

References combineMask(), LELArrayBase(), and setMask().

## setMask() [4/4]

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

Set the mask from the mask of the other value.

References LELArrayBase().

## Member Data Documentation

## itsMaskPtr

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

private

Definition at line 136 of file LELArrayBase.h.

Referenced by isMasked(), LELArrayBase(), LELArrayBase(), mask(), and mask().

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

- lattices/LEL/LELArrayBase.h