class pair_comparator#( type T = pair ) extends comparator#(T)
singleton Provides strategies to compare pairs.
| T | optional The type of a pair object to be compared. The default is pair (with its default parameters). |
| pair_comparator | singleton Provides strategies to compare pairs. |
| Types | |
| this_type | The shorthand of pair_comparator #(T). |
| Functions | |
| new | protected Creates a new comparator. |
| get_instance | static Returns the singleton instance of this comparator. |
| eq | virtual Returns 1 if two pairs are equal. |
| lt | virtual Returns 1 if x is less than y. |
typedef pair_comparator#( T ) this_type
The shorthand of pair_comparator #(T).
singleton Provides strategies to compare pairs.
class pair_comparator#( type T = pair ) extends comparator#(T)
Provides a pair that carries two values, which can be different types.
class pair#( type T1 = int, type T2 = T1 )
The shorthand of pair_comparator #(T).
typedef pair_comparator#( T ) this_type
protected Creates a new comparator.
protected function new()
static Returns the singleton instance of this comparator.
static function this_type get_instance()
virtual Returns 1 if two pairs are equal.
virtual function bit eq( T x, T y )
virtual Returns 1 if x is less than y.
virtual function bit lt( T x, T y )