Recommend this page to a friend! |
Download .zip |
Info | Example | View files (8) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2016-10-03 (20 days ago) | Not enough user ratings | Total: 6 This week: 6 | All time: 8,605 This week: 181 |
Version | License | PHP version | Categories | |||
graphsolver 1.0 | GNU General Publi... | 5 | Algorithms, PHP 5, Geography |
Description | Author | |
This class can compute the shortest route between to points. |
If you don't want to use the i18N_T package, you'll have to replace all the calls to i18N_T() by gettext(), intl fonctions, or by sentences in your own language. This class is reasonably fast as once it has found solutions, they are recorded in the "chemins" table. You can, of course, rename the database, the tables and the fields to fit your habits. Once you are decided, you'll have to change the default values in constantes.php This class takes three parameters as input : the start point the end point the way the calculation is effectued (distance or time). It returns a graph object containing the collection of results (in collectionOK). Temporary branches are kept in list objets with the "liste" class (class.liste.php). This class tries to get rid of bad branches very quick to make the search faster. One important point : when adding records in th "vvd" table, always add the two directions (eg : A -> B and B-> A). The class knows which one it must use in a branche so that it doesn't loop. The "graph" class (class.graph.php) could be adapted for many other uses. |
Files |
File | Role | Description | ||
---|---|---|---|---|
langages (2 directories) | ||||
class.graph.php | Class | Main class | ||
class.liste.php | Class | Sub class for the lists | ||
constantes.php | Conf. | Defines constantes | ||
graph.php | Example | A basic example | ||
graph.sql | Data | Database source | ||
readme | Doc. | readme |
graphsolver-2016-10-03.zip 8KB | |
graphsolver-2016-10-03.tar.gz 6KB | |
Install with Composer |
Needed packages | ||
Class | Download | Why it is needed | Dependency |
---|---|---|---|
PHP i18N Library | .zip .tar.gz | For using translation | Optional |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
25% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.