MCPcopy Create free account
hub / github.com/bwaldvogel/liblinear-java / push

Method push

src/main/java/de/bwaldvogel/liblinear/Heap.java:32–45  ·  view source on GitHub ↗
(Feature node)

Source from the content-addressed store, hash-verified

30 }
31
32 void push(Feature node) {
33 a[size] = node;
34 size++;
35 int i = size - 1;
36 while (i > 0) {
37 int p = (i - 1) / 2;
38 if (cmp(a[p], a[i])) {
39 Linear.swap(a, i, p);
40 i = p;
41 } else {
42 break;
43 }
44 }
45 }
46
47 void pop() {
48 size--;

Callers 1

solve_oneclass_svmMethod · 0.95

Calls 2

cmpMethod · 0.95
swapMethod · 0.95

Tested by

no test coverage detected