vault backup: 2023-11-06 23:08:39
This commit is contained in:
parent
e3ea54af6c
commit
07b138fe37
3 changed files with 17 additions and 11 deletions
|
@ -37,11 +37,20 @@ sig Hash {}
|
|||
// respective commands to check how many
|
||||
// points you have.
|
||||
|
||||
|
||||
pred insert[n : Node] {
|
||||
some k: Hash
|
||||
//if hash empty -> node to head of bucket
|
||||
//else
|
||||
//if hash empty -> node to head of bucket
|
||||
n.key.hash not in Hash implies
|
||||
(
|
||||
lone b:Bucket | b.head = node implies b.head' = n
|
||||
)
|
||||
//if hash empty -> bucket of desired hash, add to next
|
||||
n.key.hash in Hash implies
|
||||
(
|
||||
lone b: Bucket | b.head.key.hash = n.key.hash | b.head.*prox =
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue