Skip to content

nulpunkt/php-self-organizing-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-self-organizing-list

A package of Self-Organizing lists.

Install

Use Composer:

"nulpunkt/salist": "dev-master"

Usage

require_once("vendor/autoload.php");

$l = new Nulpunkt\SAList\CountList();
$l->add(1);
$l->add(2);
$l->add(3);
echo $l->find(function ($e) { return $e == 2; }); // 2

Currently there is 3 list types: MoveToFrontList, CountList, TransposeList. You can consult Wikepedia for more info.

About

A package of Self-Organizing lists.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published