Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: find shortest path for each query from a CSV file

by zing (Beadle)
on Nov 25, 2013 at 06:05 UTC ( [id://1064191]=note: print w/replies, xml ) Need Help??


in reply to Re: find shortest path for each query from a CSV file
in thread find shortest path for each query from a CSV file

Sorry but theres a problem with the code. For example consider 2nd line of you output. Its giving double probablity in third column (E.E) M6:   M6<-Q, E.E, IV_32 Whereas according to the __DATA__ M6 is coming directly from Q

M6    Q    E

Thus correct output should be :-  M6:   M6<-Q, E, II_15

To give you an intuition this line in data means that the probability of M6 coming from Q is 'E'. That is what I want in third column. If suppose M6 were coming from M76 which in turn comes from Q  M6<-M76<-Q and the input data for these were

__DATA__ M6 M76 E M76 Q E
Then in this case M6: M6<-M76<-Q, E.E, IV_32 would have been a correct output.

So basically the third column is giving wront output, due to which fourth column is also giving incorrect results as it is based on third for its input.

Replies are listed 'Best First'.
Re^3: find shortest path for each query from a CSV file
by GrandFather (Saint) on Nov 25, 2013 at 06:29 UTC

    Sorry, but any problem with the code is now your problem. A trivial examination of the output and thinking about it will tell you why it is as it as. Feel free to correct the code as you see fit.

    True laziness is hard work

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1064191]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-20 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found