Check motif estimation
Bug #362519 reported by
Gábor Csárdi
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Fix Released
|
High
|
Unassigned |
Bug Description
Continued from http://
Related branches
To post a comment you must log in.
I think this is due to the code around line 421 of motifs.c (as of 0.5.3):
if (level < size-1 &&
!igraph_ vector_ empty(& adjverts) &&
(cp==0 || RNG_UNIF01() > cp)) {
/* yes, step down */
...
but this means if the random number is low, then we go to "else", which might get rid of additional adjverts, rather than just the one in question. Should this be
if (level < size-1 &&
!igraph_ vector_ empty(& adjverts) ) { igraph_ vector_ pop_back( &adjverts) ; vector_ pop_back( &adjverts) ;
IGRAPH_ CHECK(igraph_ stack_push( &stack, neifather));
IGRAPH_ CHECK(igraph_ stack_push( &stack, nei));
IGRAPH_ CHECK(igraph_ stack_push( &stack, level+1));
IGRAPH_ CHECK(igraph_ vector_ push_back( &vids, nei));
/* yes, step down */
long int neifather=
long int nei=igraph_
if(cp==0 || RNG_UNIF01() > cp) {
...
instead?
-Eric