Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.programming
Dijkstra's algorithm for Delphi and FreePascal
Ramine
3/4/2016 1:47:00 AM
Hello,
Dijkstra's algorithm for Delphi and FreePascal. Computes the shortest
path tree. Assumes all weights are nonnegative.
Version: 1.0
Authors: Robert Sedgewick, Kevin Wayne
and enhanced by Amine Moulay Ramdane
Email: aminer at videotron dot ca
Description:
This project consist of this optimal implementation that uses Dijkstra's
algorithm with a binary heap that takes a time complexity of E*log(V), V
is the number of vertices and E is the number of edges. This library can
be used in parallel clusters manner by dividing your graph in many parts
to speed much your parallel algorithm, also i have added an option to
the algorithm that permit you to pass the edges of the graph that you
can substract from your graph to be able to give you algorithm more
control if you want for example to ignore congestions in some roads...
You have to have a 32 bit or 64 bit java compiler and you have to
compile first the java library by running the compile.bat batch file,
after that if you have compiled it with a 32 bit java compiler just
compile after that jtest.dpr with a 32 bit delphi or freepacal compiler,
but if you have compiled it with a 64 bit java compiler just compile
after that jtest.dpr with a 64 bit delphi or freepacal compiler.
Please take a look at the jtest.dpr example, you will notice that
you have to call the java SP() method by passing it the name of the file
that contains the graph and by passing it a second parameter that is the
source from were you want to start searching and the third parameter is
an array that contains the edges that you want to substract: i have
enhanced the algorithm with a new option, you can pass the edges that
you want to substract by passing the edges in an array, the edges must
be arranged two by two in the array, the first and the second element of
the array is the first edge that you want to substract etc. after that
you have to call the java SP1() method by passing it the destination
that you want to search, and the java SP1()method will return the
shortest path to the destination and will return also the number of
vertices. Please read carefully jtest.dpr to learn more, that's all.
You can download it from:
https://sites.google.com/site/aminer68/dijkstra-s-algorithm-for-delphi-and-...
Language: FPC Pascal v2.2.0+ / Delphi 7+:
http://www.freep...
Operating Systems: Windows, Mac OSX , Linux...
Required FPC switches: -O3 -Sd -dFPC -dFreePascal
-Sd for delphi mode....
Required Delphi switches: -$H+ -DDelphi
For Delphi XE-XE7 use the -DXE switch
Thank you,
Amine Moulay Ramdane.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Dijkstra's algorithm for Delphi and FreePascal
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password