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.
|
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.
|
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.
|
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.
|
Bool | QMakeBool (const LogicalArray &val) |
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:
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:
-
Quantum<T> == Quantum<T> or ==T
-
Quantum<T> != Quantum<T> or !=T
-
> < >= <= of Quantum<T> or T and Quantum<T>
-
near, nearAbs(Quantum<T> or T, Quantum<T> or T [, tolerance])
Motivation
To separate the logical operations from Quantum
To Do
-
Some inlining (did not work first go)
-
Recode with allEQ etc if part of library for all data types, and get rid of the special QMakeBool(), and the include LogiArrayFwd.h
Definition at line 111 of file QLogical.h.