Giter Site home page Giter Site logo

Comments (5)

ZigRazor avatar ZigRazor commented on May 25, 2024

This could be a bug, but we should try to execute it on other platform or with other compiler.
In the meantime if you are able to find some other info, and why this happens, could be a valuable help!
Thank you in advance

from cxxgraph.

ZigRazor avatar ZigRazor commented on May 25, 2024

Another help could be write tests for some other cases where this bug exist.

from cxxgraph.

edogawashinichi avatar edogawashinichi commented on May 25, 2024

This could be a bug, but we should try to execute it on other platform or with other compiler. In the meantime if you are able to find some other info, and why this happens, could be a valuable help! Thank you in advance

Sure, I shall try to fix this bug, since the reason why this happens is possibly figured out by the debug information.

from cxxgraph.

edogawashinichi avatar edogawashinichi commented on May 25, 2024

Another help could be write tests for some other cases where this bug exist.

Considering different platforms or compilers, the order of cachedAdjMatrix and other data stored and visited may differ, I conjecture, which I have no evidence, due to constraint on machines at hand.

A direct suggestion would be to provide a random implementation on the order of graph data stored or visited, to generate a variety of unit test cases, which are equivalent to the cases already exists, since our algorithms are independent of the order of data.

And of course new tests are still needed.

from cxxgraph.

edogawashinichi avatar edogawashinichi commented on May 25, 2024

The following is to explain in detail why the current master(commit 994e9b9) failed TarjanTest.test_4 on my environment.

For convenience we copy the case here.
image

According to the debug information, the list of (node, its discoveryTime) is:
[(1,0),(2,1),(5,2),(6,3),(7,4),(11,5),(10,6),(9,7),(8,8),(14,9),(13,10),(15,11),(12,12),(18,13),(17,14),(16,15),(3,16),(4,17)]
or [1,2,5,6,7,11,10,9,8,14,13,15,12,18,17,16,3,4] omitting the discoveryTime,
which is of course a valid DFS order.

When the current node is 10 and the neighbor node is 18,
the lowest discovery time of node 10 is already modified to 4, after dfs_helper of node 9,
since node 9 reaches node 7(whose discoveryTime is 4).
After dfs_helper of node 18, the lowest discovery of node 18 is modified to 4,
since node 18 reaches node 10 through node 17.
By TARJAN_FIND_VBCC condition discoveryTime[curNode]<=lowestDisc[neighborNode],
6<=4 doesn't hold.
Therefore the result misses vbcc=[10,17,18],
which remains in vbccNodeStack until the end of the tarjan function.

from cxxgraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.