blockmodel: fix nested sampling of filtered graphs

This fixes issue #322
6 jobs for master in 4416 minutes and 31 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Test
failed job_clang_amd64 #1913
amd64

12:43:49

failed job_clang_amd64_nosh #1917
amd64

12:22:16

failed job_clang_py2_amd64 #1915
amd64

11:59:57

failed job_gcc_amd64 #1912
amd64

11:20:24

failed job_gcc_amd64_nosh #1916
amd64

13:00:47

failed job_gcc_py2_amd64 #1914
amd64

12:09:15

 
Name Stage Failure
failed
job_gcc_amd64 Test There is an unknown failure, please try again
    niter:    66  count:    7  breaks:  1  min_S: 696.13574  max_S: 738.76499  S: 733.10628  ΔS:      26.4852  moves:    32 
niter: 67 count: 8 breaks: 1 min_S: 696.13574 max_S: 738.76499 S: 704.92700 ΔS: -28.1793 moves: 45
niter: 68 count: 9 breaks: 1 min_S: 696.13574 max_S: 738.76499 S: 723.55491 ΔS: 18.6279 moves: 41
niter: 69 count: 10 breaks: 2 min_S: 696.13574 max_S: 738.76499 S: 701.46860 ΔS: -22.0863 moves: 33
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::domain_error> >'
what(): Error in function boost::math::lgamma<long double>(long double): Evaluation of lgamma at a negative integer -612.
bash: line 54: 5999 Aborted (core dumped) python3 /usr/bin/sphinx-build -b doctest . build *.rst demos/inference/inference.rst

ERROR: Build failed: exit status 1
failed
job_clang_amd64 Test There is an unknown failure, please try again
Expected:
Model evidence for deg_corr = True: -594.637748079 (mean field), -756.951720315 (Bethe)
Model evidence for deg_corr = False: -606.269851822 (mean field), -680.353860482 (Bethe)
Got:
Model evidence for deg_corr = True: -559.534828657 (mean field), -859.643461191 (Bethe)
Model evidence for deg_corr = False: -584.002636799 (mean field), -704.902277759 (Bethe)
bash: line 54: 18432 Segmentation fault (core dumped) python3 /usr/bin/sphinx-build -b doctest . build *.rst demos/inference/inference.rst

ERROR: Build failed: exit status 1
failed
job_gcc_py2_amd64 Test There is an unknown failure, please try again
23 tests in 1 items.
23 passed and 0 failed.
Test passed.

Document: demos/inference/inference
-----------------------------------
bash: line 54: 5545 Segmentation fault (core dumped) python2 /usr/bin/sphinx-build2 -b doctest . build *.rst demos/inference/inference.rst

ERROR: Build failed: exit status 1
failed
job_clang_py2_amd64 Test There is an unknown failure, please try again
23 tests in 1 items.
23 passed and 0 failed.
Test passed.

Document: demos/inference/inference
-----------------------------------
bash: line 54: 13254 Segmentation fault (core dumped) python2 /usr/bin/sphinx-build2 -b doctest . build *.rst demos/inference/inference.rst

ERROR: Build failed: exit status 1
failed
job_gcc_amd64_nosh Test There is an unknown failure, please try again
Expected:
Model evidence for deg_corr = True: -594.637748079 (mean field), -756.951720315 (Bethe)
Model evidence for deg_corr = False: -606.269851822 (mean field), -680.353860482 (Bethe)
Got:
Model evidence for deg_corr = True: -559.534828657 (mean field), -859.643461191 (Bethe)
Model evidence for deg_corr = False: -584.002636799 (mean field), -704.902277759 (Bethe)
bash: line 54: 6389 Segmentation fault (core dumped) python3 /usr/bin/sphinx-build -b doctest . build *.rst demos/inference/inference.rst

ERROR: Build failed: exit status 1
failed
job_clang_amd64_nosh Test There is an unknown failure, please try again
        return self._h_sweep(lambda s, **a: s.mcmc_sweep(**a), c=c, **kwargs)
File "/var/lib/gitlab-runner/builds/c098b1de/5/count0/graph-tool/install/site-packages/graph_tool/inference/blockmodel.py", line 1157, in mcmc_sweep
dS, nmoves = self._mcmc_sweep_dispatch(mcmc_state)
File "/var/lib/gitlab-runner/builds/c098b1de/5/count0/graph-tool/install/site-packages/graph_tool/inference/blockmodel.py", line 1064, in _mcmc_sweep_dispatch
_get_rng())
RuntimeError: Error in function boost::math::lgamma<long double>(long double): Evaluation of lgamma at a negative integer -612.
bash: line 54: 14592 Segmentation fault (core dumped) python3 /usr/bin/sphinx-build -b doctest . build *.rst demos/inference/inference.rst

ERROR: Build failed: exit status 1