PEAR Algorithms/Containers

From: Date: Thu, 18 May 2006 10:41:16 +0000
Subject: PEAR Algorithms/Containers
Groups: php.general 
Request: Send a blank email to php-general+get-236382@lists.php.net to get a copy of this message
Hi, In the past few weeks I've found the need for a hash table and a container that gives me O(log) search efficiency. Now I'm aware I can use associative arrays for my hash table, but I wanted to ensure efficiency. For my O(log) container I ended up using a sorted array, and a binary search (which I had to write). Now I thought common data structures, and algorithms, like these, and many others such as Binary Trees, Red/Black Trees and sorting algorithms and so on would be a useful addition to PHP, or more specifically PEAR, however I was unable to find any previous classes that provided these structures. So I figured I would make a set of containers and algorithms that could be used in a generic way , and hopefully put this code into PEAR. But before I start making nice PEAR code, I wanted to ask why nothing like this already exists? Is it because everyone has been to lazy until now, or is there a real reason that I'm missing that has made such structures pointless. thanks for any comments/replies Andrew

« previous php.general (#236382) next »