Values which have type INTEGER in functions.yaml should be handled as type numeric, and not type integer, in R. This is so that we can support values greater than $2^{31}-1$.
This change needs to be done in:
I have already updated most of the hand-written code where possible, but I did not add overflow checks for the double -> igraph_integer_t conversion. This should be done as well, as the last step.
Values which have type$2^{31}-1$ .
INTEGERin functions.yaml should be handled as typenumeric, and not typeinteger, in R. This is so that we can support values greater thanThis change needs to be done in:
as.numericinstead ofas.integerREAL(i.e.doubletype) instead ofINTEGER, then converted toigraph_integer_tdoubletoigraph_integer_t, we need to check that the following holds and throw an error otherwise:igraph_integer_t, i.e.IGRAPH_INTEGER_MIN <= value && value <= IGRAPH_INTEGER_MAX.doubleto start with. Check that the value is no greater thanIGRAPH_MAX_EXACT_REAL. This constant is currently internal, found incigraph/src/math/safe_intop.h.rinterface_extra.c. Pay attention that for some functions, only the R code, or only the C code is auto-generated, but not both. Thus the update needs to be done simultaneously for the auto-generated code and the hand-written one.I have already updated most of the hand-written code where possible, but I did not add overflow checks for the
double->igraph_integer_tconversion. This should be done as well, as the last step.