nulpunkt/salist

dev-master 2013-04-27 12:30 UTC

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.