2017 © Pedro Peláez
 

library algorithm

image

tinyporo/algorithm

  • Wednesday, May 16, 2018
  • by TinyPoro
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Poro\Algorithm

Poro researching on algorithms., (*1)

Usage

1.String Searching

First, create searching object with algorithm you want with the argument is the FullString, example below describle how to create object with BruteForce searching algorithm., (*2)

$StringSearching = new \Poro\Algorithm\StringSearching\BruteForce('FullString');

Then, we can find all the position of a SearchString in the String with function run:, (*3)

$result = $StringSearching->run(SearchString);

With Morris-Pratt, there is a better version call Knuth-Morris-Pratt. By default, the morris-pratt-object will run with the better version. But if you want to use with normal version, you can pass 1/MorrisPratt::MORRIS_PRATT as the second argument of run function, (*4)

The Versions

16/05 2018

dev-master

9999999-dev

  Sources   Download

by Avatar TinyPoro