Closed axkr closed 1 year ago
A Comparable interface should be established for a "canonical order" for more FieldElement derived classes.
Comparable
FieldElement
The Binary64method already has a Comparable interface:
Binary64
For the Complexclass I would like to suggest:
Complex
public int compareTo(final Complex o) { int c = Double.compare(this.getReal(), o.getReal()); if (c != 0) { return c; } return Double.compare(this.getImaginary(), o.getImaginary()); }
A
Comparable
interface should be established for a "canonical order" for moreFieldElement
derived classes.The
Binary64
method already has aComparable
interface:For the
Complex
class I would like to suggest: