Module cmp

Source

Modules§

partial_order
This module represents a weak partial order, meaning not all students are comparable, and some can be equivalent. This implementation illustrates a workaround to guarantee global reflexivity over the floating point “gotcha” by performing a memory address comparison. In this way, Students are reflexive, even if they have NaN grades, but not comparable if two students have NaN grades.
total_order
This module represents a strict total order implementation
total_preorder
This module represents a total preorder implementation

Functions§

okie
ptr_equality
Compares pointers
sortt
value_equality
Compares values