casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
casacore::QLogical_global_functions_Quantum_logical_operations Struct Reference

Logical operations for the Quantum class. More...

#include <QLogical.h>

Public Member Functions

template<class Qtype >
Bool operator== (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 Straight comparisons: unequal if non-conforming units or different values if units made equal. More...
 
template<class Qtype >
Bool operator== (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool operator== (const Qtype &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator!= (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator!= (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool operator!= (const Qtype &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool near (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 Near-ness tests: unequal if non-conforming units. More...
 
template<class Qtype >
Bool near (const Quantum< Qtype > &left, const Quantum< Qtype > &other, Double tol)
 
template<class Qtype >
Bool near (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool near (const Quantum< Qtype > &left, const Qtype &other, Double tol)
 
template<class Qtype >
Bool near (const Qtype &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool near (const Qtype &left, const Quantum< Qtype > &other, Double tol)
 
template<class Qtype >
Bool nearAbs (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool nearAbs (const Quantum< Qtype > &left, const Quantum< Qtype > &other, Double tol)
 
template<class Qtype >
Bool nearAbs (const Quantum< Qtype > &left, const Quantum< Qtype > &other, const Quantum< Qtype > &tol)
 
template<class Qtype >
Bool nearAbs (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool nearAbs (const Quantum< Qtype > &left, const Qtype &other, Double tol)
 
template<class Qtype >
Bool nearAbs (const Qtype &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool nearAbs (const Qtype &left, const Quantum< Qtype > &other, Double tol)
 
template<class Qtype >
Bool operator< (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 Comparisons. More...
 
template<class Qtype >
Bool operator< (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool operator< (const Qtype &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator> (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator> (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool operator> (const Qtype &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator<= (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator<= (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool operator<= (const Qtype &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator>= (const Quantum< Qtype > &left, const Quantum< Qtype > &other)
 
template<class Qtype >
Bool operator>= (const Quantum< Qtype > &left, const Qtype &other)
 
template<class Qtype >
Bool operator>= (const Qtype &left, const Quantum< Qtype > &other)
 
Bool QMakeBool (Int val)
 Special make Bool routines to cater for array comparisons. More...
 
Bool QMakeBool (const LogicalArray &val)
 

Detailed Description

Logical operations for the Quantum class.

Intended use:

Public interface

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tQuantum

Prerequisite

Etymology

QLogical derived from Quantum logical functions

Synopsis

Quantities are values with a unit. Their basic specification can be one of two forms:

Quantity(Double value, String unit); // or: Unit unit
Quantum<Type> (Type value, String unit) // or: Unit unit

A unit is a string of known unit fields separated by 'space' or '.' (to indicate multiply) or '/' (to indicate divide). See the Unit class for details. Example: km/s/(Mpc.s)2 is identical to km.s-1.Mpc-2.s-2

This file defines the logical operations that can be done on Quantum<T>.

They can be subdivided into various groupings:

The operations defined are:

Motivation

To separate the logical operations from Quantum

To Do

Definition at line 111 of file QLogical.h.

Member Function Documentation

template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::near ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)

Near-ness tests: unequal if non-conforming units.

In other cases the tolerance is in the units of the first argument, with the second argument converted, if necessary, to the same units as the first. Note (SUN?) compiler does not accept default arguments in template functions

template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::near ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other,
Double  tol 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::near ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::near ( const Quantum< Qtype > &  left,
const Qtype &  other,
Double  tol 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::near ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::near ( const Qtype &  left,
const Quantum< Qtype > &  other,
Double  tol 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::nearAbs ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::nearAbs ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other,
Double  tol 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::nearAbs ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other,
const Quantum< Qtype > &  tol 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::nearAbs ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::nearAbs ( const Quantum< Qtype > &  left,
const Qtype &  other,
Double  tol 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::nearAbs ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::nearAbs ( const Qtype &  left,
const Quantum< Qtype > &  other,
Double  tol 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator!= ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator!= ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator!= ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator< ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)

Comparisons.

The comparisons are done on values at equal units with transparent conversion if necessary.

Thrown Exceptions

template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator< ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator< ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator<= ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator<= ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator<= ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator== ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)

Straight comparisons: unequal if non-conforming units or different values if units made equal.

I.e. 1in != 1m , 1in != 1s , 36in == 1yd ./

template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator== ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator== ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator> ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator> ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator> ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator>= ( const Quantum< Qtype > &  left,
const Quantum< Qtype > &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator>= ( const Quantum< Qtype > &  left,
const Qtype &  other 
)
template<class Qtype >
Bool casacore::QLogical_global_functions_Quantum_logical_operations::operator>= ( const Qtype &  left,
const Quantum< Qtype > &  other 
)
Bool casacore::QLogical_global_functions_Quantum_logical_operations::QMakeBool ( Int  val)

Special make Bool routines to cater for array comparisons.

Bool casacore::QLogical_global_functions_Quantum_logical_operations::QMakeBool ( const LogicalArray &  val)

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