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

the lable of vertex should apply some rules for representing different meanings #8

Open scozv opened 10 years ago

scozv commented 10 years ago

From Algo.js of Google Code on July 31, 2013 14:10:40

What steps will reproduce the problem?

  1. we label vertex using index of itself by default
  2. we may mark vertex as -1 when we visited it
  3. however, we can not mark vertex as -1 when we push it into stack during dfs
  4. we have to mark v as 'v' for visited, mark it as 'm' for marked

Please use labels and text to provide additional information. try to find a better way to represent different meanings from different labels.

enumeration, 'v' | 'm' ..., or just some numbers, like below? -1 for initial status, unmarked, unvisited; 0 for marked (has been in a stack) 1, 2, 3... for visited order

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

scozv commented 10 years ago

From Algo.js of Google Code on August 11, 2013 19:03:00

when we inspect the code of diff algorithm of graph, we may notice that diff algorithm need diff label for diff meaning.

so we may add an initLabel() after.

scozv commented 10 years ago

From Algo.js of Google Code on September 26, 2013 22:08:44

fixed in revision 987e1c63ba00

Status: Fixed

scozv commented 10 years ago

reopen after fix a topological sort issue (above)