MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / compare

Method compare

JSAT/test/jsat/utils/IndexTableTest.java:81–85  ·  view source on GitHub ↗
(Double o1, Double o2)

Source from the content-addressed store, hash-verified

79 IndexTable idt = new IndexTable(list, new Comparator<Double>() {
80
81 @Override
82 public int compare(Double o1, Double o2)
83 {
84 return -o1.compareTo(o2);
85 }
86 });
87 for(int i = 0; i < idt.length()-1; i++)
88 assertTrue(list.get(idt.index(i)).compareTo(list.get(idt.index(i+1))) >= 0);

Callers

nothing calls this directly

Calls 1

compareToMethod · 0.45

Tested by

no test coverage detected