Ordinal Data - Comparison Operator (Order, Equality)

1 - About

A comparison operator is a class of operators that model:

A comparison operator test the order relationship between two operands and returns a Boolean.

The result of a comparison is a Boolean

3 - Usage

3.1 - Sort

Comparison Operator are tiddly coupled:

in order to sort data.

3.2 - Condition / Filter

Comparison Operator are used in predicate (condition) in order to filter

4 - Properties

4.1 - Order of precedence

order of precedence - All comparison operators have the same priority, which is lower than that of all operator mathematical operators

4.2 - Chain

Comparisons may be chained.

For example, a < b == c tests whether:

  • a < b
  • and moreover b == c

4.3 - Combination

Comparisons may be combined using the Boolean operators and and or to from a predicate (boolean expression)

5 - Relation

Comparison operator models two kind of relation:

Binary relation are used in many branches of mathematics to model this relation. See Logical Data Modeling - Binary Relation.

5.1 - Order

Order relation, including strict orders:

Operation Description
< strictly less than
<= less than or equal
> strictly greater than
>= greater than or equal
in check whether a value occurs in a list
not in check whether a value does not occur in a list

5.2 - Equivalence

6 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap