scozv / algo-js

[obsoleted] has been moved to project Tango:
https://github.com/scozv/tango
GNU General Public License v3.0
2 stars 1 forks source link

graph properties should distinguish the number of vertex and the number of the valid vertex #7

Closed scozv closed 10 years ago

scozv commented 10 years ago

From Algo.js of Google Code on July 31, 2013 14:01:15

What steps will reproduce the problem?

  1. we increase graph.v as number of vertex during pushing edge into graph,
  2. however, we may never increase the number to match the last vertex (sink vertex), since there is no edge from that vertex
  3. so, in topological sorting, we may label the sink vertex using a number which is less than the actual number of vertex

Please provide any additional information below. we need two properties for n, the number of vertex, and for the number of valid vertex, which maybe mean how many vertex we haven't visited.

Original issue: http://code.google.com/p/algo-js/issues/detail?id=7

scozv commented 10 years ago

From Algo.js of Google Code on July 31, 2013 03:59:33

fixed in revision 09d1f739f6b4

Status: Fixed