mbojan / rgraph6

Encoding graphs in graph6, sparse6, and digraph6 formats
https://mbojan.github.io/rgraph6/
GNU General Public License v3.0
12 stars 3 forks source link

fN() trips on numbers beyond integer range #12

Closed mbojan closed 4 years ago

mbojan commented 4 years ago

The following test based on http://users.cecs.anu.edu.au/~bdm/data/formats.txt (now turned-off) fails:

for(n in round(seq(258048, 68719476735, length=10))) {
  test_that(
    paste0("fN(n) for n=", n), {
      r <- fN(n)
      expect_length(r, 8)
      expect_true(all(unlist(r) >= 63))
      expect_true(all(unlist(r) <= 126))
    })
}

Apparently goes beyond the integer range. Graphs of size up to 128 do work though.

schochastics commented 4 years ago

I'll have a look at the c++ code. Should be fixable with some "long long" formats. Worst case I have some d2b code that uses string representation

Edit: Ok fixed it in my fork. I'll put it in the next pull request later today