定制 bmichotte/dijkstra 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bmichotte/dijkstra

Composer 安装命令:

composer require bmichotte/dijkstra

包简介

php 7+ implementation of the Dijkstra algorithm

关键字:

README 文档

README

Build Status Quality Score Code Coverage StyleCI Github Action

More on the algorithm : https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm

You can find an example on the example directory. The result of this example should be something like shortest paths

Installation

Run composer require bmichotte/dijkstra

Usage

// create some points
$point1 = new \Bmichotte\Dijkstra\Point(/* x */ 1, /* y */ 1);
$point2 = new \Bmichotte\Dijkstra\Point(2, 2);
$point3 = new \Bmichotte\Dijkstra\Point(3, 3);

$all_points = [$point1, $point2, $point3];

// "join" them
$point1->addPoint($point2);
$point1->addPoint($point3);
$point2->addPoint($point3);

// find the shortest path
$dijkstra = new \Bmichotte\Dijkstra\Dijkstra($all_points, /* from */ $point1, /* to */ $point3);
$shortest_path = $dijkstra->findShortestPath();

// $shortest_path[0] == $point1
// $shortest_path[1] == $point3

统计信息

  • 总下载量: 1.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固