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

resolving boundary cases (see #20) #25

Closed schochastics closed 2 years ago

schochastics commented 2 years ago

Hi!

Long time no love for this package by me ;-). Just had a look at the boundary case issue and I think I could resolve it with a simple check for n<2 for all three formats.

rgraph6::adjacency_from_text(c("?","@","A?"))
#> [[1]]
#> <0 x 0 matrix>
#> 
#> [[2]]
#>      [,1]
#> [1,]    0
#> 
#> [[3]]
#>      [,1] [,2]
#> [1,]    0    0
#> [2,]    0    0

Created on 2022-01-12 by the reprex package (v2.0.1)

mbojan commented 2 years ago

Your love is much appreciated! :) I already started addressing #20 on the mbojan/i20-border-cases branch (including tests etc.). Can you please port your fixes there and open a new PR?

schochastics commented 2 years ago

sure, i close this one then

mbojan commented 2 years ago

Thanks.