| 1 | vlib/datatypes/heap.v:16:15: error: cannot use `>` as `<=` operator method is not defined |
| 2 | 14 | mut child := heap.data.len - 1 |
| 3 | 15 | mut parent := heap.parent(child) |
| 4 | 16 | for heap.data[parent] > heap.data[child] { |
| 5 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 6 | 17 | heap.data[parent], heap.data[child] = heap.data[child], heap.data[parent] |
| 7 | 18 | child = parent |
| 8 | vlib/datatypes/heap.v:44:15: error: cannot use `>` as `<=` operator method is not defined |
| 9 | 42 | mut left := heap.left_child(parent) or { return item } |
| 10 | 43 | mut right := heap.right_child(parent) or { left } |
| 11 | 44 | for heap.data[parent] > heap.data[left] || heap.data[parent] > heap.data[right] { |
| 12 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 13 | 45 | // choose min for min heap |
| 14 | 46 | swap := if heap.data[left] <= heap.data[right] { left } else { right } |
| 15 | vlib/datatypes/heap.v:46:23: error: cannot use `<=` as `<` operator method is not defined |
| 16 | 44 | for heap.data[parent] > heap.data[left] || heap.data[parent] > heap.data[right] { |
| 17 | 45 | // choose min for min heap |
| 18 | 46 | swap := if heap.data[left] <= heap.data[right] { left } else { right } |
| 19 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 20 | 47 | heap.data[parent], heap.data[swap] = heap.data[swap], heap.data[parent] |
| 21 | 48 | parent = swap |
| 22 | |