triun/longest-common-subsequence 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

triun/longest-common-subsequence

Composer 安装命令:

composer require triun/longest-common-subsequence

包简介

PHP implementation of an algorithm to solve the 'longest common subsequence' problem.

README 文档

README

PHP implementation of an algorithm to solve the longest common subsequence problem.

Latest Version on Packagist Build Status Coverage status Total Downloads The most recent stable version is 2.0.0 Software License

About

PHP-Longest-Common-Subsequence is a PHP implementation of an algorithm to solve the 'longest common subsequence' problem.

From Wikipedia - Longest common subsequence problem:

The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences (often just two sequences). It differs from the longest common substring problem: unlike substrings, subsequences are not required to occupy consecutive positions within the original sequences. The longest common subsequence problem is a classic computer science problem, the basis of data comparison programs such as the diff utility, and has applications in bioinformatics. It is also widely used by revision control systems such as Git for reconciling multiple changes made to a revision-controlled collection of files.

This PHP implementation is based on eloquent/php-lcs, adding a little more flexibility in order to handle, not only the common text, but also the differences.

Installation

Require triun/longest-common-subsequence package with composer using the following command:

composer require triun/longest-common-subsequence

Usage

use Triun\LongestCommonSubsequence\Solver;

$solver = new Solver;

$sequenceA = array('B', 'A', 'N', 'A', 'N', 'A');
$sequenceB = array('A', 'T', 'A', 'N', 'A');

// calculates the LCS to be array('A', 'A', 'N', 'A')
$lcs = $solver->solve($sequenceA, $sequenceB);

Issues

Bug reports and feature requests can be submitted on the Github Issue Tracker.

Contributing

See CONTRIBUTING.md for information.

License

This repository is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固