Skip to content

Commit

Permalink
Degree-conditioned proposals are now exported in inst/include/ .
Browse files Browse the repository at this point in the history
krivit committed Dec 2, 2024
1 parent ff7c70c commit f2b8fe2
Showing 3 changed files with 60 additions and 2 deletions.
19 changes: 19 additions & 0 deletions inst/include/ergm_MHproposals_degree.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* File inst/include/ergm_MHproposals_degree.h in package ergm, part of the
* Statnet suite of packages for network analysis, https://statnet.org .
*
* This software is distributed under the GPL-3 license. It is free,
* open source, and has the attribution requirements (GPL Section 7) at
* https://statnet.org/attribution .
*
* Copyright 2003-2024 Statnet Commons
*/
#include "ergm_MHproposal.h"
#include "ergm_changestat.h"

MH_P_FN(MH_CondDegreeTetrad);
MH_P_FN(MH_CondDegreeHexad);
MH_P_FN(MH_CondDegree);
MH_P_FN(MH_CondOutDegree);
MH_P_FN(MH_CondInDegree);
MH_P_FN(MH_CondB1Degree);
MH_P_FN(MH_CondB2Degree);
40 changes: 40 additions & 0 deletions inst/include/ergm_stubs.c
Original file line number Diff line number Diff line change
@@ -318,6 +318,46 @@ if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MHProposalD
fun(MHp,nwp);
}

#define STUBFILE
#include <stddef.h>
#include <R_ext/Rdynload.h>
#include "ergm_MHproposals_degree.h"
void MH_CondDegreeTetrad(MHProposal *MHp, Network *nwp){
static void (*fun)(MHProposal *,Network *) = NULL;
if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MH_CondDegreeTetrad", "ergm", NULL);
fun(MHp,nwp);
}
void MH_CondDegreeHexad(MHProposal *MHp, Network *nwp){
static void (*fun)(MHProposal *,Network *) = NULL;
if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MH_CondDegreeHexad", "ergm", NULL);
fun(MHp,nwp);
}
void MH_CondDegree(MHProposal *MHp, Network *nwp){
static void (*fun)(MHProposal *,Network *) = NULL;
if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MH_CondDegree", "ergm", NULL);
fun(MHp,nwp);
}
void MH_CondOutDegree(MHProposal *MHp, Network *nwp){
static void (*fun)(MHProposal *,Network *) = NULL;
if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MH_CondOutDegree", "ergm", NULL);
fun(MHp,nwp);
}
void MH_CondInDegree(MHProposal *MHp, Network *nwp){
static void (*fun)(MHProposal *,Network *) = NULL;
if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MH_CondInDegree", "ergm", NULL);
fun(MHp,nwp);
}
void MH_CondB1Degree(MHProposal *MHp, Network *nwp){
static void (*fun)(MHProposal *,Network *) = NULL;
if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MH_CondB1Degree", "ergm", NULL);
fun(MHp,nwp);
}
void MH_CondB2Degree(MHProposal *MHp, Network *nwp){
static void (*fun)(MHProposal *,Network *) = NULL;
if(fun==NULL) fun = (void (*)(MHProposal *,Network *)) R_FindSymbol("MH_CondB2Degree", "ergm", NULL);
fun(MHp,nwp);
}

#define STUBFILE
#include <stddef.h>
#include <R_ext/Rdynload.h>
3 changes: 1 addition & 2 deletions src/MHproposals_degree.c
Original file line number Diff line number Diff line change
@@ -7,8 +7,7 @@
*
* Copyright 2003-2024 Statnet Commons
*/
#include "ergm_MHproposal.h"
#include "ergm_changestat.h"
#include "ergm_MHproposals_degree.h"

/*
void MH_CondDegreeTetrad

0 comments on commit f2b8fe2

Please sign in to comment.