If you want to do this in Lite-C, you should read this thread :
Dijkstra + WED paths You'll find there :
- how to use paths created with WED to initialize the matrix
- a link to a very basic demo to use it
But you should try to use Alex's algo script rather than mine for best preformances.
Anyway, I am finishing a new free plugin with a demo level to gather all this features. Delay : about 1 or two weeks...