public static enum SparseVector.Entry.Comparator extends Enum<SparseVector.Entry.Comparator> implements Comparator<SparseVector.Entry>
Comparator sorts the matrix coordinates first from top
to bottom (rows), and then from left to right (columns).| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(SparseVector.Entry o1,
SparseVector.Entry o2) |
static SparseVector.Entry.Comparator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SparseVector.Entry.Comparator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic static final SparseVector.Entry.Comparator INSTANCE
public static SparseVector.Entry.Comparator[] values()
for (SparseVector.Entry.Comparator c : SparseVector.Entry.Comparator.values()) System.out.println(c);
public static SparseVector.Entry.Comparator valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int compare(SparseVector.Entry o1, SparseVector.Entry o2)
compare in interface Comparator<SparseVector.Entry>Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.