KristianKarl-zz/GraphWalker

Set weight=0 has no effect

Opened this issue · 1 comments

Description:
Set weight=0 has no effect.

Steps To Reproduce:

  1. Make a graph with two out-edge from v_Begin:
  • e_A with label:
    e_A {new line}
    weight=0
  • e_B with label:
    e_B
  1. Run using this command
    java -jar graphwalker.jar offline -g RANDOM -f ./weight_AB.graphml -s TEST_LENGTH:100 -w
  2. You can see ratios flow though e_A and e_B are equal.

Expected result:
Ratio of e_B is 100%, and ratio of e_A is 0%.

More information:
weight=0.00 has the same issue.
weight=-0 has the same issue.
weight=-0.00 has the same issue.
weight=0.01 is work as expected.

Attach file (graphs):
Please comment here and I'll send to you via email.

Sorry for my english!

Thanx for the report.
RandomPathGenerator.getWeightedEdge need a code review.