diff --git a/src/MHproposals.c b/src/MHproposals.c index 9a73f33a3..f81deb711 100644 --- a/src/MHproposals.c +++ b/src/MHproposals.c @@ -26,7 +26,7 @@ Default MH algorithm with dyad generator API. *********************/ MH_I_FN(Mi_randomtoggle){ - INIT_DYADGEN_AND_DEGREE_BOUND; + INIT_DYADGEN_AND_DEGREE_BOUND(FALSE); MHp->ntoggles = storage->gen->ndyads!=0 ? 1 : MH_FAILED; } @@ -55,7 +55,7 @@ MH_F_FN(Mf_randomtoggle){ ***********************/ MH_I_FN(Mi_TNT){ - INIT_DYADGEN_AND_DEGREE_BOUND; + INIT_DYADGEN_AND_DEGREE_BOUND(TRUE); MHp->ntoggles = storage->gen->ndyads!=0 ? 1 : MH_FAILED; } @@ -493,7 +493,7 @@ MH_F_FN(Mf_TNT10){ datasets are sparse, so this is not likely to be an issue. *********************/ MH_I_FN(Mi_ConstantEdges){ - INIT_DYADGEN_AND_DEGREE_BOUND; + INIT_DYADGEN_AND_DEGREE_BOUND(TRUE); Edge nedges = DyadGenEdgecount(storage->gen); MHp->ntoggles = nedges>0 && nedgesgen->ndyads && storage->gen->ndyads>=2 ? 2 : MH_FAILED; } diff --git a/src/MHproposals.h b/src/MHproposals.h index 4b3fedc9a..25ce69cac 100644 --- a/src/MHproposals.h +++ b/src/MHproposals.h @@ -16,9 +16,9 @@ typedef struct{DyadGen *gen; DegreeBound *bd;} StoreDyadGenAndDegreeBound; -#define INIT_DYADGEN_AND_DEGREE_BOUND \ +#define INIT_DYADGEN_AND_DEGREE_BOUND(el) \ ALLOC_STORAGE(1, StoreDyadGenAndDegreeBound, storage); \ - storage->gen = DyadGenInitializeR(MHp->R, nwp, TRUE); \ + storage->gen = DyadGenInitializeR(MHp->R, nwp, el); \ storage->bd = DegreeBoundInitializeR(MHp->R, nwp); #define DESTROY_DYADGEN_AND_DEGREE_BOUND \