nulpunkt / salist
Self-adjusting lists
dev-master
2013-04-27 12:30 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- apix/autoloader: 1.0.*
- phpunit/phpunit: 3.7.*
- squizlabs/php_codesniffer: 1.*
This package is auto-updated.
Last update: 2024-11-17 14:25:39 UTC
README
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.