default_comparator

class default_comparator#(type T =  int) extends comparator#(T)

singleton Provides the default strategies to compare objects.

Parameter

Toptional The type of an object to be compared.  The default is int.
Summary
default_comparatorsingleton Provides the default strategies to compare objects.
Functions
ltvirtual Returns 1 if x is less than y.
gtvirtual Returns 1 if x is greater than y.

Functions

lt

virtual function bit lt(x,
y)

virtual Returns 1 if x is less than y.  Uses the binary relational operator (<) to compare the objects.

Arguments

xAn input of type T.
yAnother input of type T.

Returns

The value of x < y.

gt

virtual function bit gt(x,
y)

virtual Returns 1 if x is greater than y.  Uses the binary relational operator (>) to compare the objects.

Arguments

xAn input of type T.
yAnother input of type T.

Returns

The value of x > y.

class default_comparator#(type T =  int) extends comparator#(T)
singleton Provides the default strategies to compare objects.
virtual function bit lt(x,
y)
virtual Returns 1 if x is less than y.
virtual function bit gt(x,
y)
virtual Returns 1 if x is greater than y.