I was using this nice library in my research when I happened to find that the function Graph::loadDirected will fall into a non-terminating loop when reading a file starts with a newline. This is due to the line 147 in graph.cpp, which will cause line 149 to peek forever if the first character it get from fin at line 141 is '\n'.
Even though the fix is rather easy, I reckon this is an unexpected behavior so I try to report it here. Maybe there can be a patch? :)
Hi @tadshi, great to hear that teexGraph is useful for your research. I did a little fix so that now it's possible to have files start with new lines (or in fact, "whitespace" in general). Happy coding!
Hello!
I was using this nice library in my research when I happened to find that the function
Graph::loadDirected
will fall into a non-terminating loop when reading a file starts with a newline. This is due to the line 147 in graph.cpp, which will cause line 149 to peek forever if the first character it get from fin at line 141 is '\n'.Even though the fix is rather easy, I reckon this is an unexpected behavior so I try to report it here. Maybe there can be a patch? :)