https://123dok.net/document/y8g0d60z-bootstrap-and-permutation-tests-of-independence-for-point-processes.html