Compute minimum peak

1. apply pseudo code
2. create compute_map and node_mem in new method
So is should be:
```
if idx in dmap:
...
else:
...
assert len(i) == 1
i = i[0]
```