Question about Graph Search

Topics: algorithm
Feb 26, 2010 at 8:28 PM

Hi All!!!

I have a question (propblem) with Grapg search.

I've found that i can fined a distance to Vertex, but it still not enough.

I have a next problem for graph:

      A1->A2->A3\

                             C1->C2->C3...

B0 ->B1->B2- B3/

 

I this case, A3 connected with C1, and B3 connectedwith C1.

I would like to calculate a distance with negative values. I my case I need a distance values  like:

               B0 = -1

A1 = 0,     B1 = 0

A2 = 1,     B2=1

A3 = 2,     B3=2

C1 = 3

C2  = 4

.....

Is i tpossible to calculate such numbers?

 

Thanks in advance,

Dmitry

PS. In any case,  QuickGraph is a greate library!!!