Skip to content

Commit f9463a7

Browse files
committed
Ported b*mindegree() terms changestats to the 4.0 API.
1 parent a24050c commit f9463a7

3 files changed

Lines changed: 27 additions & 62 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: ergm
2-
Version: 4.13.0-8031
2+
Version: 4.13.0-8032
33
Date: 2026-03-24
44
Title: Fit, Simulate and Diagnose Exponential-Family Models for Networks
55
Authors@R: c(

src/changestats.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,3 +3395,29 @@ C_CHANGESTAT_FN(c_ttriple) {
33953395
CHANGE_STAT[0] += edgemult * change;
33963396
}
33973397
}
3398+
3399+
3400+
/*****************
3401+
changestat: c_b1mindegree
3402+
*****************/
3403+
C_CHANGESTAT_FN(c_b1mindegree) {
3404+
int echange = edgestate ? -1 : 1;
3405+
Vertex b1deg = OUT_DEG[tail];
3406+
for(unsigned int j = 0; j < N_CHANGE_STATS; j++) {
3407+
Vertex d = INPUT_PARAM[j];
3408+
CHANGE_STAT[j] += (b1deg + echange >= d) - (b1deg >= d);
3409+
}
3410+
}
3411+
3412+
3413+
/*****************
3414+
changestat: c_b2mindegree
3415+
*****************/
3416+
C_CHANGESTAT_FN(c_b2mindegree) {
3417+
int echange = edgestate ? -1 : 1;
3418+
Vertex b2deg = IN_DEG[head];
3419+
for(unsigned int j = 0; j < N_CHANGE_STATS; j++) {
3420+
Vertex d = INPUT_PARAM[j];
3421+
CHANGE_STAT[j] += (b2deg + echange >= d) - (b2deg >= d);
3422+
}
3423+
}

src/changestats_internal.c

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)