What happens?
Functions that take an igraphHRG object do not check that their input is indeed an igraphHRG. This can lead to crashes or worse.
To Reproduce
> hrg_tree(make_ring(5))
Error in .subscript.2ary(x, i, , drop = drop) : subscript out of bounds
> hrg_tree(123)
IGRAPH 2d6cb1e D--- 3 2 --
+ attr: probability (v/n)
+ edges from 2d6cb1e:
[1] 3->1 3->1
(wrong output, and out-of-bounds memory access)
(typically crashes)
> sample_hrg(make_ring(5))
Error in .subscript.2ary(x, i, , drop = drop) : subscript out of bounds
What happens?
Functions that take an
igraphHRGobject do not check that their input is indeed anigraphHRG. This can lead to crashes or worse.To Reproduce
(wrong output, and out-of-bounds memory access)
(typically crashes)