Functions is a required type parameter that must be a struct implementing the methods defined by Functions.
| 67 | // Functions is a required type parameter that must be a struct implementing |
| 68 | // the methods defined by Functions. |
| 69 | type Functions interface { |
| 70 | // MinKey returns the minimum allowed key. |
| 71 | MinKey() Key |
| 72 | |
| 73 | // MaxKey returns the maximum allowed key + 1. |
| 74 | MaxKey() Key |
| 75 | |
| 76 | // ClearValue deinitializes the given value. (For example, if Value is a |
| 77 | // pointer or interface type, ClearValue should set it to nil.) |
| 78 | ClearValue(*Value) |
| 79 | |
| 80 | // Merge attempts to merge the values corresponding to two consecutive |
| 81 | // segments. If successful, Merge returns (merged value, true). Otherwise, |
| 82 | // it returns (unspecified, false). |
| 83 | // |
| 84 | // Preconditions: r1.End == r2.Start. |
| 85 | // |
| 86 | // Postconditions: If merging succeeds, val1 and val2 are invalidated. |
| 87 | Merge(r1 Range, val1 Value, r2 Range, val2 Value) (Value, bool) |
| 88 | |
| 89 | // Split splits a segment's value at a key within its range, such that the |
| 90 | // first returned value corresponds to the range [r.Start, split) and the |
| 91 | // second returned value corresponds to the range [split, r.End). |
| 92 | // |
| 93 | // Preconditions: r.Start < split < r.End. |
| 94 | // |
| 95 | // Postconditions: The original value val is invalidated. |
| 96 | Split(r Range, val Value, split Key) (Value, Value) |
| 97 | } |
| 98 | |
| 99 | const ( |
| 100 | // minDegree is the minimum degree of an internal node in a Set B-tree. |
no outgoing calls
no test coverage detected
searching dependent graphs…